Make WordPress Core

Opened 7 months ago

Closed 6 months ago

Last modified 6 months ago

#58972 closed defect (bug) (fixed)

Doc block on function reference for page_template_dropdown is incorrect

Reported by: maxinacube's profile maxinacube Owned by: audrasjb's profile audrasjb
Milestone: 6.4 Priority: normal
Severity: minor Version: 4.7
Component: Text Changes Keywords: has-patch
Focuses: docs Cc:

Description

Within the doc block for the page_template_dropdown function in wp-admin/includes/template.php it states that the default value for $post_type is "post" while the parameter on the function sets the default the value for $post_type to "page".

Attachments (1)

58972.diff (771 bytes) - added by dhruvishah2203 7 months ago.

Download all attachments as: .zip

Change History (8)

This ticket was mentioned in PR #4962 on WordPress/wordpress-develop by maxinacube.


7 months ago
#1

  • Keywords has-patch added

The doc block for the page_template_dropdown function lists the default $post_type as "post", while the parameter on the function is sets the default $post_type to "page".

This PR reflects the proper default value of $post_type in the doc block.

Trac ticket: https://core.trac.wordpress.org/ticket/58972

#2 @audrasjb
7 months ago

  • Owner set to audrasjb
  • Status changed from new to reviewing

This ticket was mentioned in Slack in #core by priethor. View the logs.


7 months ago

#4 @johnbillion
7 months ago

  • Version changed from trunk to 4.7

#5 @SergeyBiryukov
7 months ago

  • Milestone changed from Awaiting Review to 6.4

Hi there, thanks for the ticket and the PR! Introduced in [38951] / #18375.

#6 @audrasjb
6 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 56441:

Docs: Correct default post type in page_template_dropdown() docblock.

The default post type used by page_template_dropdown() is page, not post.

Props maxinacube.
Fixes #58972.
See #58833.

@audrasjb commented on PR #4962:


6 months ago
#7

committed in 56441

Note: See TracTickets for help on using tickets.