Is there widely accepted phpDoc syntax for documenting which hook calls a function?
I keep all hooks in one file, and the functions are organized in their respective classes (different auto-loaded files).
Looking for a standard way to document that a function's sole purpose is to be called on 'init' for example.
Currently using @see 'init'
Thanks!
Example Code
hooks.php
add_action( 'init', 'remove_image_sizes' );
functions.php
/**
* Removes image sizes added by mistake prior to 1.6.18
*
* @since 1.6.18
* @see 'init'
* @return void
*/
function remove_image_sizes() {
remove_image_size( 'foo' );
remove_image_size( 'bar' );
}
Topic documentation plugin-development hooks theme-development Wordpress
Category Web