Posts by OriginalEXE

1565 posts
  • Affiliate Level 1
  • Author Level 5
  • Collector Level 2
  • Featured Author
+2 more
OriginalEXE
says

I fix theme check RECOMMENDED: add_theme_support( ‘title-tag’ ); with this: http://www.binarymoon.co.uk/2014/11/wordpress-4-1-improvements-theme-developers/

Now I still have this two:

1. RECOMMENDED: No reference to add_theme_support( “custom-header”, $args ) was found in the theme. It is recommended that the theme implement this functionality if using an image for the header.

2. RECOMMENDED: Tags: is either empty or missing in style.css header.

All tags are in css header but something make confusion in theme check.
1.) Not important, but if you really want it gone, just add this to your theme:
// add_theme_support( 'custom-header' );

2.) Make sure you add tags to any file that is named style.css, not just the main one in the root folder of your theme.

1565 posts
  • Affiliate Level 1
  • Author Level 5
  • Collector Level 2
  • Featured Author
+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

1565 posts
  • Affiliate Level 1
  • Author Level 5
  • Collector Level 2
  • Featured Author
+2 more
OriginalEXE
says

I believe esc_attr() should be enough.

1565 posts
  • Affiliate Level 1
  • Author Level 5
  • Collector Level 2
  • Featured Author
+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.

1565 posts
  • Affiliate Level 1
  • Author Level 5
  • Collector Level 2
  • Featured Author
+2 more
OriginalEXE
says

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

Why would you hit that limit?

1565 posts
  • Affiliate Level 1
  • Author Level 5
  • Collector Level 2
  • Featured Author
+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;" />';
1565 posts
  • Affiliate Level 1
  • Author Level 5
  • Collector Level 2
  • Featured Author
+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.

1565 posts
  • Affiliate Level 1
  • Author Level 5
  • Collector Level 2
  • Featured Author
+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 :)

1565 posts
  • Affiliate Level 1
  • Author Level 5
  • Collector Level 2
  • Featured Author
+2 more
OriginalEXE
says
1565 posts
  • Affiliate Level 1
  • Author Level 5
  • Collector Level 2
  • Featured Author
+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);

        }

    }
by
by
by
by
by
by