Support » Plugin: WS Facebook Like Box Widget » ugly including of facebook script

  • Is there any reason not to include facebook script the right way like:
    wp_enqueue_script('facebook-script',"//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=&version=v2.0", array(), null, true );
    so users of JS optimizing plugins are able to move the script to the header or footer as they please or disable it completely when not needed for example when mobile version of the website is loading?

    Echo’ing a javascript that attaches the script to head makes it impossible to do any of that.

    https://wordpress.org/plugins/ws-facebook-likebox/

  • The topic ‘ugly including of facebook script’ is closed to new replies.