Make WordPress Core

Opened 3 weeks ago

Closed 3 weeks ago

Last modified 3 weeks ago

#61645 closed defect (bug) (fixed)

Wrong default value for _wp_preview_meta_filter() parameter

Reported by: rodrigosprimo's profile rodrigosprimo Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.7 Priority: normal
Severity: normal Version:
Component: Revisions Keywords: has-patch
Focuses: docs Cc:

Description (last modified by SergeyBiryukov)

The function _wp_preview_meta_filter() was added as part of #20299. There is a small mistake in the docblock for the $single parameter. The docblock says that the default value for this parameter is false, but this parameter has no default value:

https://github.com/WordPress/wordpress-develop/blob/ad135d5f0ac9cf0494da92fcf4235672868a1ff4/src/wp-includes/revision.php#L1110

Change History (4)

This ticket was mentioned in PR #7023 on WordPress/wordpress-develop by @rodrigosprimo.


3 weeks ago
#1

  • Keywords has-patch added

Contrary to what was mentioned in the docblock, the $single parameter has no default value.

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

#2 @SergeyBiryukov
3 weeks ago

  • Description modified (diff)
  • Milestone changed from Awaiting Review to 6.7
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#3 @SergeyBiryukov
3 weeks ago

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

In 58717:

Docs: Correct documentation for _wp_preview_meta_filter().

The $single parameter is passed via the get_post_metadata filter and has no default value.

Includes minor code layout fixes for consistency with the formatting of other long conditionals in core.

Follow-up to [56714].

Props rodrigosprimo.
Fixes #61645.

@SergeyBiryukov commented on PR #7023:


3 weeks ago
#4

Thanks for the PR! Merged in r58717.

Note: See TracTickets for help on using tickets.