author | ymh <ymh.work@gmail.com> |
Tue, 27 Sep 2022 16:37:53 +0200 | |
changeset 19 | 3d72ae0968f4 |
parent 16 | a86126ab1dd4 |
child 21 | 48c4eec2b7e6 |
permissions | -rw-r--r-- |
5 | 1 |
<?php |
2 |
/** |
|
3 |
* WordPress Customize Panel classes |
|
4 |
* |
|
5 |
* @package WordPress |
|
6 |
* @subpackage Customize |
|
7 |
* @since 4.0.0 |
|
8 |
*/ |
|
9 |
||
10 |
/** |
|
11 |
* Customize Panel class. |
|
12 |
* |
|
13 |
* A UI container for sections, managed by the WP_Customize_Manager. |
|
14 |
* |
|
15 |
* @since 4.0.0 |
|
16 |
* |
|
17 |
* @see WP_Customize_Manager |
|
18 |
*/ |
|
19 |
class WP_Customize_Panel { |
|
20 |
||
21 |
/** |
|
22 |
* Incremented with each new class instantiation, then stored in $instance_number. |
|
23 |
* |
|
24 |
* Used when sorting two instances whose priorities are equal. |
|
25 |
* |
|
26 |
* @since 4.1.0 |
|
27 |
* @var int |
|
28 |
*/ |
|
29 |
protected static $instance_count = 0; |
|
30 |
||
31 |
/** |
|
32 |
* Order in which this instance was created in relation to other instances. |
|
33 |
* |
|
34 |
* @since 4.1.0 |
|
35 |
* @var int |
|
36 |
*/ |
|
37 |
public $instance_number; |
|
38 |
||
39 |
/** |
|
40 |
* WP_Customize_Manager instance. |
|
41 |
* |
|
42 |
* @since 4.0.0 |
|
43 |
* @var WP_Customize_Manager |
|
44 |
*/ |
|
45 |
public $manager; |
|
46 |
||
47 |
/** |
|
48 |
* Unique identifier. |
|
49 |
* |
|
50 |
* @since 4.0.0 |
|
51 |
* @var string |
|
52 |
*/ |
|
53 |
public $id; |
|
54 |
||
55 |
/** |
|
56 |
* Priority of the panel, defining the display order of panels and sections. |
|
57 |
* |
|
58 |
* @since 4.0.0 |
|
19 | 59 |
* @var int |
5 | 60 |
*/ |
61 |
public $priority = 160; |
|
62 |
||
63 |
/** |
|
64 |
* Capability required for the panel. |
|
65 |
* |
|
66 |
* @since 4.0.0 |
|
67 |
* @var string |
|
68 |
*/ |
|
69 |
public $capability = 'edit_theme_options'; |
|
70 |
||
71 |
/** |
|
16 | 72 |
* Theme features required to support the panel. |
5 | 73 |
* |
74 |
* @since 4.0.0 |
|
16 | 75 |
* @var string|string[] |
5 | 76 |
*/ |
77 |
public $theme_supports = ''; |
|
78 |
||
79 |
/** |
|
80 |
* Title of the panel to show in UI. |
|
81 |
* |
|
82 |
* @since 4.0.0 |
|
83 |
* @var string |
|
84 |
*/ |
|
85 |
public $title = ''; |
|
86 |
||
87 |
/** |
|
88 |
* Description to show in the UI. |
|
89 |
* |
|
90 |
* @since 4.0.0 |
|
91 |
* @var string |
|
92 |
*/ |
|
93 |
public $description = ''; |
|
94 |
||
95 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
96 |
* Auto-expand a section in a panel when the panel is expanded when the panel only has the one section. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
97 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
98 |
* @since 4.7.4 |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
99 |
* @var bool |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
100 |
*/ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
101 |
public $auto_expand_sole_section = false; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
102 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
103 |
/** |
5 | 104 |
* Customizer sections for this panel. |
105 |
* |
|
106 |
* @since 4.0.0 |
|
107 |
* @var array |
|
108 |
*/ |
|
109 |
public $sections; |
|
110 |
||
111 |
/** |
|
112 |
* Type of this panel. |
|
113 |
* |
|
114 |
* @since 4.1.0 |
|
115 |
* @var string |
|
116 |
*/ |
|
117 |
public $type = 'default'; |
|
118 |
||
119 |
/** |
|
120 |
* Active callback. |
|
121 |
* |
|
122 |
* @since 4.1.0 |
|
123 |
* |
|
124 |
* @see WP_Customize_Section::active() |
|
125 |
* |
|
126 |
* @var callable Callback is called with one argument, the instance of |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
127 |
* WP_Customize_Section, and returns bool to indicate whether |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
128 |
* the section is active (such as it relates to the URL currently |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
129 |
* being previewed). |
5 | 130 |
*/ |
131 |
public $active_callback = ''; |
|
132 |
||
133 |
/** |
|
134 |
* Constructor. |
|
135 |
* |
|
136 |
* Any supplied $args override class property defaults. |
|
137 |
* |
|
138 |
* @since 4.0.0 |
|
139 |
* |
|
140 |
* @param WP_Customize_Manager $manager Customizer bootstrap instance. |
|
16 | 141 |
* @param string $id A specific ID for the panel. |
142 |
* @param array $args { |
|
143 |
* Optional. Array of properties for the new Panel object. Default empty array. |
|
144 |
* |
|
145 |
* @type int $priority Priority of the panel, defining the display order |
|
146 |
* of panels and sections. Default 160. |
|
147 |
* @type string $capability Capability required for the panel. |
|
148 |
* Default `edit_theme_options`. |
|
149 |
* @type string|string[] $theme_supports Theme features required to support the panel. |
|
150 |
* @type string $title Title of the panel to show in UI. |
|
151 |
* @type string $description Description to show in the UI. |
|
152 |
* @type string $type Type of the panel. |
|
153 |
* @type callable $active_callback Active callback. |
|
154 |
* } |
|
5 | 155 |
*/ |
156 |
public function __construct( $manager, $id, $args = array() ) { |
|
157 |
$keys = array_keys( get_object_vars( $this ) ); |
|
158 |
foreach ( $keys as $key ) { |
|
159 |
if ( isset( $args[ $key ] ) ) { |
|
160 |
$this->$key = $args[ $key ]; |
|
161 |
} |
|
162 |
} |
|
163 |
||
164 |
$this->manager = $manager; |
|
9 | 165 |
$this->id = $id; |
5 | 166 |
if ( empty( $this->active_callback ) ) { |
167 |
$this->active_callback = array( $this, 'active_callback' ); |
|
168 |
} |
|
169 |
self::$instance_count += 1; |
|
170 |
$this->instance_number = self::$instance_count; |
|
171 |
||
172 |
$this->sections = array(); // Users cannot customize the $sections array. |
|
173 |
} |
|
174 |
||
175 |
/** |
|
176 |
* Check whether panel is active to current Customizer preview. |
|
177 |
* |
|
178 |
* @since 4.1.0 |
|
179 |
* |
|
180 |
* @return bool Whether the panel is active to the current preview. |
|
181 |
*/ |
|
182 |
final public function active() { |
|
9 | 183 |
$panel = $this; |
5 | 184 |
$active = call_user_func( $this->active_callback, $this ); |
185 |
||
186 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
187 |
* Filters response of WP_Customize_Panel::active(). |
5 | 188 |
* |
189 |
* @since 4.1.0 |
|
190 |
* |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
191 |
* @param bool $active Whether the Customizer panel is active. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
192 |
* @param WP_Customize_Panel $panel WP_Customize_Panel instance. |
5 | 193 |
*/ |
194 |
$active = apply_filters( 'customize_panel_active', $active, $panel ); |
|
195 |
||
196 |
return $active; |
|
197 |
} |
|
198 |
||
199 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
200 |
* Default callback used when invoking WP_Customize_Panel::active(). |
5 | 201 |
* |
202 |
* Subclasses can override this with their specific logic, or they may |
|
203 |
* provide an 'active_callback' argument to the constructor. |
|
204 |
* |
|
205 |
* @since 4.1.0 |
|
206 |
* |
|
207 |
* @return bool Always true. |
|
208 |
*/ |
|
209 |
public function active_callback() { |
|
210 |
return true; |
|
211 |
} |
|
212 |
||
213 |
/** |
|
214 |
* Gather the parameters passed to client JavaScript via JSON. |
|
215 |
* |
|
216 |
* @since 4.1.0 |
|
217 |
* |
|
218 |
* @return array The array to be exported to the client as JSON. |
|
219 |
*/ |
|
220 |
public function json() { |
|
9 | 221 |
$array = wp_array_slice_assoc( (array) $this, array( 'id', 'description', 'priority', 'type' ) ); |
222 |
$array['title'] = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) ); |
|
223 |
$array['content'] = $this->get_content(); |
|
224 |
$array['active'] = $this->active(); |
|
225 |
$array['instanceNumber'] = $this->instance_number; |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
226 |
$array['autoExpandSoleSection'] = $this->auto_expand_sole_section; |
5 | 227 |
return $array; |
228 |
} |
|
229 |
||
230 |
/** |
|
231 |
* Checks required user capabilities and whether the theme has the |
|
232 |
* feature support required by the panel. |
|
233 |
* |
|
234 |
* @since 4.0.0 |
|
19 | 235 |
* @since 5.9.0 Method was marked non-final. |
5 | 236 |
* |
237 |
* @return bool False if theme doesn't support the panel or the user doesn't have the capability. |
|
238 |
*/ |
|
19 | 239 |
public function check_capabilities() { |
16 | 240 |
if ( $this->capability && ! current_user_can( $this->capability ) ) { |
5 | 241 |
return false; |
242 |
} |
|
243 |
||
16 | 244 |
if ( $this->theme_supports && ! current_theme_supports( ... (array) $this->theme_supports ) ) { |
5 | 245 |
return false; |
246 |
} |
|
247 |
||
248 |
return true; |
|
249 |
} |
|
250 |
||
251 |
/** |
|
252 |
* Get the panel's content template for insertion into the Customizer pane. |
|
253 |
* |
|
254 |
* @since 4.1.0 |
|
255 |
* |
|
256 |
* @return string Content for the panel. |
|
257 |
*/ |
|
258 |
final public function get_content() { |
|
259 |
ob_start(); |
|
260 |
$this->maybe_render(); |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
261 |
return trim( ob_get_clean() ); |
5 | 262 |
} |
263 |
||
264 |
/** |
|
265 |
* Check capabilities and render the panel. |
|
266 |
* |
|
267 |
* @since 4.0.0 |
|
268 |
*/ |
|
269 |
final public function maybe_render() { |
|
270 |
if ( ! $this->check_capabilities() ) { |
|
271 |
return; |
|
272 |
} |
|
273 |
||
274 |
/** |
|
275 |
* Fires before rendering a Customizer panel. |
|
276 |
* |
|
277 |
* @since 4.0.0 |
|
278 |
* |
|
19 | 279 |
* @param WP_Customize_Panel $panel WP_Customize_Panel instance. |
5 | 280 |
*/ |
281 |
do_action( 'customize_render_panel', $this ); |
|
282 |
||
283 |
/** |
|
284 |
* Fires before rendering a specific Customizer panel. |
|
285 |
* |
|
286 |
* The dynamic portion of the hook name, `$this->id`, refers to |
|
287 |
* the ID of the specific Customizer panel to be rendered. |
|
288 |
* |
|
289 |
* @since 4.0.0 |
|
290 |
*/ |
|
291 |
do_action( "customize_render_panel_{$this->id}" ); |
|
292 |
||
293 |
$this->render(); |
|
294 |
} |
|
295 |
||
296 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
297 |
* Render the panel container, and then its contents (via `this->render_content()`) in a subclass. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
298 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
299 |
* Panel containers are now rendered in JS by default, see WP_Customize_Panel::print_template(). |
5 | 300 |
* |
301 |
* @since 4.0.0 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
302 |
*/ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
303 |
protected function render() {} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
304 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
305 |
/** |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
306 |
* Render the panel UI in a subclass. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
307 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
308 |
* Panel contents are now rendered in JS by default, see WP_Customize_Panel::print_template(). |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
309 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
310 |
* @since 4.1.0 |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
311 |
*/ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
312 |
protected function render_content() {} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
313 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
314 |
/** |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
315 |
* Render the panel's JS templates. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
316 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
317 |
* This function is only run for panel types that have been registered with |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
318 |
* WP_Customize_Manager::register_panel_type(). |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
319 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
320 |
* @since 4.3.0 |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
321 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
322 |
* @see WP_Customize_Manager::register_panel_type() |
5 | 323 |
*/ |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
324 |
public function print_template() { |
5 | 325 |
?> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
326 |
<script type="text/html" id="tmpl-customize-panel-<?php echo esc_attr( $this->type ); ?>-content"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
327 |
<?php $this->content_template(); ?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
328 |
</script> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
329 |
<script type="text/html" id="tmpl-customize-panel-<?php echo esc_attr( $this->type ); ?>"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
330 |
<?php $this->render_template(); ?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
331 |
</script> |
9 | 332 |
<?php |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
333 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
334 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
335 |
/** |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
336 |
* An Underscore (JS) template for rendering this panel's container. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
337 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
338 |
* Class variables for this panel class are available in the `data` JS object; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
339 |
* export custom variables by overriding WP_Customize_Panel::json(). |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
340 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
341 |
* @see WP_Customize_Panel::print_template() |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
342 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
343 |
* @since 4.3.0 |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
344 |
*/ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
345 |
protected function render_template() { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
346 |
?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
347 |
<li id="accordion-panel-{{ data.id }}" class="accordion-section control-section control-panel control-panel-{{ data.type }}"> |
5 | 348 |
<h3 class="accordion-section-title" tabindex="0"> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
349 |
{{ data.title }} |
5 | 350 |
<span class="screen-reader-text"><?php _e( 'Press return or enter to open this panel' ); ?></span> |
351 |
</h3> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
352 |
<ul class="accordion-sub-container control-panel-content"></ul> |
5 | 353 |
</li> |
354 |
<?php |
|
355 |
} |
|
356 |
||
357 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
358 |
* An Underscore (JS) template for this panel's content (but not its container). |
5 | 359 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
360 |
* Class variables for this panel class are available in the `data` JS object; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
361 |
* export custom variables by overriding WP_Customize_Panel::json(). |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
362 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
363 |
* @see WP_Customize_Panel::print_template() |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
364 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
365 |
* @since 4.3.0 |
5 | 366 |
*/ |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
367 |
protected function content_template() { |
5 | 368 |
?> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
369 |
<li class="panel-meta customize-info accordion-section <# if ( ! data.description ) { #> cannot-expand<# } #>"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
370 |
<button class="customize-panel-back" tabindex="-1"><span class="screen-reader-text"><?php _e( 'Back' ); ?></span></button> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
371 |
<div class="accordion-section-title"> |
9 | 372 |
<span class="preview-notice"> |
373 |
<?php |
|
16 | 374 |
/* translators: %s: The site/panel title in the Customizer. */ |
375 |
printf( __( 'You are customizing %s' ), '<strong class="panel-title">{{ data.title }}</strong>' ); |
|
9 | 376 |
?> |
377 |
</span> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
378 |
<# if ( data.description ) { #> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
379 |
<button type="button" class="customize-help-toggle dashicons dashicons-editor-help" aria-expanded="false"><span class="screen-reader-text"><?php _e( 'Help' ); ?></span></button> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
380 |
<# } #> |
5 | 381 |
</div> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
382 |
<# if ( data.description ) { #> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
383 |
<div class="description customize-panel-description"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
384 |
{{{ data.description }}} |
5 | 385 |
</div> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
386 |
<# } #> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
387 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
388 |
<div class="customize-control-notifications-container"></div> |
5 | 389 |
</li> |
390 |
<?php |
|
391 |
} |
|
392 |
} |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
393 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
394 |
/** WP_Customize_Nav_Menus_Panel class */ |
16 | 395 |
require_once ABSPATH . WPINC . '/customize/class-wp-customize-nav-menus-panel.php'; |