Created
February 27, 2018 04:15
-
-
Save lgedeon/b8a578bdb4a4cb6aa285d5a2ebd07cc5 to your computer and use it in GitHub Desktop.
Generic argument report for filters and action hooks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function report_args() { | |
echo "\n----------" . current_filter() . "\n"; | |
$args = func_get_args(); | |
var_export( $args ); | |
return $args[0]; | |
} | |
add_filter( 'nav_menu_item_args', __NAMESPACE__ . '\report_args', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment