Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#35354 closed enhancement (fixed)

Make the Customizer components list reusable

Reported by: drewapicture's profile DrewAPicture Owned by: westonruter's profile westonruter
Milestone: 4.5 Priority: normal
Severity: normal Version:
Component: Customize Keywords: has-patch
Focuses: Cc:

Description

In #35242, logic was added to WP_Customize_Manager->remove_panel() that leverages a list of the default components to toss a _doing_it_wrong() notice. We also use similar list with the customize_loaded_components hook in the constructor. So I think we should make the list reusable to keep the information all in one place.

Patch attached.

Attachments (1)

35354.diff (1.9 KB) - added by DrewAPicture 9 years ago.

Download all attachments as: .zip

Change History (4)

@DrewAPicture
9 years ago

This ticket was mentioned in Slack in #core-customize by drew. View the logs.


9 years ago

#2 @DrewAPicture
9 years ago

  • Milestone changed from Awaiting Review to 4.5
  • Owner set to westonruter
  • Status changed from new to assigned

#3 @westonruter
9 years ago

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

In 36262:

Customizer: Re-use list of components to eliminate code duplication.

Introduces protected WP_Customize_Manager::$components to store list of loaded core components filtered by customize_loaded_components.

Props DrewAPicture.
See #35242
See #33552.
Fixes #35354.

Note: See TracTickets for help on using tickets.