This WordPress function will look for TODO comments in your theme files and organize them on your Admin Dashboard inside of a metabox. Each TODO item can have an optional category and priority associated with it. This will help with your theme development so you don’t accidentally forget a TODO item, and allows a team developers to easily communicate and organize tasks right inside the project itself!
The Plugin
There are two ways of using this function— either develop your themes using the WordPress Nebula, or install the Gearside Developer Dashboard plugin available on WordPress.org which also includes the Developer Information metabox.
The Comment Syntax
Writing TODO comments so they appear in the manager is easy! You can use whatever comment syntax the language provides (like //
, <!-- -->
, /* */
, #
, etc.). The manager will look for the string @TODO
in your comment. So, the simplest implementation would be:
@TODO: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Furthermore, a category and priority can be set to further organize tasks. Categories can be any string inside double quotes and will be color-coded by the priority- which is an integer between 0-5. A priority of 0 is hidden from the manager, and a priority of 5 is most important (and will appear as red). The syntax for including a category and priority is:
@TODO “Functionality” 4: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
It is important that the colon appears after the @TODO
and optional category and priority. This allows the manager to display the first line of the comment message as a preview of the task itself.
If you have any questions or ideas, feel free to let me know on GitHub!