WordPress.org

Make WordPress Core

Opened 2 months ago

Closed 10 days ago

#41592 closed defect (bug) (fixed)

Correct $wp_registered_widget_controls global reference in wp_register_sidebar_widget()

Reported by: upadalavipul Owned by: obenland
Milestone: 4.9 Priority: normal
Severity: normal Version:
Component: Widgets Keywords:
Focuses: docs Cc:

Description

the function in define global variable is $wp_registered_widget_controls but comments in define$wp_register_widget_defaults

Attachments (1)

41592.patch (578 bytes) - added by upadalavipul 2 months ago.

Download all attachments as: .zip

Change History (3)

@upadalavipul
2 months ago

#1 @SergeyBiryukov
2 months ago

  • Component changed from General to Widgets
  • Milestone changed from Awaiting Review to 4.9
  • Summary changed from needs documents improvement to Correct $wp_registered_widget_controls global reference in wp_register_sidebar_widget()

Introduced in [30776]. Looks like $wp_register_widget_defaults never existed. The description should probably be updated as well.

@upadalavipul Thanks for the patch! In the future, it would be helpful to provide a more descriptive summary when creating Trac tickets. "Needs documents improvement" is exceptionally vague :)

I've gone ahead and updated the summary here to demonstrate what you should be aiming for.

Last edited 2 months ago by SergeyBiryukov (previous) (diff)

#2 @obenland
10 days ago

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

In 41798:

Widgets: Update globals documentation.

It doesn't look like wp_register_sidebar_widget() ever used a global named $wp_register_widget_defaults. It does however make use of $wp_registered_widget_controls now.

See [8960], [30776].

Props upadalavipul.
Fixes #41592.

Note: See TracTickets for help on using tickets.