run:R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
23.8 KB
2026-03-11 16:18:51
R W Run
7.8 KB
2026-03-11 16:18:52
R W Run
36.1 KB
2026-03-11 16:18:51
R W Run
11.9 KB
2026-03-11 16:18:52
R W Run
18.94 KB
2026-03-11 16:18:52
R W Run
7.35 KB
2026-03-11 16:18:52
R W Run
28.6 KB
2026-03-11 16:18:51
R W Run
316 By
2026-03-11 16:18:51
R W Run
12.9 KB
2026-03-11 16:18:51
R W Run
61.02 KB
2026-03-11 16:18:52
R W Run
15 KB
2026-03-11 16:18:51
R W Run
112.05 KB
2026-03-11 16:18:51
R W Run
12.47 KB
2026-03-11 16:18:51
R W Run
15.07 KB
2026-03-11 16:18:52
R W Run
9.84 KB
2026-03-11 16:18:52
R W Run
13.17 KB
2026-03-11 16:18:52
R W Run
33.83 KB
2026-03-11 16:18:51
R W Run
42.63 KB
2026-03-11 16:18:51
R W Run
55.71 KB
2026-03-11 16:18:52
R W Run
12.53 KB
2026-03-11 16:18:51
R W Run
2.55 KB
2026-03-11 16:18:52
R W Run
28.92 KB
2026-03-11 16:18:52
R W Run
539 By
2026-03-11 16:18:51
R W Run
367 By
2026-03-11 16:18:52
R W Run
42.65 KB
2026-03-11 16:18:51
R W Run
401 By
2026-03-11 16:18:51
R W Run
6.61 KB
2026-03-11 16:18:51
R W Run
664 By
2026-03-11 16:18:52
R W Run
20.63 KB
2026-03-11 16:18:51
R W Run
2.18 KB
2026-03-11 16:18:52
R W Run
453 By
2026-03-11 16:18:52
R W Run
457 By
2026-03-11 16:18:51
R W Run
36.83 KB
2026-03-11 16:18:52
R W Run
2.41 KB
2026-03-11 16:18:52
R W Run
8.28 KB
2026-03-11 16:18:51
R W Run
13.89 KB
2026-03-11 16:18:51
R W Run
11.76 KB
2026-03-11 16:18:51
R W Run
2.65 KB
2026-03-11 16:18:51
R W Run
7.43 KB
2026-03-11 16:18:51
R W Run
17.46 KB
2026-03-11 16:18:51
R W Run
5.14 KB
2026-03-11 16:18:52
R W Run
16.7 KB
2026-03-11 16:18:51
R W Run
8.28 KB
2026-03-11 16:18:52
R W Run
2.92 KB
2026-03-11 16:18:52
R W Run
1.32 KB
2026-03-11 16:18:51
R W Run
4.6 KB
2026-03-11 16:18:52
R W Run
11.62 KB
2026-03-11 16:18:52
R W Run
2.5 KB
2026-03-11 16:18:51
R W Run
1.97 KB
2026-03-11 16:18:51
R W Run
11.25 KB
2026-03-11 16:18:52
R W Run
5.32 KB
2026-03-11 16:18:51
R W Run
10.99 KB
2026-03-11 16:18:52
R W Run
68.32 KB
2026-03-11 16:18:51
R W Run
6.34 KB
2026-03-11 16:18:51
R W Run
5.49 KB
2026-03-11 16:18:51
R W Run
1.99 KB
2026-03-11 16:18:52
R W Run
7.02 KB
2026-03-11 16:18:51
R W Run
4.91 KB
2026-03-11 16:18:52
R W Run
16.86 KB
2026-03-11 16:18:51
R W Run
24.23 KB
2026-03-11 16:18:51
R W Run
3.97 KB
2026-03-11 16:18:51
R W Run
47.66 KB
2026-03-11 16:18:51
R W Run
9.22 KB
2026-03-11 16:18:51
R W Run
25.51 KB
2026-03-11 16:18:51
R W Run
198.38 KB
2026-03-11 16:18:52
R W Run
56.65 KB
2026-03-11 16:18:51
R W Run
10.46 KB
2026-03-11 16:18:51
R W Run
10.95 KB
2026-03-11 16:18:52
R W Run
29.26 KB
2026-03-11 16:18:51
R W Run
70.91 KB
2026-03-11 16:18:52
R W Run
35.3 KB
2026-03-11 16:18:52
R W Run
16.61 KB
2026-03-11 16:18:52
R W Run
2.57 KB
2026-03-11 16:18:52
R W Run
39.83 KB
2026-03-11 16:18:51
R W Run
70.64 KB
2026-03-11 16:18:51
R W Run
15.56 KB
2026-03-11 16:18:52
R W Run
7.33 KB
2026-03-11 16:18:52
R W Run
253 By
2026-03-11 16:18:51
R W Run
7.96 KB
2026-03-11 16:18:52
R W Run
3.23 KB
2026-03-11 16:18:52
R W Run
969 By
2026-03-11 16:18:52
R W Run
16.28 KB
2026-03-11 16:18:51
R W Run
7.22 KB
2026-03-11 16:18:51
R W Run
12.95 KB
2026-03-11 16:18:51
R W Run
6.53 KB
2026-03-11 16:18:51
R W Run
3.42 KB
2026-03-11 16:18:52
R W Run
5.84 KB
2026-03-11 16:18:51
R W Run
1.97 KB
2026-03-11 16:18:51
R W Run
4.3 KB
2026-03-11 16:18:52
R W Run
2.91 KB
2026-03-11 16:18:51
R W Run
16.46 KB
2026-03-11 16:18:52
R W Run
40.6 KB
2026-03-11 16:18:51
R W Run
20.22 KB
2026-03-11 16:18:51
R W Run
36.11 KB
2026-03-11 16:18:52
R W Run
17.01 KB
2026-03-11 16:18:51
R W Run
7.27 KB
2026-03-11 16:18:52
R W Run
6.62 KB
2026-03-11 16:18:52
R W Run
16.49 KB
2026-03-11 16:18:52
R W Run
1.79 KB
2026-03-11 16:18:52
R W Run
29.82 KB
2026-03-11 16:18:51
R W Run
6.67 KB
2026-03-11 16:18:52
R W Run
8.98 KB
2026-03-11 16:18:52
R W Run
19.42 KB
2026-03-11 16:18:51
R W Run
12.01 KB
2026-03-11 16:18:51
R W Run
17.11 KB
2026-03-11 16:18:51
R W Run
6.74 KB
2026-03-11 16:18:52
R W Run
30.93 KB
2026-03-11 16:18:51
R W Run
4.99 KB
2026-03-11 16:18:51
R W Run
4.25 KB
2026-03-11 16:18:51
R W Run
24.72 KB
2026-03-11 16:18:51
R W Run
29.96 KB
2026-03-11 16:18:52
R W Run
6.41 KB
2026-03-11 16:18:51
R W Run
160 KB
2026-03-11 16:18:51
R W Run
6.72 KB
2026-03-11 16:18:52
R W Run
10.92 KB
2026-03-11 16:18:51
R W Run
4.77 KB
2026-03-11 16:18:51
R W Run
3.38 KB
2026-03-11 16:18:51
R W Run
11.18 KB
2026-03-11 16:18:51
R W Run
62.19 KB
2026-03-11 16:18:51
R W Run
2.46 KB
2026-03-11 16:18:51
R W Run
9.17 KB
2026-03-11 16:18:51
R W Run
32.15 KB
2026-03-11 16:18:51
R W Run
34.05 KB
2026-03-11 16:18:52
R W Run
7.15 KB
2026-03-11 16:18:51
R W Run
3.47 KB
2026-03-11 16:18:52
R W Run
1.87 KB
2026-03-11 16:18:52
R W Run
30.91 KB
2026-03-11 16:18:51
R W Run
7.29 KB
2026-03-11 16:18:52
R W Run
7.35 KB
2026-03-11 16:18:51
R W Run
12.54 KB
2026-03-11 16:18:51
R W Run
19.12 KB
2026-03-11 16:18:51
R W Run
18.12 KB
2026-03-11 16:18:52
R W Run
39.99 KB
2026-03-11 16:18:52
R W Run
5.17 KB
2026-03-11 16:18:52
R W Run
979 By
2026-03-11 16:18:51
R W Run
18.44 KB
2026-03-11 16:18:52
R W Run
10.24 KB
2026-03-11 16:18:51
R W Run
1.77 KB
2026-03-11 16:18:52
R W Run
34.9 KB
2026-03-11 16:18:51
R W Run
7.19 KB
2026-03-11 16:18:52
R W Run
160.5 KB
2026-03-11 16:18:51
R W Run
64.27 KB
2026-03-11 16:18:51
R W Run
27.95 KB
2026-03-11 16:18:51
R W Run
4.69 KB
2026-03-11 16:18:51
R W Run
2.94 KB
2026-03-11 16:18:51
R W Run
43.13 KB
2026-03-11 16:18:52
R W Run
2.25 KB
2026-03-11 16:18:52
R W Run
22.5 KB
2026-03-11 16:18:51
R W Run
13.01 KB
2026-03-11 16:18:52
R W Run
3.27 KB
2026-03-11 16:18:51
R W Run
18 KB
2026-03-11 16:18:51
R W Run
210.4 KB
2026-03-11 16:18:52
R W Run
25.86 KB
2026-03-11 16:18:52
R W Run
115.85 KB
2026-03-11 16:18:51
R W Run
373 By
2026-03-11 16:18:52
R W Run
343 By
2026-03-11 16:18:52
R W Run
338 By
2026-03-11 16:18:51
R W Run
100.73 KB
2026-03-11 16:18:52
R W Run
130.93 KB
2026-03-11 16:18:51
R W Run
19.1 KB
2026-03-11 16:18:51
R W Run
17.41 KB
2026-03-11 16:18:52
R W Run
41.98 KB
2026-03-11 16:18:52
R W Run
400 By
2026-03-11 16:18:52
R W Run
11.1 KB
2026-03-11 16:18:52
R W Run
37.02 KB
2026-03-11 16:18:51
R W Run
2.24 KB
2026-03-11 16:18:51
R W Run
188.13 KB
2026-03-11 16:18:51
R W Run
338 By
2026-03-11 16:18:51
R W Run
38 KB
2026-03-11 16:18:51
R W Run
4.02 KB
2026-03-11 16:18:52
R W Run
5.38 KB
2026-03-11 16:18:51
R W Run
3.05 KB
2026-03-11 16:18:52
R W Run
2.61 KB
2026-03-11 16:18:51
R W Run
1.16 KB
2026-03-11 16:18:52
R W Run
4.04 KB
2026-03-11 16:18:51
R W Run
3.71 KB
2026-03-11 16:18:51
R W Run
24.6 KB
2026-03-11 16:18:51
R W Run
9.56 KB
2026-03-11 16:18:51
R W Run
346.43 KB
2026-03-11 16:18:52
R W Run
281.84 KB
2026-03-11 16:18:52
R W Run
14.95 KB
2026-03-11 16:18:51
R W Run
8.44 KB
2026-03-11 16:18:52
R W Run
168.95 KB
2026-03-11 16:18:52
R W Run
20.71 KB
2026-03-11 16:18:52
R W Run
25.27 KB
2026-03-11 16:18:51
R W Run
5.72 KB
2026-03-11 16:18:51
R W Run
4.63 KB
2026-03-11 16:18:52
R W Run
81.73 KB
2026-03-11 16:18:51
R W Run
67.18 KB
2026-03-11 16:18:51
R W Run
156.36 KB
2026-03-11 16:18:52
R W Run
55.19 KB
2026-03-11 16:18:51
R W Run
162 By
2026-03-11 16:18:51
R W Run
61.72 KB
2026-03-11 16:18:51
R W Run
216.06 KB
2026-03-11 16:18:52
R W Run
65.09 KB
2026-03-11 16:18:51
R W Run
25.24 KB
2026-03-11 16:18:52
R W Run
4.81 KB
2026-03-11 16:18:51
R W Run
6.48 KB
2026-03-11 16:18:52
R W Run
21.25 KB
2026-03-11 16:18:51
R W Run
2.79 KB
2026-03-11 16:18:52
R W Run
89.69 KB
2026-03-11 16:18:52
R W Run
19.42 KB
2026-03-11 16:18:52
R W Run
3.69 KB
2026-03-11 16:18:52
R W Run
4.11 KB
2026-03-11 16:18:51
R W Run
40.74 KB
2026-03-11 16:18:51
R W Run
25.38 KB
2026-03-11 16:18:51
R W Run
43.31 KB
2026-03-11 16:18:52
R W Run
102.57 KB
2026-03-11 16:18:52
R W Run
6.18 KB
2026-03-11 16:18:51
R W Run
124.47 KB
2026-03-11 16:18:52
R W Run
35.65 KB
2026-03-11 16:18:52
R W Run
6.94 KB
2026-03-11 16:18:52
R W Run
67.04 KB
2026-03-11 16:18:52
R W Run
10.62 KB
2026-03-11 16:18:51
R W Run
289.35 KB
2026-03-11 16:18:52
R W Run
36.23 KB
2026-03-11 16:18:51
R W Run
200 By
2026-03-11 16:18:52
R W Run
200 By
2026-03-11 16:18:52
R W Run
98.29 KB
2026-03-11 16:18:52
R W Run
30.02 KB
2026-03-11 16:18:52
R W Run
19.03 KB
2026-03-11 16:18:52
R W Run
5.06 KB
2026-03-11 16:18:52
R W Run
255 By
2026-03-11 16:18:51
R W Run
22.66 KB
2026-03-11 16:18:52
R W Run
154.63 KB
2026-03-11 16:18:51
R W Run
9.68 KB
2026-03-11 16:18:51
R W Run
258 By
2026-03-11 16:18:51
R W Run
23.49 KB
2026-03-11 16:18:51
R W Run
3.16 KB
2026-03-11 16:18:51
R W Run
8.4 KB
2026-03-11 16:18:52
R W Run
441 By
2026-03-11 16:18:51
R W Run
7.39 KB
2026-03-11 16:18:51
R W Run
173 KB
2026-03-11 16:18:52
R W Run
544 By
2026-03-11 16:18:52
R W Run
4.17 KB
2026-03-11 16:18:51
R W Run
35.97 KB
2026-03-11 16:18:52
R W Run
1.69 KB
2026-03-11 16:18:51
R W Run
2.84 KB
2026-03-11 16:18:52
R W Run
6.09 KB
2026-03-11 16:18:51
R W Run
8.71 KB
2026-03-11 16:18:51
R W Run
131.84 KB
2026-03-11 16:18:51
R W Run
37.45 KB
2026-03-11 16:18:51
R W Run
173.89 KB
2026-03-11 16:18:51
R W Run
7.09 KB
2026-03-11 16:18:51
R W Run
6.41 KB
2026-03-11 16:18:51
R W Run
1.08 KB
2026-03-11 16:18:51
R W Run
69.46 KB
2026-03-11 16:18:52
R W Run
445 By
2026-03-11 16:18:51
R W Run
799 By
2026-03-11 16:18:52
R W Run
error_log
📄class-wp-customize-panel.php
1<?php
2/**
3 * WordPress Customize Panel classes
4 *
5 * @package WordPress
6 * @subpackage Customize
7 * @since 4.0.0
8 */
9
10// Don't load directly.
11if ( ! defined( 'ABSPATH' ) ) {
12 die( '-1' );
13}
14
15/**
16 * Customize Panel class.
17 *
18 * A UI container for sections, managed by the WP_Customize_Manager.
19 *
20 * @since 4.0.0
21 *
22 * @see WP_Customize_Manager
23 */
24#[AllowDynamicProperties]
25class WP_Customize_Panel {
26
27 /**
28 * Incremented with each new class instantiation, then stored in $instance_number.
29 *
30 * Used when sorting two instances whose priorities are equal.
31 *
32 * @since 4.1.0
33 * @var int
34 */
35 protected static $instance_count = 0;
36
37 /**
38 * Order in which this instance was created in relation to other instances.
39 *
40 * @since 4.1.0
41 * @var int
42 */
43 public $instance_number;
44
45 /**
46 * WP_Customize_Manager instance.
47 *
48 * @since 4.0.0
49 * @var WP_Customize_Manager
50 */
51 public $manager;
52
53 /**
54 * Unique identifier.
55 *
56 * @since 4.0.0
57 * @var string
58 */
59 public $id;
60
61 /**
62 * Priority of the panel, defining the display order of panels and sections.
63 *
64 * @since 4.0.0
65 * @var int
66 */
67 public $priority = 160;
68
69 /**
70 * Capability required for the panel.
71 *
72 * @since 4.0.0
73 * @var string
74 */
75 public $capability = 'edit_theme_options';
76
77 /**
78 * Theme features required to support the panel.
79 *
80 * @since 4.0.0
81 * @var mixed[]
82 */
83 public $theme_supports = '';
84
85 /**
86 * Title of the panel to show in UI.
87 *
88 * @since 4.0.0
89 * @var string
90 */
91 public $title = '';
92
93 /**
94 * Description to show in the UI.
95 *
96 * @since 4.0.0
97 * @var string
98 */
99 public $description = '';
100
101 /**
102 * Auto-expand a section in a panel when the panel is expanded when the panel only has the one section.
103 *
104 * @since 4.7.4
105 * @var bool
106 */
107 public $auto_expand_sole_section = false;
108
109 /**
110 * Customizer sections for this panel.
111 *
112 * @since 4.0.0
113 * @var array
114 */
115 public $sections;
116
117 /**
118 * Type of this panel.
119 *
120 * @since 4.1.0
121 * @var string
122 */
123 public $type = 'default';
124
125 /**
126 * Active callback.
127 *
128 * @since 4.1.0
129 *
130 * @see WP_Customize_Section::active()
131 *
132 * @var callable Callback is called with one argument, the instance of
133 * WP_Customize_Section, and returns bool to indicate whether
134 * the section is active (such as it relates to the URL currently
135 * being previewed).
136 */
137 public $active_callback = '';
138
139 /**
140 * Constructor.
141 *
142 * Any supplied $args override class property defaults.
143 *
144 * @since 4.0.0
145 *
146 * @param WP_Customize_Manager $manager Customizer bootstrap instance.
147 * @param string $id A specific ID for the panel.
148 * @param array $args {
149 * Optional. Array of properties for the new Panel object. Default empty array.
150 *
151 * @type int $priority Priority of the panel, defining the display order
152 * of panels and sections. Default 160.
153 * @type string $capability Capability required for the panel.
154 * Default `edit_theme_options`.
155 * @type mixed[] $theme_supports Theme features required to support the panel.
156 * @type string $title Title of the panel to show in UI.
157 * @type string $description Description to show in the UI.
158 * @type string $type Type of the panel.
159 * @type callable $active_callback Active callback.
160 * }
161 */
162 public function __construct( $manager, $id, $args = array() ) {
163 $keys = array_keys( get_object_vars( $this ) );
164 foreach ( $keys as $key ) {
165 if ( isset( $args[ $key ] ) ) {
166 $this->$key = $args[ $key ];
167 }
168 }
169
170 $this->manager = $manager;
171 $this->id = $id;
172 if ( empty( $this->active_callback ) ) {
173 $this->active_callback = array( $this, 'active_callback' );
174 }
175 self::$instance_count += 1;
176 $this->instance_number = self::$instance_count;
177
178 $this->sections = array(); // Users cannot customize the $sections array.
179 }
180
181 /**
182 * Check whether panel is active to current Customizer preview.
183 *
184 * @since 4.1.0
185 *
186 * @return bool Whether the panel is active to the current preview.
187 */
188 final public function active() {
189 $panel = $this;
190 $active = call_user_func( $this->active_callback, $this );
191
192 /**
193 * Filters response of WP_Customize_Panel::active().
194 *
195 * @since 4.1.0
196 *
197 * @param bool $active Whether the Customizer panel is active.
198 * @param WP_Customize_Panel $panel WP_Customize_Panel instance.
199 */
200 $active = apply_filters( 'customize_panel_active', $active, $panel );
201
202 return $active;
203 }
204
205 /**
206 * Default callback used when invoking WP_Customize_Panel::active().
207 *
208 * Subclasses can override this with their specific logic, or they may
209 * provide an 'active_callback' argument to the constructor.
210 *
211 * @since 4.1.0
212 *
213 * @return bool Always true.
214 */
215 public function active_callback() {
216 return true;
217 }
218
219 /**
220 * Gather the parameters passed to client JavaScript via JSON.
221 *
222 * @since 4.1.0
223 *
224 * @return array The array to be exported to the client as JSON.
225 */
226 public function json() {
227 $array = wp_array_slice_assoc( (array) $this, array( 'id', 'description', 'priority', 'type' ) );
228 $array['title'] = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) );
229 $array['content'] = $this->get_content();
230 $array['active'] = $this->active();
231 $array['instanceNumber'] = $this->instance_number;
232 $array['autoExpandSoleSection'] = $this->auto_expand_sole_section;
233 return $array;
234 }
235
236 /**
237 * Checks required user capabilities and whether the theme has the
238 * feature support required by the panel.
239 *
240 * @since 4.0.0
241 * @since 5.9.0 Method was marked non-final.
242 *
243 * @return bool False if theme doesn't support the panel or the user doesn't have the capability.
244 */
245 public function check_capabilities() {
246 if ( $this->capability && ! current_user_can( $this->capability ) ) {
247 return false;
248 }
249
250 if ( $this->theme_supports && ! current_theme_supports( ...(array) $this->theme_supports ) ) {
251 return false;
252 }
253
254 return true;
255 }
256
257 /**
258 * Get the panel's content template for insertion into the Customizer pane.
259 *
260 * @since 4.1.0
261 *
262 * @return string Content for the panel.
263 */
264 final public function get_content() {
265 ob_start();
266 $this->maybe_render();
267 return trim( ob_get_clean() );
268 }
269
270 /**
271 * Check capabilities and render the panel.
272 *
273 * @since 4.0.0
274 */
275 final public function maybe_render() {
276 if ( ! $this->check_capabilities() ) {
277 return;
278 }
279
280 /**
281 * Fires before rendering a Customizer panel.
282 *
283 * @since 4.0.0
284 *
285 * @param WP_Customize_Panel $panel WP_Customize_Panel instance.
286 */
287 do_action( 'customize_render_panel', $this );
288
289 /**
290 * Fires before rendering a specific Customizer panel.
291 *
292 * The dynamic portion of the hook name, `$this->id`, refers to
293 * the ID of the specific Customizer panel to be rendered.
294 *
295 * @since 4.0.0
296 */
297 do_action( "customize_render_panel_{$this->id}" );
298
299 $this->render();
300 }
301
302 /**
303 * Render the panel container, and then its contents (via `this->render_content()`) in a subclass.
304 *
305 * Panel containers are now rendered in JS by default, see WP_Customize_Panel::print_template().
306 *
307 * @since 4.0.0
308 */
309 protected function render() {}
310
311 /**
312 * Render the panel UI in a subclass.
313 *
314 * Panel contents are now rendered in JS by default, see WP_Customize_Panel::print_template().
315 *
316 * @since 4.1.0
317 */
318 protected function render_content() {}
319
320 /**
321 * Render the panel's JS templates.
322 *
323 * This function is only run for panel types that have been registered with
324 * WP_Customize_Manager::register_panel_type().
325 *
326 * @since 4.3.0
327 *
328 * @see WP_Customize_Manager::register_panel_type()
329 */
330 public function print_template() {
331 ?>
332 <script type="text/html" id="tmpl-customize-panel-<?php echo esc_attr( $this->type ); ?>-content">
333 <?php $this->content_template(); ?>
334 </script>
335 <script type="text/html" id="tmpl-customize-panel-<?php echo esc_attr( $this->type ); ?>">
336 <?php $this->render_template(); ?>
337 </script>
338 <?php
339 }
340
341 /**
342 * An Underscore (JS) template for rendering this panel's container.
343 *
344 * Class variables for this panel class are available in the `data` JS object;
345 * export custom variables by overriding WP_Customize_Panel::json().
346 *
347 * @see WP_Customize_Panel::print_template()
348 *
349 * @since 4.3.0
350 */
351 protected function render_template() {
352 ?>
353 <li id="accordion-panel-{{ data.id }}" class="accordion-section control-section control-panel control-panel-{{ data.type }}">
354 <h3 class="accordion-section-title">
355 <button type="button" class="accordion-trigger" aria-expanded="false" aria-controls="{{ data.id }}-content">
356 {{ data.title }}
357 </button>
358 </h3>
359 <ul class="accordion-sub-container control-panel-content" id="{{ data.id }}-content"></ul>
360 </li>
361 <?php
362 }
363
364 /**
365 * An Underscore (JS) template for this panel's content (but not its container).
366 *
367 * Class variables for this panel class are available in the `data` JS object;
368 * export custom variables by overriding WP_Customize_Panel::json().
369 *
370 * @see WP_Customize_Panel::print_template()
371 *
372 * @since 4.3.0
373 */
374 protected function content_template() {
375 ?>
376 <li class="panel-meta customize-info accordion-section <# if ( ! data.description ) { #> cannot-expand<# } #>">
377 <button class="customize-panel-back" tabindex="-1"><span class="screen-reader-text">
378 <?php
379 /* translators: Hidden accessibility text. */
380 _e( 'Back' );
381 ?>
382 </span></button>
383 <div class="accordion-section-title">
384 <span class="preview-notice">
385 <?php
386 /* translators: %s: The site/panel title in the Customizer. */
387 printf( __( 'You are customizing %s' ), '<strong class="panel-title">{{ data.title }}</strong>' );
388 ?>
389 </span>
390 <# if ( data.description ) { #>
391 <button type="button" class="customize-help-toggle dashicons dashicons-editor-help" aria-expanded="false"><span class="screen-reader-text">
392 <?php
393 /* translators: Hidden accessibility text. */
394 _e( 'Help' );
395 ?>
396 </span></button>
397 <# } #>
398 </div>
399 <# if ( data.description ) { #>
400 <div class="description customize-panel-description">
401 {{{ data.description }}}
402 </div>
403 <# } #>
404
405 <div class="customize-control-notifications-container"></div>
406 </li>
407 <?php
408 }
409}
410
411/** WP_Customize_Nav_Menus_Panel class */
412require_once ABSPATH . WPINC . '/customize/class-wp-customize-nav-menus-panel.php';
413
Ui Ux Design – Teachers Night Out

Get in Touch

© 2024 Teachers Night Out. All Rights Reserved.