mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-07 14:14:36 +00:00
Customizer: Mixed priority sorting for panels and top-level sections.
props celloexpressions. fixes #28979. git-svn-id: https://develop.svn.wordpress.org/trunk@29488 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -43,10 +43,11 @@ final class WP_Customize_Manager {
|
||||
*/
|
||||
public $widgets;
|
||||
|
||||
protected $settings = array();
|
||||
protected $panels = array();
|
||||
protected $sections = array();
|
||||
protected $controls = array();
|
||||
protected $settings = array();
|
||||
protected $containers = array();
|
||||
protected $panels = array();
|
||||
protected $sections = array();
|
||||
protected $controls = array();
|
||||
|
||||
protected $nonce_tick;
|
||||
|
||||
@@ -305,6 +306,17 @@ final class WP_Customize_Manager {
|
||||
return $this->controls;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the registered containers.
|
||||
*
|
||||
* @since 4.0.0
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function containers() {
|
||||
return $this->containers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the registered sections.
|
||||
*
|
||||
@@ -891,6 +903,10 @@ final class WP_Customize_Manager {
|
||||
$panels[] = $panel;
|
||||
}
|
||||
$this->panels = $panels;
|
||||
|
||||
// Sort panels and top-level sections together.
|
||||
$this->containers = array_merge( $this->panels, $this->sections );
|
||||
uasort( $this->containers, array( $this, '_cmp_priority' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user