WordPress.org

Make WordPress Core

#45416 closed enhancement (fixed)

Docs: PHPDoc correction in wp-admin/includes/misc.php

Reported by: ishitaka Owned by: desrosj
Milestone: 5.1 Priority: normal
Severity: minor Version: 4.9.6
Component: Privacy Keywords: has-patch commit
Focuses: docs Cc:
PR Number:

Description

For wp_get_default_privacy_policy_content filter, the parameter type should be added first and then the parameter name.

Currently

@param $content     string The default policy content.
@param $strings     array  An array of privacy policy content strings.
@param $description bool   Whether policy descriptions should be included.
@param $blocks      bool   Whether the content should be formatted for the block editor.

Should be

@param string $content     The default policy content.
@param array  $strings     An array of privacy policy content strings.
@param bool   $description Whether policy descriptions should be included.
@param bool   $blocks      Whether the content should be formatted for the block editor.

Attachments (3)

45416.patch (474 bytes) - added by ishitaka 13 months ago.
45416.2.patch (1.1 KB) - added by mukesh27 13 months ago.
@ishitaka patch that is added by you is created from old version of WordPress. I have added working patch
45416.3.patch (1.1 KB) - added by mukesh27 13 months ago.
Convert tab to space as suggested by @desrosj

Download all attachments as: .zip

Change History (11)

#1 @mukesh27
13 months ago

  • Focuses docs added

@ishitaka
13 months ago

@mukesh27
13 months ago

@ishitaka patch that is added by you is created from old version of WordPress. I have added working patch

This ticket was mentioned in Slack in #core-privacy by desrosj. View the logs.


13 months ago

#3 @desrosj
13 months ago

  • Milestone changed from Awaiting Review to 5.0.1
  • Version set to 4.9.6

Thanks for the patches! 45416.2.patch applies to the 5.0 branch for me. When committed, there is a tab after string $content that just needs to be converted to spaces.

@mukesh27
13 months ago

Convert tab to space as suggested by @desrosj

#4 @desrosj
13 months ago

  • Keywords commit added

#5 @pento
12 months ago

  • Milestone changed from 5.0.1 to 5.0.2

#6 @pento
12 months ago

  • Milestone changed from 5.0.2 to 5.0.3

#7 @audrasjb
11 months ago

  • Milestone changed from 5.0.3 to 5.1

Hi,

Per today's bug scrub, we are going to address Docs enhancements in 5.1, coming next month.

#8 @desrosj
11 months ago

  • Owner set to desrosj
  • Resolution set to fixed
  • Status changed from new to closed

In 44475:

Docs: Fix order of parameter type and variable name.

The order of the type and variable name in the param tags for the wp_get_default_privacy_policy_content filter is incorrectly reversed. This moves the two into the correct order.

Props ishitaka, mukesh27.
Fixes #45416.

Note: See TracTickets for help on using tickets.