My problem is with @package and @subpackage.

I went to the suggested link (What are the package and subpackage comment for?). There I did not find anything I could apply to my problem but instead this answer:
“These are PHPDoc tags – used to generate meaningful (and automated) code documentation”. This is what I have now:

/**

* Contains a list of all custom action hooks and corresponding functions defined for abc.

* This file is included in functions.php:

*

* @package theme-name

* @subpackage Functions

*/

This is not a child theme of twenty ten. There is a folder in the theme-name folder: functions. My child theme is in another folder. I have saved the functions.php file to my child theme folder. Nothing happens (changing the content) either when I change the subpackage my folder name or leave the Functions word there.

What should I be putting in the here?

/**

* Contains a list of all custom action hooks and corresponding functions defined for abc.

* This file is included in functions.php:

*

* @package theme-name

* @subpackage ???

*/

4 s
4

Rule of thumb: is your code bundled (i.e. packaged) with whatever code indicated by @package? If no, then you are using an incorrect value for @package.

For the case of most Themes, this is easy:

  • Core-bundled Themes use @package: WordPress and @subpackage Theme-Name, because they are packaged and distributed with WordPress itself
  • All other Themes use @package: Theme-Name, because they are packaged and distributed separately from WordPress.

All Themes are an abstraction layer of WordPress itself, and rely on WordPress in order to be output. But that dependency doesn’t make them a @subpackage of WordPress.

I would apply this rule to Child Themes as well. They are a stand-alone package, packaged and distributed separately from the Parent/Template Theme on which they rely.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *