[wp-trac] [WordPress Trac] #34309: New function: `add_multiple_actions()` and `add_multiple_filters()`
WordPress Trac
noreply at wordpress.org
Fri Oct 16 06:40:08 UTC 2015
#34309: New function: `add_multiple_actions()` and `add_multiple_filters()`
------------------------------+------------------------------
Reporter: sebastian.pisula | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
------------------------------+------------------------------
Comment (by swissspidy):
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34309#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list