Support » Plugin: FooTable » Stopping the plugin from loading on all pages.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Chumlee

    (@chumlee)

    I would really need some help over here..

    Line 263: wp_enqueue_style($h);
    Line 277: wp_enqueue_style(‘thickbox’);

    Line 143: add_action(‘wp_enqueue_scripts’, array( &$this, ‘frontend_print_scripts’), 20 );
    Line 203: wp_enqueue_script($h);
    Line 227: wp_enqueue_script(‘media-upload’);
    Line 228: wp_enqueue_script(‘thickbox’);

    This is not how all plugins load their scripts and styles and I can’t find anything related to this on the web.

    Thread Starter Chumlee

    (@chumlee)

    I’ve used is_page to wrap the functions that register and enqueue the styles&scripts. I heard its not the best practice but I have no other choice for the moment. Hope maybe you have an answer.

    Plugin Author bradvin

    (@bradvin)

    Hi Chumlee

    So sorry for the late reply here – I was not getting notified of new support threads for footable.

    in v0.3.1, you should be able to deregister with something like this:


    add_action('wp_print_scripts','dequeue_footable');

    function dequeue_footable() {

    //only enqueue footable on pages
    if (!is_page()) {
    wp_dequeue_script( 'footable-min' );
    wp_dequeue_script( 'footable-sort-min' );
    wp_dequeue_script( 'footable-filter-min' );
    wp_dequeue_script( 'footable-paginate-min' );

    wp_dequeue_style( 'footable-core-min' );
    wp_dequeue_style( 'footable-metro-min' );
    wp_dequeue_style( 'footable-standalone-min' );
    }

    }

    You may also need to remove the inline footable initialization script, I did, this is how:

    add_action('wp', 'remove_footable_init');
    function remove_footable_init() {
    if ( !is_page() ) {
    global $FooTable;
    remove_action( 'wp_head', array( $FooTable, 'inline_dynamic_js') );
    }
    }

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Stopping the plugin from loading on all pages.’ is closed to new replies.