WordPress functions.php File Has Complete Inline Documentation

I was meaning to make a note of this, but the functions.php WordPress file has complete Inline Documentation for all functions contained. One of the larger files, it was actually easier than I had thought to complete, because many of the functions had very short body.

I’m looking to correct the inline documentation in posts.php, which has a lot of inline documentation, but many of the functions are grossly inaccurate. If that file can be corrected, it will be another large file that contains many functions and many of them used by theme authors. That file will be completed before 2.7 comes out. It is on my list of files to complete, but I’ll probably won’t get to it before August is over.

There is another person working on formatting.php WordPress file and documented about 10 to 15 functions. I like that, it will give me more motivation to complete the file after the person is finished with what he wants to document. That is probably the last most used file within WordPress to be documented. The other files are used within WordPress core and don’t really need to be documented before 2.7 is released.

I’m thinking they are planning to release WordPress 2.7 early, so that will most likely give until October to complete as many functions and files as possible before the release. I’m still working on completing the functions within wp-admin and after I’m finished with those files will again focus my attention to wp-includes directory files.

It will be nice to check the inline documentation ratio for WordPress and see how well WordPress was doing. The last time I checked it was at 21%. That is good, but it would be cool to get that close to 30%. I think once the phpdoc inline documentation is completed it will start getting harder to write inline documentation to get to that point, but since most inline documentation has as many lines as the functions themselves, it might not be that difficult.

Possibly Related Posts:


2 Comments.

  1. I was hoping that my input would serve as a boost to get formatting.php completed. Roughly counting about half the functions in it have some documentation (of varying detail). Apart from the functions I can’t work out, most of the remaining are quite small simple functions so I’ll try and get a fair chunk of documentation done for them. Hopefully this will leave you quite a bit less to do for that file when you get around to it.

  2. Apart from you and I, there are no others actively documenting the WordPress files at this time. Others might come, like yourself, however the probability of it is slim. I’ll welcome it, as the sooner it is finished, the sooner the Codex documentation can be worked on.

    The functions with the short bodies are very easy to complete. I was able to complete functions.php quickly thanks to that. Not every file is as simple as that. I think that once every function is complete, it should be a simple matter to keep the functions up to date.

    The core team and contributors are already handling new functions. It is just the old functions, which need help finishing.

    I thank you for your help and hope you will continue the effort. It is my goal to have all of the files and functions completed by the time 2.7 is out. With your help that may very well be possible.

    If more people help, then it will be done faster. the wp-admin directory is complete except for two files, which I already have a patch for. The wp-admin/includes has a small amount of files and functions, which shouldn’t take too long.