• Resolved morespinach

    (@morespinach)


    Is this supported in the latest version of WordPress? Doesn’t do anything when enabled. I’ve cleared all caches, just in case. I only have some of the most common plugins installed: Jetpack, Akismet, etc. What can I do to debug?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Tim Eckel

    (@teckel)

    Yup, works perfectly with the latest release of WordPress. Running 4.7.2 on this site for example: https://www.renegadelife.org/ (notice the source is minified). Are you sure you activated the plugin and look in Settings->Minify HTML to be sure it’s Enabled.

    It’s possible that you’re using some non-standard theme that would prohibit the use of Minify HTML, but any properly designed theme shouldn’t cause a problem.

    I’ll need more details on exactly what website, theme, etc. you are running if you still can’t get it working. Basically, I’ll need to duplicate what you’re using on my end.

    Thread Starter morespinach

    (@morespinach)

    What’s the expectation in a well designed theme? I write the theme, so can make any changes needed. Does the plugin need wp_head and wp_footer, both of which publish a lot of junk so I’ve disabled both.

    Plugin Author Tim Eckel

    (@teckel)

    Nope, doesn’t need either of those. Also, you can just disable the junk without totally disabling wp_head and wp_footer. For example, using the following in functions.php:

    remove_action( ‘admin_print_styles’, ‘print_emoji_styles’ );
    remove_action( ‘wp_head’, ‘print_emoji_detection_script’, 7 );
    remove_action( ‘admin_print_scripts’, ‘print_emoji_detection_script’ );
    remove_action( ‘wp_print_styles’, ‘print_emoji_styles’ );
    remove_filter( ‘wp_mail’, ‘wp_staticize_emoji_for_email’ );
    remove_filter( ‘the_content_feed’, ‘wp_staticize_emoji’ );
    remove_filter( ‘comment_text_rss’, ‘wp_staticize_emoji’ );
    remove_action(‘wp_head’, ‘wp_generator’);
    remove_action(‘wp_head’, ‘wp_shortlink_wp_head’);
    remove_action( ‘wp_head’, ‘feed_links_extra’, 3 );
    remove_action( ‘wp_head’, ‘rsd_link’ );
    remove_action( ‘wp_head’, ‘wlwmanifest_link’ );

    Anyway, none of this has anything to do with Minify HTML working or not. It runs at the lowest level (on the init action). I’ve never seen a theme that messes with the init level (nor should it). The plugin-in is fairly straight-forward. Runs on init as long as not is_admin() and minify is turned on.

    Tim

    • This reply was modified 8 years, 1 month ago by Tim Eckel.
    Plugin Author Tim Eckel

    (@teckel)

    Suggestion given on how to correctly disable features without disabling wp_head and wp_footer, which is a terrible idea.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Doesn’t minify’ is closed to new replies.