#34309 closed enhancement (wontfix)
New function: `add_multiple_actions()` and `add_multiple_filters()`
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Plugins | Keywords: | |
Focuses: | Cc: |
Description (last modified by )
Sometimes I need create filter for few elements with __return_true
So for example:
$tags = array ( 'install_theme_complete_actions', 'use_default_gallery_style', 'show_recent_comments_widget_style' ); add_multiple_filters($tags, '__return_true');
Attachments (1)
Change History (7)
#2
@
10 years ago
Why not just using this:
foreach( array( 'install_theme_complete_actions', 'use_default_gallery_style' ) as $hook ) { add_filter($hook, '__return_true'); }
You can also create a add_multiple_filters
helper function on your own that does this.
Otherwise I recommend reading the discussion on #14280.
Note: See
TracTickets for help on using
tickets.
Previously: #14280, #26704.