author | ymh <ymh.work@gmail.com> |
Tue, 15 Oct 2019 15:48:13 +0200 | |
changeset 13 | d255fe9cd479 |
parent 9 | 177826044cd9 |
child 16 | a86126ab1dd4 |
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 |
|
59 |
* @var integer |
|
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 |
/** |
|
72 |
* Theme feature support for the panel. |
|
73 |
* |
|
74 |
* @since 4.0.0 |
|
75 |
* @var string|array |
|
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. |
|
141 |
* @param string $id An specific ID for the panel. |
|
142 |
* @param array $args Panel arguments. |
|
143 |
*/ |
|
144 |
public function __construct( $manager, $id, $args = array() ) { |
|
145 |
$keys = array_keys( get_object_vars( $this ) ); |
|
146 |
foreach ( $keys as $key ) { |
|
147 |
if ( isset( $args[ $key ] ) ) { |
|
148 |
$this->$key = $args[ $key ]; |
|
149 |
} |
|
150 |
} |
|
151 |
||
152 |
$this->manager = $manager; |
|
9 | 153 |
$this->id = $id; |
5 | 154 |
if ( empty( $this->active_callback ) ) { |
155 |
$this->active_callback = array( $this, 'active_callback' ); |
|
156 |
} |
|
157 |
self::$instance_count += 1; |
|
158 |
$this->instance_number = self::$instance_count; |
|
159 |
||
160 |
$this->sections = array(); // Users cannot customize the $sections array. |
|
161 |
} |
|
162 |
||
163 |
/** |
|
164 |
* Check whether panel is active to current Customizer preview. |
|
165 |
* |
|
166 |
* @since 4.1.0 |
|
167 |
* |
|
168 |
* @return bool Whether the panel is active to the current preview. |
|
169 |
*/ |
|
170 |
final public function active() { |
|
9 | 171 |
$panel = $this; |
5 | 172 |
$active = call_user_func( $this->active_callback, $this ); |
173 |
||
174 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
175 |
* Filters response of WP_Customize_Panel::active(). |
5 | 176 |
* |
177 |
* @since 4.1.0 |
|
178 |
* |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
179 |
* @param bool $active Whether the Customizer panel is active. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
180 |
* @param WP_Customize_Panel $panel WP_Customize_Panel instance. |
5 | 181 |
*/ |
182 |
$active = apply_filters( 'customize_panel_active', $active, $panel ); |
|
183 |
||
184 |
return $active; |
|
185 |
} |
|
186 |
||
187 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
188 |
* Default callback used when invoking WP_Customize_Panel::active(). |
5 | 189 |
* |
190 |
* Subclasses can override this with their specific logic, or they may |
|
191 |
* provide an 'active_callback' argument to the constructor. |
|
192 |
* |
|
193 |
* @since 4.1.0 |
|
194 |
* |
|
195 |
* @return bool Always true. |
|
196 |
*/ |
|
197 |
public function active_callback() { |
|
198 |
return true; |
|
199 |
} |
|
200 |
||
201 |
/** |
|
202 |
* Gather the parameters passed to client JavaScript via JSON. |
|
203 |
* |
|
204 |
* @since 4.1.0 |
|
205 |
* |
|
206 |
* @return array The array to be exported to the client as JSON. |
|
207 |
*/ |
|
208 |
public function json() { |
|
9 | 209 |
$array = wp_array_slice_assoc( (array) $this, array( 'id', 'description', 'priority', 'type' ) ); |
210 |
$array['title'] = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) ); |
|
211 |
$array['content'] = $this->get_content(); |
|
212 |
$array['active'] = $this->active(); |
|
213 |
$array['instanceNumber'] = $this->instance_number; |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
214 |
$array['autoExpandSoleSection'] = $this->auto_expand_sole_section; |
5 | 215 |
return $array; |
216 |
} |
|
217 |
||
218 |
/** |
|
219 |
* Checks required user capabilities and whether the theme has the |
|
220 |
* feature support required by the panel. |
|
221 |
* |
|
222 |
* @since 4.0.0 |
|
223 |
* |
|
224 |
* @return bool False if theme doesn't support the panel or the user doesn't have the capability. |
|
225 |
*/ |
|
226 |
final public function check_capabilities() { |
|
227 |
if ( $this->capability && ! call_user_func_array( 'current_user_can', (array) $this->capability ) ) { |
|
228 |
return false; |
|
229 |
} |
|
230 |
||
231 |
if ( $this->theme_supports && ! call_user_func_array( 'current_theme_supports', (array) $this->theme_supports ) ) { |
|
232 |
return false; |
|
233 |
} |
|
234 |
||
235 |
return true; |
|
236 |
} |
|
237 |
||
238 |
/** |
|
239 |
* Get the panel's content template for insertion into the Customizer pane. |
|
240 |
* |
|
241 |
* @since 4.1.0 |
|
242 |
* |
|
243 |
* @return string Content for the panel. |
|
244 |
*/ |
|
245 |
final public function get_content() { |
|
246 |
ob_start(); |
|
247 |
$this->maybe_render(); |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
248 |
return trim( ob_get_clean() ); |
5 | 249 |
} |
250 |
||
251 |
/** |
|
252 |
* Check capabilities and render the panel. |
|
253 |
* |
|
254 |
* @since 4.0.0 |
|
255 |
*/ |
|
256 |
final public function maybe_render() { |
|
257 |
if ( ! $this->check_capabilities() ) { |
|
258 |
return; |
|
259 |
} |
|
260 |
||
261 |
/** |
|
262 |
* Fires before rendering a Customizer panel. |
|
263 |
* |
|
264 |
* @since 4.0.0 |
|
265 |
* |
|
266 |
* @param WP_Customize_Panel $this WP_Customize_Panel instance. |
|
267 |
*/ |
|
268 |
do_action( 'customize_render_panel', $this ); |
|
269 |
||
270 |
/** |
|
271 |
* Fires before rendering a specific Customizer panel. |
|
272 |
* |
|
273 |
* The dynamic portion of the hook name, `$this->id`, refers to |
|
274 |
* the ID of the specific Customizer panel to be rendered. |
|
275 |
* |
|
276 |
* @since 4.0.0 |
|
277 |
*/ |
|
278 |
do_action( "customize_render_panel_{$this->id}" ); |
|
279 |
||
280 |
$this->render(); |
|
281 |
} |
|
282 |
||
283 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
284 |
* 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
|
285 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
286 |
* Panel containers are now rendered in JS by default, see WP_Customize_Panel::print_template(). |
5 | 287 |
* |
288 |
* @since 4.0.0 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
289 |
*/ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
290 |
protected function render() {} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
291 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
292 |
/** |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
293 |
* Render the panel UI in a subclass. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
294 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
295 |
* 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
|
296 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
297 |
* @since 4.1.0 |
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 |
protected function render_content() {} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
300 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
301 |
/** |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
302 |
* Render the panel's JS templates. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
303 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
304 |
* 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
|
305 |
* WP_Customize_Manager::register_panel_type(). |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
306 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
307 |
* @since 4.3.0 |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
308 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
309 |
* @see WP_Customize_Manager::register_panel_type() |
5 | 310 |
*/ |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
311 |
public function print_template() { |
5 | 312 |
?> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
313 |
<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
|
314 |
<?php $this->content_template(); ?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
315 |
</script> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
316 |
<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
|
317 |
<?php $this->render_template(); ?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
318 |
</script> |
9 | 319 |
<?php |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
320 |
} |
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 |
/** |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
323 |
* 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
|
324 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
325 |
* 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
|
326 |
* export custom variables by overriding WP_Customize_Panel::json(). |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
327 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
328 |
* @see WP_Customize_Panel::print_template() |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
329 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
330 |
* @since 4.3.0 |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
331 |
*/ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
332 |
protected function render_template() { |
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 |
<li id="accordion-panel-{{ data.id }}" class="accordion-section control-section control-panel control-panel-{{ data.type }}"> |
5 | 335 |
<h3 class="accordion-section-title" tabindex="0"> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
336 |
{{ data.title }} |
5 | 337 |
<span class="screen-reader-text"><?php _e( 'Press return or enter to open this panel' ); ?></span> |
338 |
</h3> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
339 |
<ul class="accordion-sub-container control-panel-content"></ul> |
5 | 340 |
</li> |
341 |
<?php |
|
342 |
} |
|
343 |
||
344 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
345 |
* An Underscore (JS) template for this panel's content (but not its container). |
5 | 346 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
347 |
* 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
|
348 |
* export custom variables by overriding WP_Customize_Panel::json(). |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
349 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
350 |
* @see WP_Customize_Panel::print_template() |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
351 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
352 |
* @since 4.3.0 |
5 | 353 |
*/ |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
354 |
protected function content_template() { |
5 | 355 |
?> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
356 |
<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
|
357 |
<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
|
358 |
<div class="accordion-section-title"> |
9 | 359 |
<span class="preview-notice"> |
360 |
<?php |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
361 |
/* translators: %s: the site/panel title in the Customizer */ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
362 |
echo sprintf( __( 'You are customizing %s' ), '<strong class="panel-title">{{ data.title }}</strong>' ); |
9 | 363 |
?> |
364 |
</span> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
365 |
<# if ( data.description ) { #> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
366 |
<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
|
367 |
<# } #> |
5 | 368 |
</div> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
369 |
<# if ( data.description ) { #> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
370 |
<div class="description customize-panel-description"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
371 |
{{{ data.description }}} |
5 | 372 |
</div> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
373 |
<# } #> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
374 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
375 |
<div class="customize-control-notifications-container"></div> |
5 | 376 |
</li> |
377 |
<?php |
|
378 |
} |
|
379 |
} |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
380 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
381 |
/** WP_Customize_Nav_Menus_Panel class */ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
382 |
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menus-panel.php' ); |