• Resolved xscorpionx

    (@xscorpionx)


    hello, I think there is a bug, with the plugin activated, gutenberg styles are loaded that should only be loaded in the backend and it hurts in pagespeed. The urls are:

    /wp-includes/css/dist/block-library/style.min.css?ver=5.7
    /wp-includes/css/dist/components/style.min.css?ver=5.7
    /wp-includes/css/dist/block-editor/style.min.css?ver=5.7
    /wp-includes/css/dist/nux/style.min.css?ver=5.7
    /wp-includes/css/dist/editor/style.min.css?ver=5.7

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Paul Bearne

    (@pbearne)

    Hi

    These URLs look like core CSS file not from the plugin

    Paul

    Thread Starter xscorpionx

    (@xscorpionx)

    When I deactivate the plugin those styles disappear, I have tried deactivating other plugins and they disappear when I deactivate author list. Those styles shouldn’t load on frontend.

    Edit: The block-library style I think it can load in frontend, the others should not.

    • This reply was modified 3 years, 7 months ago by xscorpionx.
    Plugin Author Paul Bearne

    (@pbearne)

    Hi

    I will dig into the code and see if I can work out why this happening?

    Paul

    Thread Starter xscorpionx

    (@xscorpionx)

    Okay Paul,
    Thank you. One last question, to load the plugin only on the page where the list of authors is, is there a snippet?

    Plugin Author Paul Bearne

    (@pbearne)

    Hi

    Not sure what you are asking for
    can expand what you need?

    Paul

    Thread Starter xscorpionx

    (@xscorpionx)

    I was referring to if there is any way that the plugin only loads in the pages that are needed, such as a snippet that has cf7:

    add_filter( 'wpcf7_load_js', '__return_false' );
    add_filter( 'wpcf7_load_css', '__return_false' );
    
    <?php if( is_page( 'contact' ) ) : ?>
         <?php if ( function_exists( 'wpcf7_enqueue_scripts' ) ) : ?>
              <?php wpcf7_enqueue_scripts(); ?>
         <?php endif; ?>
         <?php if ( function_exists( 'wpcf7_enqueue_styles' ) ) : ?>
              <?php wpcf7_enqueue_styles(); ?>
         <?php endif; ?>
    <?php endif; ?>

    Something like that.

    Plugin Author Paul Bearne

    (@pbearne)

    Hi

    I have had a quick look at the code and tweaked it a bit

    Can you download this version and test it for me?

    https://github.com/pbearne/wp-author-avatars/archive/refs/heads/master.zip

    Paul

    Thread Starter xscorpionx

    (@xscorpionx)

    Greetings Paul and sorry for the late reply.
    Everything seems to be perfect! I have tested it both in the wordpress version 5.7 and in the new update 5.7.1, in both they no longer load those styles in frontend, perfect!

    Plugin Author Paul Bearne

    (@pbearne)

    Good news I will release an update with this change when I get time

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Gutenberg styles are loaded on frontend’ is closed to new replies.