• Resolved slickremix2

    (@slickremixcom)


    While using easy digital downloads I’ve found that the My Account page where people can download the zip file they have purchased will get an error when trying to unzip the zip file. PCLZIP_ERR_BAD_FORMAT (-10)

    By adding $minify_html_active != 'no' && !is_user_logged_in() to line 69 I was able to get around this.

    Having an option to turn off the minify html if logged in would probably benefit a lot of users. Great plugin other than that, great plugin, keep it up!

    Spencer

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

    (@teckel)

    Interesting… I’ll look into this.

    Thanks! Sorry for the double post, not sure what happened.

    Hello,

    I’d like to suggest another change: check if WP is running under WP-CLI, and disable it in such case, because the output of any wp command gets really messed on Terminal.

    I did it locally with:

    if ( ! ( defined( 'WP_CLI' ) && WP_CLI ) )

    Plugin Author Tim Eckel

    (@teckel)

    Never heard of WP-CLI nor how I would test that or the reason why it’s needed. Will probably require you to add the exclusion as it sounds like I’d need to setup a custom site just to develop/test this.

    Hi, Tim.

    I did the code adjustment on my blogs.

    You just have to add the line I suggested below your line:

    if ( !is_admin() )

    The complete code will be:

    
    if ( !is_admin() )
    	if ( ! ( defined( 'WP_CLI' ) && WP_CLI ) )
    		add_action( 'init', 'teckel_init_minify_html', 1 );

    That simple. ??

    Plugin Author Tim Eckel

    (@teckel)

    I’ll look into it as well as what the heck WP CLI is.

    Thanks!

    Tim

    WP-CLI: Command Line Interface for WordPress.

    https://wp-cli.org/

    Believe me, it’s wonderful. If you happen to use Unix Terminal, you’ll love WP-CLI. I have more and less 2000 WPs under my control. Without WP-CLI I wouldn’t be making my money, my customers wouldn’t be that happy.

    Plugin Author Tim Eckel

    (@teckel)

    WP-CLI support added in v1.98 of Minify HTML.

    Tim

    Thank you!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Added if user logged in to code’ is closed to new replies.