Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#38249 closed enhancement (fixed)

Improvements to docblock descriptions of query template functions

Reported by: johnbillion Owned by: morganestes
Priority: normal Milestone: 4.7
Component: Themes Version:
Severity: normal Keywords: has-patch commit
Cc: Focuses: docs

Description

The docblock descriptions for the various get_*_template() functions are not very clear, and some are incorrect. The overly verbose descriptions would be better replaced by lists and examples.

Some @since tags are also missing.

Attachments (4)

38249.patch​ (8.0 KB ) - added by johnbillion 10 years ago.
38249.diff​ (8.2 KB ) - added by morganestes 10 years ago.
38249.2.diff​ (8.6 KB ) - added by morganestes 10 years ago.
38249.3.diff​ (10.6 KB ) - added by morganestes 10 years ago.

Download all attachments as: .zip

Change History (9)

#1 @johnbillion
10 years ago

  • Keywords has-patch dev-feedback added

#2 @morganestes
10 years ago

  • Owner set to morganestes
  • Status new → assigned

These changes look good to me. It's a lot more clear about how hierarchy works, without having to read through a chart for each type.

Are CPTs handled in the single-{post_type}.php template hierarchy, and if so, should they be specifically mentioned?

#3 @morganestes
10 years ago

  • Keywords commit added; dev-feedback removed

Updated the patch with 38249.diff​ to fix the indentation of the ordered lists in the docs to match the
​Coding Standards for descriptions. Also tweaked the page template hierarchy docs to make it more clear that the first one is the filename, not the template name.

#4 @morganestes
10 years ago

Ignore 38249.2.diff​ and 38249.3.diff​. They got added during testing of grunt-patch-wordpress and I can't remove them.

#5 @johnbillion
10 years ago

  • Resolution → fixed
  • Status assigned → closed

In 38789:

Themes: Improve the inline documentation for the get_*_template() functions by providing examples instead of verbose explanations.

Fixes #38249
See #37770

Note: See TracTickets for help on using tickets.