Opened 5 years ago
Closed 5 years ago
#48824 closed defect (bug) (duplicate)
Array to pass in add_action or add_filter
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Plugins | Keywords: | |
Focuses: | Cc: |
Description
there are times when we do:
add_action('wp_head', 'smth');
add_action('admin_head', 'smth');
function smh(){
//...
}
It would be convenient to have an ability to pass the array:
add_action(['wp_head','admin_head'], 'smth');
...
Will this be considered? if so, i'll try to upload the patch.
Change History (1)
Note: See
TracTickets for help on using
tickets.
Thanks for the ticket, we're already tracking this enhancement in #14280.
Per the reasons stated in that ticket and in comment:2:ticket:26704, there are currently no plans to implement this due to performance impact it would have without any gained benefit for almost every existing use of the functions.