WordPress.org

Ready to get started?Download WordPress

Forums

Twiget Twitter Widget
CSS should be enqueued with media=all (4 posts)

  1. Torsten Landsiedel
    Member
    Posted 11 months ago #

    The plugin uses this line to add the CSS:
    wp_enqueue_style( 'twiget-widget-css', TWIGET_PLUGIN_URL . '/css/twiget.css', array(), '', false );

    But the last argument is not the "in_footer" argument (like for scripts), it is resetting the media-atrribute to an empty string, but this should be the default (media="all"). You should omit the last argument ("false") to achieve this.

    See:
    http://codex.wordpress.org/Function_Reference/wp_enqueue_script
    http://codex.wordpress.org/Function_Reference/wp_enqueue_style

    Best regards
    Torsten

    http://wordpress.org/plugins/twiget/

  2. Prasanna SP
    Member
    Plugin Author

    Posted 10 months ago #

    Thanks for reporting this issue. It'll be fixed in the next update.

  3. danieliser
    Member
    Posted 9 months ago #

    change
    wp_enqueue_style( 'twiget-widget-css', TWIGET_PLUGIN_URL . '/css/twiget.css', array(), '', false );

    to

    wp_enqueue_style( 'twiget-widget-css', TWIGET_PLUGIN_URL . '/css/twiget.css');

    The rest doesn't need to be there unless you are going to specify something different than default.

  4. danieliser
    Member
    Posted 9 months ago #

    also on a side note same goes for the line above it.

    wp_enqueue_script( 'twiget-widget-js', TWIGET_PLUGIN_URL . '/js/twiget.js', array(), '', false );

    to

    wp_enqueue_script( 'twiget-widget-js', TWIGET_PLUGIN_URL . '/js/twiget.js');

    Unless you need to add a dependancy, version or make it load in footer then leave those parameters off.

Reply

You must log in to post.

About this Plugin

About this Topic