#12695 closed task (blessed) (fixed)
Inline docs for Twenty Ten
Reported by: | nacin | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Inline Docs | Keywords: | has-patch |
Focuses: | Cc: |
Description
1) Document its functions.
2) Consider some PHP comments in various template files to explain certain things, as needed.
Attachments (13)
Change History (40)
#3
@
15 years ago
- Cc aaron@… added
- Keywords has-patch added; needs-patch removed
Added a first pass at documenting everything. The one I'm not very confident on is the long description of page.php . If someone else has a better idea for that I'm all ears.
#4
@
15 years ago
Attached file with tweaks to jorbin’s first pass (twentytendoc.3.diff).
Main changes:
- Demoted 2010 to
@subpackage
and added@package WordPress
. This is not because 2010 is bundled in the core distribution, but to allow references to core stuff via@uses
,@see
, etc. - Added
@since
in the formX.Y.Z
(to conform with core practice, where three levels are used). - Added file-level phpDoc to index.php.
#5
@
15 years ago
Added more inline documentation to twentyten_init with the goal of making understanding the easy of creating a child theme. Based on Demetris's tweaks to my first pass.
#7
@
15 years ago
(In [13886]) Second pass on twentyten/functions.php inline documentation. see #12695. Also:
rename twentyten_init() to twentyten_setup(), to reflect the hook it is run on (init would be too late, it must be after_setup_theme). Remove unnecessary twentyten_get_page_number() and transfer functionality to twentyten_the_page_number(). Remove the function_exists() wrappers from functions that are simply tied to a hook, as a better practice would be to remove the hook instead of plugging the function. For architecture changes, see #12748.
#9
@
15 years ago
I added a new patch that adjust @subpackage to Twenty_Ten based on the requirements from http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_tags.subpackage.pkg.html
Also adds some more inline documentation and @since for both WordPress and Twenty Ten
#17
@
14 years ago
Last commit added explanatory and conversational inline documentation throughout the template files. It also made some other changes:
- Give attachment.php, page.php, onecolumn-page, etc. valid loops. Previously done for single.php: [14476].
- Switch @since to a Twenty Ten-specific version. Done previously for functions.php in [14698].
- Don't use the_post/rewind_posts hack in tag.php, we don't need it for single_tag_title.
- Remove erroneous argument to the_excerpt(). See also #13361, which I'll be taking up.
Closing as fixed. Re-open if I break something. Thanks everyone for your help.
#19
@
14 years ago
Okay, looking through the patches in the ticket now to see if anything was missed. Sorry Aaron especially, I didn't see some of these (and independently made the @since and @subpackage calls today).
I see some good comments in some of these I want to add. I will go through these tomorrow.
@
14 years ago
Refresh patch. Corrected various end / closing comment. Extra: adds padding to class nopassword.
#21
@
14 years ago
Added a patch that makes sure every </div> that is not on the same line as the opening <div> is commented and other general improvements.
#22
@
14 years ago
Reviewing this, will clean it up and check it in.
I personally hate the closing div comments in general, but I understand the need for them. That said, I purposely haven't added them (in fact I've removed them) when the content between them -- both in PHP, and what the PHP might generate in terms of markup -- is small. (If the_content() for example is between them, then I'd leave it in.)
#23
@
14 years ago
I'm not a huge fan of them, but I think it's important to be consistent and that some themers would find them useful, hence why I cleaned up / added the last of the remaining ones.
(In [13816]) Switch to get_template_part Fixes #12371. Try on some narrative comments for size see #12695.