Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#45416 closed enhancement (fixed)

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

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

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 6 years ago.
45416.2.patch (1.1 KB) - added by mukesh27 6 years 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 6 years ago.
Convert tab to space as suggested by @desrosj

Download all attachments as: .zip

Change History (11)

#1 @mukesh27
6 years ago

  • Focuses docs added

@ishitaka
6 years ago

@mukesh27
6 years 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.


6 years ago

#3 @desrosj
6 years 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
6 years ago

Convert tab to space as suggested by @desrosj

#4 @desrosj
6 years ago

  • Keywords commit added

#5 @pento
6 years ago

  • Milestone changed from 5.0.1 to 5.0.2

#6 @pento
6 years ago

  • Milestone changed from 5.0.2 to 5.0.3

#7 @audrasjb
6 years 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
6 years 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.