3
3
* Customize Section Class.
5
* A UI container for controls, managed by the WP_Customize_Manager.
6
8
* @subpackage Customize
9
11
class WP_Customize_Section {
14
* WP_Customize_Manager instance.
18
* @var WP_Customize_Manager
12
public $priority = 10;
13
public $capability = 'edit_theme_options';
32
* Priority of the section which informs load order of sections.
38
public $priority = 10;
41
* Capability required for the section.
47
public $capability = 'edit_theme_options';
50
* Theme feature support for the section.
14
56
public $theme_supports = '';
16
public $description = '';
59
* Title of the section to show in UI.
68
* Description to show in the UI.
74
public $description = '';
77
* Customizer controls for this section.
88
* Any supplied $args override class property defaults.
24
* @param WP_Customize_Manager $manager
25
* @param string $id An specific ID of the section.
26
* @param array $args Section arguments.
92
* @param WP_Customize_Manager $manager Customizer bootstrap instance.
93
* @param string $id An specific ID of the section.
94
* @param array $args Section arguments.
28
96
function __construct( $manager, $id, $args = array() ) {
29
97
$keys = array_keys( get_class_vars( __CLASS__ ) );
66
135
if ( ! $this->check_capabilities() )
139
* Fires before rendering a Customizer section.
143
* @param WP_Customize_Section $this WP_Customize_Section instance.
69
145
do_action( 'customize_render_section', $this );
70
do_action( 'customize_render_section_' . $this->id );
147
* Fires before rendering a specific Customizer section.
149
* The dynamic portion of the hook name, $this->id, refers to the ID
150
* of the specific Customizer section to be rendered.
154
do_action( "customize_render_section_{$this->id}" );
160
* Render the section, and the controls that have been added to it.