• Anyone know what the

    /**
     * @package WordPress
     * @subpackage Default_Theme
     */

    lines do that are at the top of each WP2.7 Kubrick theme file?

Viewing 13 replies - 1 through 13 (of 13 total)
  • those are commented out and do nothing but describe

    you should ask yourself from where you downloaded your theme. there are some sites out there hacking good themes and redistributing theme with there own links and other stuff inside…

    Thread Starter churchthemer

    (@churchthemer)

    @samboll
    –WordPress page templates rely on commented code in order for them to appear as a page template option in the back end.

    –Themes rely on commented code in the style.css file in order to appear as themes in the backend.

    So, my question was, does this commented code affect anything with the way WordPress sees the theme, will it in the future when (and if) themes are able to be downloaded directly through the backend?

    @f J Kaiser
    This was downloaded from WordPress.org and is in the default Kubrick theme.

    So, my question was, does this commented code affect anything with the way WordPress sees the theme, will it in the future when (and if) themes are able to be downloaded directly through the backend?

    sorry – misunderstood.
    Actually I have no idea.
    maybe someone will have a better answer – also, you might want to ask this of the wp-hackers list.

    churchthemer, these are code comments in the PHPDoc notation. See:

    http://en.wikipedia.org/wiki/PHPDoc

    I don’t think they affect the way in which WordPress files interact with each other in a WordPress installation.

    Thread Starter churchthemer

    (@churchthemer)

    Thanks demetris. Hadn’t heard of DocBlock before. From the wiki:

    @package
    –name of a package
    –Documents a group of related classes and functions.

    @subpackage
    — none
    — none

    Interesting stuff. I wonder where/why WordPress will be displaying DocBlock descriptions for each file in a theme group. I guess for now while developing 2.7 themes the safest thing to do would be:

    * @package WordPress
    * @subpackage Theme_Name

    or should we not be including DocBlocks in new wp2.7 themes?

    I think http://codex.wordpress.org/Inline_Documentation#PHPdoc_Tags and http://codex.wordpress.org/Theme_Development need to be updated to reflect the presence of PHPdoc tags in template files in the default 2.7 theme.

    At the moment, it’s unclear whether theme writers ought to be putting them into new themes, and if so, whether the new themes count as “external libraries” or not. If they do, then according to http://codex.wordpress.org/Inline_Documentation#PHPdoc_Tags they should not use “@package WordPress”. But if they don’t, then they should use “@package WordPress”.

    I think we need some clarification from the core WP developers/hackers on this.

    NB. Ideally, the devs/hackers should update the Codex to reflect changes to the core distribution, but they clearly don’t do this reliably (sigh), which can lead to this kind of confusion among the rest of the community, delaying the adoption of new features.

    Just went about hunting what these are for myself…

    Agree an update to the docs would be most helpful…

    I’m actually starting to incorporate PHPDoc into my themes, but I’m trying to figure out whether I should use one of these two:

    /**
    * @package Theme_Name
    * @subpackage Template
    */

    Or:

    /**
    * @package WordPress
    * @subpackage Theme_Name
    */

    I prefer the former over the latter because the theme itself has loads of files. But, I’d like to get some expert advice on the proper use.

    This bit of line is in pretty much every .php file of mine.
    I started out with the WordPress default theme Kubrick and basically created my own theme. I never touched the

    /**
    * @package WordPress
    * @subpackage Theme_Name
    */

    because I did not know what it would do.
    Should I replace either one with my own theme name?

    I’m a little confused on this too, however…

    Plugin authors must not use the @package WordPress in their plugins. The package name can be anything known to be unique and can be the plugin name.

    I have begin a deep investigation of WordPress. To help in my journey I have created the complete WordPress codebase in phpDoc. This is generated each night from the current SVN code base.

    I hope you find it helpful.

    http://www.walters-way.com/wordpress_api/

    As for Templates and phpDoc, I would like to suggest a standard…

    /**
     * @package WordPress_Themes
     * @subpackage Theme_Name
     */

    Even the default and classic themes should be changed to this format. This ensures all themes are collected into a single set of documentation when phpDoc is ran and the files are generated.

    Just my 2-cents.

    Walter

    I would assume that @package WordPress would be for anything included with the original download only (which includes Kubrick, and hello dolly for example) but not anything else.

    However, since I read that Themes are GPL due to dependency on, and integration with, WordPress core (and therefor not considered independent), perhaps it is appropriate to use @package WordPress for all themes, with a subpackage of its unique theme name.

    Plugins seem to not be affected by WP’s GPL (or atleast not mentioned in that particular discussion) and perhaps that’s why they must not use @package WordPress.

    Walter’s suggestion would be the most desirable in my opinion, and I’m hoping for core dev feedback on this.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘@package and @subpackage’ is closed to new replies.