Title: Missing arguments for widget_title filter
Last modified: March 27, 2019

---

# Missing arguments for widget_title filter

 *  Resolved [Florian Brinkmann](https://wordpress.org/support/users/florianbrinkmann/)
 * (@florianbrinkmann)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/missing-arguments-for-widget_title-filter/)
 * Hi,
 * I am using the `widget_title` filter to modify the titles of category widgets.
   I need all three parameters of the core’s `apply_filters()` call ([https://core.trac.wordpress.org/browser/tags/5.1.1/src/wp-includes/widgets/class-wp-widget-pages.php#L54](https://core.trac.wordpress.org/browser/tags/5.1.1/src/wp-includes/widgets/class-wp-widget-pages.php#L54))
   and get an error with the Popular posts plugin, because it uses `apply_filters('
   widget_title'`, but only with the title as a param.
 * Could you add `$instance` and `$this->id_base` as additional parameters? And 
   maybe remove the `apply_filters( 'widget_title'` from the shortcode or use a 
   custom filter?
 * Thanks,
    Florian

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/missing-arguments-for-widget_title-filter/#post-11362683)
 * Hi Florian,
 * Sure thing. I’ll look into this as soon as I can. Thanks for the heads up.
 * **Update:** done! (see [f229261](https://github.com/cabrerahector/wordpress-popular-posts/commit/f229261fa4a878bfca68bf54cb70b6663dd40119)
   and [b658b44](https://github.com/cabrerahector/wordpress-popular-posts/commit/b658b44e0231a2ee86e944608db38ac40d3e54ae))
    -  This reply was modified 7 years, 2 months ago by [Hector Cabrera](https://wordpress.org/support/users/hcabrera/).
 *  Thread Starter [Florian Brinkmann](https://wordpress.org/support/users/florianbrinkmann/)
 * (@florianbrinkmann)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/missing-arguments-for-widget_title-filter/#post-11363269)
 * Hi Hector,
 * great, thanks! No need for a rush (at least, not for my project 🙂 ), it was 
   decided to create a separat widget for the use-case to bypass the filter, because
   there were a few plugins that only provide the first param in the project, and
   the risk of getting a fatal error after installing a new one was too high 🙂
 * Best,
    Florian
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/missing-arguments-for-widget_title-filter/#post-11363290)
 * It’s alright. That was an easy fix (can’t believe that even when the parameters
   are mandatory WordPress never complained about them being missing.) And don’t
   worry, I just happened to be testing the dev version of the plugin and decided
   to include these changes into it right away 🙂
 *  Thread Starter [Florian Brinkmann](https://wordpress.org/support/users/florianbrinkmann/)
 * (@florianbrinkmann)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/missing-arguments-for-widget_title-filter/#post-11363484)
 * Okay cool! 🙂

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Missing arguments for widget_title filter’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-popular-posts/assets/icon-256x256.png?rev=1232659)
 * [WP Popular Posts](https://wordpress.org/plugins/wordpress-popular-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-popular-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-popular-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-popular-posts/reviews/)

## Tags

 * [filter](https://wordpress.org/support/topic-tag/filter/)
 * [widget](https://wordpress.org/support/topic-tag/widget/)

 * 4 replies
 * 2 participants
 * Last reply from: [Florian Brinkmann](https://wordpress.org/support/users/florianbrinkmann/)
 * Last activity: [7 years, 2 months ago](https://wordpress.org/support/topic/missing-arguments-for-widget_title-filter/#post-11363484)
 * Status: resolved