Posted by mbutcher on October 20, 2010 at 3:51am
Total Hook Extremism (THE) allows you to run functions by regular expression.
Example:
<?php
$regex = '/^[a-zA-Z0-9]*\_block\_info$/';
$results = the_module_invoke_all($regex);
print_r($results, TRUE);
?>This will execute any function that matches the regular expression... but it's harder than you think. Go ahead. Try it.
The Public API
<?php
the_module_invoke_all()
?>It's better[sic] than the real module_invoke_all().
<?php
the_executioner()
?>Execute any function by regular expression.
<?php
the_matchmaker()
?>Find any functions that match a regular expression.
<?php
the_goods()
?>Get a list of all defined functions.