Posts by OriginalEXE

1554 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE
says

This is how we do it:

if ( ! function_exists( '_wp_render_title_tag' ) ) {

    add_action( 'wp_head', array( $this, 'pe_theme_render_title' ) );

}

public function pe_theme_render_title() {

    ?>

    <title><?php wp_title( '|', true, 'right' ); ?></title>

    <?php

}

add_theme_support( 'title-tag' );

That way you support both newer and older versions of WordPress

1554 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE
says

I believe esc_attr() should be enough.

1554 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE
says

That’s why I asked, there is absolutely no need to use <style> tags in most cases (needed very rarely), so just add dynamic styles inline and the rest you your .css files. I can guarantee it’s allowed.

1554 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE
says

Still wondering how other authors are avoiding the stupid IE css limit

Why would you hit that limit?

1554 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE
says

Never add the css to a style tag to an item, it’s just bad practise

It might not be ideal but sometimes it’s the only (reasonable) way.

@RD-Themes You are definitely allowed to add inline css to your elements/shortcodes, but you must make sure only what is dynamic goes there.

For example, if you were to have shortcode that outputs DIV section with certain background image, you should do it like this:
$bgimage = bla_bla_get_image_url();
echo '<div class="bgcover" style="background-image: url( ' . $bgimage . ' );" />';
and then in your css you can add additional rules that do not have to be dynamic, like:
.bgcover {
background-size: cover;
}
What is not allowed is to also add inline those additional rules that are not dynamic, like this:
$bgimage = bla_bla_get_image_url();
echo '<div class="bgcover" style="background-image: url( ' . $bgimage . ' ); background-size: cover;" />';
1554 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE
says

No problem,

I recommend this package for creating archives: https://github.com/gruntjs/grunt-contrib-compress

You might also need https://github.com/gruntjs/grunt-contrib-cssmin for css compression, and https://github.com/gruntjs/grunt-contrib-uglify for js.

1554 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE
says

I would suggest you to look into Grunt: http://gruntjs.com/

By combining several Grunt packages you can easily create a task that will create a complete .zip archive of everything you need for your upload.

Takes a bit to learn how to do it but once you set up your task, you just run a console command and you have everything ready for upload, saves a lot of time :)

1554 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE
says
1554 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE
says

This is a function I used for triggering click event without jQuery, did not try it in IE though. Found it online and it worked for what I needed it for.

    function fakeClick( anchorObj ) {

        if ( anchorObj.click ) {

            anchorObj.click()

        } else if ( document.createEvent ) {

            var evt = document.createEvent("MouseEvents"); 
            evt.initMouseEvent("click", true, true, window, 
            0, 0, 0, 0, 0, false, false, false, false, 0, null); 
            var allowDefault = anchorObj.dispatchEvent(evt);

        }

    }
1554 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
OriginalEXE
says

I don’t see here screaming, she is just surprised by something. If she were screaming, I feel her eyes would be more threatening, not they are not.

by
by
by
by
by
by