Last active
December 21, 2015 05:39
-
-
Save wycks/6258280 to your computer and use it in GitHub Desktop.
Parse all WP functions
This file contains 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 | |
//just load it the way WP does | |
include dirname(__FILE__) . '/wp-blog-header.php'; | |
require_once(ABSPATH . 'wp-admin/includes/admin.php'); | |
$functions = get_defined_functions(); | |
$i = 0; //count them | |
// set to user, we don't want internal functions | |
foreach ($functions['user'] as $func) { | |
$wordpressfunctions = new ReflectionFunction($func); | |
$args = array(); | |
$i++; | |
foreach ( $wordpressfunctions->getParameters() as $param) { | |
//ToDo additiona check here for array/string/etc | |
$tmparg = ''; | |
$tmparg.= '$' . $param->getName(); | |
$args[] = $tmparg; | |
unset ($tmparg); | |
} | |
echo $i . ' ' . $func . '(' . implode(', ', $args) . ')' . '<br>'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment