[wp-hackers] Class/Function/Variable overview

DD32 wordpress at dd32.id.au
Sun Dec 9 08:41:44 GMT 2007


A few people have probably noticed ticket #5418, removing a lot of unused variables.
No, I didnt go through a manually locate them all, I wrote up an app(PHP + token_get_all()) to alert me to certain variables which might not be used.

The result was that it threw up quite a few variables which were declared as Globals that were no longer used, and a few which were typos (Infact, i just found another one, $postition instead of $position in WP_Ajax_Response::add() ).

I'd like to make a reminder to people who arerefactoring code, or when part of a function is being deprecated to give the functions affected a quick run over to make sure you've not left any unneeded variables lying around, At times they can become confusing as to what something does until you realise that the variable your looking at doesnt affect anything.

Today i cleaned up my app and added a few extra functions into it, And in the process gave it some form of UI which is half usable.
So i now present to you, a 500KB report of all the WP functions, What version of PHP every function requires(and if theres a compat function available for it), What varables/arguements in functions that are unused, And a bit of a listing of what functions/variables each class contains (and their default value).

As you'll notice, the app. isnt fully bug free(Unknown functions contains things which ARE known, and case sensitivity is running wild throughout still).

http://dd32.id.au/files/wordpress/wp-2.4-variable-report.html

While this message is mainly for people with interest to look through, I'd also welcome any suggestions as to what should also be included and whatnot.

Cheers,
D


More information about the wp-hackers mailing list