﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
21591,Allow passing array of hook names to add_filter and add_action,joehoyle,,"One thing I wish I was able to do is pass multiple hooks to `add_action()` and `add_filter()`, so I could do stuff like this:


{{{
add_action( [""admin_print_styles-post.php"", ""admin_print_styles-post-new.php""], function() {
    echo 'Two in one!';
} );
}}}

Currently If you want to use a closure you have to do something like 

{{{
add_action( ""admin_print_styles-post.php"", $hook = function() {
    echo 'Two in one!';
} );
add_action( ""admin_print_styles-post-new.php"", $hook );
}}}
",enhancement,closed,normal,,Plugins,,normal,duplicate,,
