Title: preferred method of removing default css
Last modified: April 6, 2017

---

# preferred method of removing default css

 *  Resolved [nimmolo](https://wordpress.org/support/users/nimmolo/)
 * (@nimmolo)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/possible-new-php-error-with-call_user_func_array/)
 * Hi Tobias,
 * I was getting an error disabling default css with the recommended function. It
   was not causing me any problems, just thought you might like to check it out.
 * The reason was that I had disabled default css for tablepress in my theme’s functions.
   php like this:
    `add_filter( 'tablepress_use_default_css', false );`
 * When I changed to:
 *     ```
       add_filter( 'tablepress_use_default_css', 'mytheme_filter_tablepress_css' );
       function mytheme_filter_tablepress_css() {
         return false;
       }
       ```
   
 * the error disappeared.
 * reported by john blackbourn’s debugging plugin Query Monitor:
 *     ```
       PHP Error
       Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given
   
       Location
       wp-includes/class-wp-hook.php:298
   
       Call Stack
       apply_filters('tablepress_use_default_css')
       wp-content/plugins/tablepress/controllers/controller-frontend.php:46
       TablePress_Frontend_Controller->__construct()
       wp-content/plugins/tablepress/classes/class-tablepress.php:208
       TablePress::load_class()
       wp-content/plugins/tablepress/classes/class-tablepress.php:261
       TablePress::load_controller()
       wp-content/plugins/tablepress/classes/class-tablepress.php:156
       TablePress::run()
       wp-includes/class-wp-hook.php:298
       do_action('init')
       wp-settings.php:449
   
       Plugin: tablepress
       ```
   
    -  This topic was modified 9 years, 1 month ago by [nimmolo](https://wordpress.org/support/users/nimmolo/).
    -  This topic was modified 9 years, 1 month ago by [nimmolo](https://wordpress.org/support/users/nimmolo/).
      Reason: solved
    -  This topic was modified 9 years, 1 month ago by [nimmolo](https://wordpress.org/support/users/nimmolo/).
      Reason: clarity

Viewing 1 replies (of 1 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/possible-new-php-error-with-call_user_func_array/#post-9000504)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * This is actually an error in your line of code. The second parameter of the `
   add_filter` function requires a string/callback function.
    The proper line would
   be
 *     ```
       add_filter( 'tablepress_use_default_css', '__return_false' );
       ```
   
 * (`__return_false()` is a WordPress function that is basically the same as your
   function.)
 * Regards,
    Tobias

Viewing 1 replies (of 1 total)

The topic ‘preferred method of removing default css’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

## Tags

 * [default CSS](https://wordpress.org/support/topic-tag/default-css/)

 * 1 reply
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/possible-new-php-error-with-call_user_func_array/#post-9000504)
 * Status: resolved