Support » Plugin: Youtube SpeedLoad » Move Script to footer

  • Resolved Mauricio Macas

    (@getmovil)


    Hi, your plugin is the best, and for optimize the load of my blog tha latest version of your plugin move the /wp-content/plugins/youtube-speedload/script.js and jquery in the header, but I need move this script in the footer.

    <script type=’text/javascript’ src=’https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js’></script&gt;
    <script type=’text/javascript’ src=’/wp-content/plugins/youtube-speedload/script.js’></script>

    In youtube-speedload/youtube-speedload.php I have this:

    add_action( ‘wp_enqueue_scripts’, ‘ytsl_plugin_styles_sripts’ );
    function ytsl_plugin_styles_sripts() {
    //wp_enqueue_style( ‘ytsl-textdomain’, plugins_url(‘style.css’, __FILE__) );
    if(is_single()) wp_enqueue_script(‘ytsl-textdomain’, plugins_url( ‘script.js’ , __FILE__ ), array( ‘jquery’ ));
    }

    if ( !is_admin() ) {
    add_filter(’embed_oembed_html’, ‘ytsl_oembed_html’, 1, 3);
    };

    Please help me.

    Best regards.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Move Script to footer’ is closed to new replies.