• Resolved Frans Allen

    (@fransallen)


    Hello, maybe the plugin author must be add this code.

    adding code to classes/autoptimizeToolbar.php

    // Autoptimize Toolbar Styles
    if ( is_admin_bar_showing() ) {
    wp_enqueue_style( ‘autoptimize-toolbar’, plugins_url(‘/static/toolbar.css’, __FILE__ ), array(), time(), “all” );
    }

    // Autoptimize Toolbar Javascript
    if ( is_admin_bar_showing() ) {
    wp_enqueue_script( ‘autoptimize-toolbar’, plugins_url( ‘/static/toolbar.js’, __FILE__ ), array(‘jquery’), time(), true );
    }

    and maybe this plugin support for adding SRI on script.

Viewing 1 replies (of 1 total)
  • Plugin Author Frank Goossens

    (@futtta)

    good idea @fransallen, committed something similar to Github here based on your proposal.

    SRI is a very nice idea, but would be even more interesting if there’s a function that could be called from AO as a whole (so frontend and admin-area) to add SRI’s to all of AO’s scripts & styles. don’t know if you’re into coding, but if you are; fork, develop & request to pull when ready, I’ll be happy to merge if you do! ??

    frank

Viewing 1 replies (of 1 total)
  • The topic ‘Do not load the autoptimize admin script when adminbar not showing’ is closed to new replies.