Make WordPress Core

Opened 20 months ago

Closed 20 months ago

Last modified 20 months ago

#55499 closed enhancement (fixed)

$pagenow is used but not define in documentation of this function add_customize_screen_to_heartbeat_settings()

Reported by: jontyravi's profile jontyravi Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.0 Priority: normal
Severity: normal Version: 4.9
Component: Customize Keywords: has-patch needs-refresh
Focuses: docs Cc:

Description

global $pagenow is used add_customize_screen_to_heartbeat_settings($settings) in this function. But it is not mentioned in the documentation of the function.

Attachments (3)

55499.patch (445 bytes) - added by jontyravi 20 months ago.
I have added patch of this ticket
55499.2.patch (443 bytes) - added by jontyravi 20 months ago.
55499.3.diff (738 bytes) - added by bhrugesh12 20 months ago.

Download all attachments as: .zip

Change History (9)

@jontyravi
20 months ago

I have added patch of this ticket

@jontyravi
20 months ago

#1 @bhrugesh12
20 months ago

  • Type changed from defect (bug) to enhancement

Add doc comment for $global variable $pagenow. Find the latest attachment.

@bhrugesh12
20 months ago

#2 @kebbet
20 months ago

  • Keywords needs-refresh added

A search for string $pagenow in the src-directory gives that global variables should be declared between the since-tag and the param-tags in the docblock.

Something like

* Filters heartbeat settings for the Customizer.
*
* @since 4.9.0
*
* @global string $pagenow Description
*
* @param array $settings Current settings to filter.

#3 @kebbet
20 months ago

  • Version changed from 5.8 to 4.9

#4 @SergeyBiryukov
20 months ago

  • Component changed from General to Customize
  • Milestone changed from Awaiting Review to 6.0

Hi there, thanks for the patches!

I think we should add the missing @global tag but may want to skip the description for now, as this global is also used in other methods of the same class, as well as many other areas of core, and should probably have a consistent description everywhere.

#5 @SergeyBiryukov
20 months ago

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

In 53059:

Docs: Consistently document the $pagenow global in WP_Customize_Manage methods.

Follow-up to [41839].

Props jontyravi, bhrugesh12, kebbet.
Fixes #55499.

#6 @SergeyBiryukov
20 months ago

In 53060:

Docs: Add missing description for $pagenow global in various functions.

See #54729, #55499.

Note: See TracTickets for help on using tickets.