- var_export: documentation ( source)
<?php
function remove_action() {
var_export(func_get_args());
echo "\n";
}
$config = array(
'remove_actions' => [
'genesis_after_header' => [
'genesis_do_nav' => null,
'genesis_do_subnav' => null,
],
'genesis_site_title' => [
'genesis_seo_site_title' => 5
],
],
);
foreach ($config['remove_actions'] as $hook => $functions) {
foreach ($functions as $function => $priority) {
if (is_null($priority)) {
remove_action($hook, $function);
} else {
remove_action($hook, $function, $priority);
}
}
}