Viewing 5 replies - 1 through 5 (of 5 total)
  • Best way should be for developer of the plugins to load it conditionally (only show where shortcode/widget is added) not all whole site.

    Thread Starter bjrnet21

    (@bjrnet21)

    The mention of “RSS Feed Retriever” should have been “Custom Twitter Feeds”. I cut and pasted this response after I realized it was a “Custom Twitter Feed” issue. Sorry about that. Issue still exists.

    Plugin Author Craig at Smash Balloon

    (@craig-at-smash-balloon)

    Hey bjrnet21,

    The intents JS code is meant to allow people to like and reply to your twitter feed directly from your website. Disabling it will then just link these actions back to Twitter. So you can definitely exclude the file and not impact most of the features of the plugin.

    Let me know if you have more questions!

    – Craig

    Thread Starter bjrnet21

    (@bjrnet21)

    Thank you for the help.

    Since I am only using this on a page called “twitter” I modified the file custom-twitter-feed.php as follows:

    if (strpos($_SERVER[‘REQUEST_URI’], “twitter”) !== false){wp_enqueue_script( ‘ctf_twitter_intents’, ‘https://platform.twitter.com/widgets.js’, array(), CTF_VERSION, true );wp_enqueue_style( ‘ctf_styles’, plugins_url( ‘/css/ctf-styles.css’, __FILE__ ), array(), CTF_VERSION );}

    This way, widgets.js only loads on one page and not the entire site.

    Maybe you can add this option in a future release.

    Plugin Author Craig at Smash Balloon

    (@craig-at-smash-balloon)

    Definitely makes sense. I think we will enqueue the script in the shortcode function. This should work well for all circumstances.

    Have a great weekend!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Is platform.twitter.com/widgets.js necessary?’ is closed to new replies.