我正在通过 WP 核心 grep'ping,试图编写一个 grep 语句来查找所有 PHP 函数,同时排除任何类方法或 Javascript 函数。
这就是我现在所拥有的:
grep -r --include=*.php 'function [A-Za-z_]\+(.\+)' .
这会从类方法和 JS 函数中返回被污染的函数。
You might probably want to try http://phpxref.sourceforge.net/ I passed the entire WordPress code into PHPXref a couple of years back and was able to get the complete list of functions, classes etc.