WordPress.org

Make WordPress Core

#38249 closed enhancement (fixed)

Improvements to docblock descriptions of query template functions

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

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 11 months ago.
38249.diff (8.2 KB) - added by morganestes 10 months ago.
38249.2.diff (8.6 KB) - added by morganestes 10 months ago.
38249.3.diff (10.6 KB) - added by morganestes 10 months ago.

Download all attachments as: .zip

Change History (9)

#1 @johnbillion
11 months ago

  • Keywords has-patch dev-feedback added

@johnbillion
11 months ago

#2 @morganestes
10 months ago

  • Owner set to morganestes
  • Status changed from new to 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?

@morganestes
10 months ago

#3 @morganestes
10 months 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 months 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 months ago

  • Resolution set to fixed
  • Status changed from assigned to 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.