author | ymh <ymh.work@gmail.com> |
Tue, 15 Dec 2020 13:49:49 +0100 | |
changeset 16 | a86126ab1dd4 |
parent 9 | 177826044cd9 |
child 19 | 3d72ae0968f4 |
permissions | -rw-r--r-- |
0 | 1 |
<?php |
2 |
/** |
|
5 | 3 |
* WordPress Customize Section classes |
0 | 4 |
* |
5 |
* @package WordPress |
|
6 |
* @subpackage Customize |
|
7 |
* @since 3.4.0 |
|
8 |
*/ |
|
5 | 9 |
|
10 |
/** |
|
11 |
* Customize Section class. |
|
12 |
* |
|
13 |
* A UI container for controls, managed by the WP_Customize_Manager class. |
|
14 |
* |
|
15 |
* @since 3.4.0 |
|
16 |
* |
|
17 |
* @see WP_Customize_Manager |
|
18 |
*/ |
|
0 | 19 |
class WP_Customize_Section { |
5 | 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 3.4.0 |
|
43 |
* @var WP_Customize_Manager |
|
44 |
*/ |
|
0 | 45 |
public $manager; |
5 | 46 |
|
47 |
/** |
|
48 |
* Unique identifier. |
|
49 |
* |
|
50 |
* @since 3.4.0 |
|
51 |
* @var string |
|
52 |
*/ |
|
0 | 53 |
public $id; |
5 | 54 |
|
55 |
/** |
|
56 |
* Priority of the section which informs load order of sections. |
|
57 |
* |
|
58 |
* @since 3.4.0 |
|
59 |
* @var integer |
|
60 |
*/ |
|
61 |
public $priority = 160; |
|
62 |
||
63 |
/** |
|
64 |
* Panel in which to show the section, making it a sub-section. |
|
65 |
* |
|
66 |
* @since 4.0.0 |
|
67 |
* @var string |
|
68 |
*/ |
|
69 |
public $panel = ''; |
|
70 |
||
71 |
/** |
|
72 |
* Capability required for the section. |
|
73 |
* |
|
74 |
* @since 3.4.0 |
|
75 |
* @var string |
|
76 |
*/ |
|
77 |
public $capability = 'edit_theme_options'; |
|
78 |
||
79 |
/** |
|
16 | 80 |
* Theme features required to support the section. |
5 | 81 |
* |
82 |
* @since 3.4.0 |
|
16 | 83 |
* @var string|string[] |
5 | 84 |
*/ |
0 | 85 |
public $theme_supports = ''; |
5 | 86 |
|
87 |
/** |
|
88 |
* Title of the section to show in UI. |
|
89 |
* |
|
90 |
* @since 3.4.0 |
|
91 |
* @var string |
|
92 |
*/ |
|
93 |
public $title = ''; |
|
94 |
||
95 |
/** |
|
96 |
* Description to show in the UI. |
|
97 |
* |
|
98 |
* @since 3.4.0 |
|
99 |
* @var string |
|
100 |
*/ |
|
101 |
public $description = ''; |
|
102 |
||
103 |
/** |
|
104 |
* Customizer controls for this section. |
|
105 |
* |
|
106 |
* @since 3.4.0 |
|
107 |
* @var array |
|
108 |
*/ |
|
0 | 109 |
public $controls; |
110 |
||
111 |
/** |
|
5 | 112 |
* Type of this section. |
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 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
134 |
* Show the description or hide it behind the help icon. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
135 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
136 |
* @since 4.7.0 |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
137 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
138 |
* @var bool Indicates whether the Section's description should be |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
139 |
* hidden behind a help icon ("?") in the Section header, |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
140 |
* similar to how help icons are displayed on Panels. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
141 |
*/ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
142 |
public $description_hidden = false; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
143 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
144 |
/** |
0 | 145 |
* Constructor. |
146 |
* |
|
5 | 147 |
* Any supplied $args override class property defaults. |
148 |
* |
|
0 | 149 |
* @since 3.4.0 |
150 |
* |
|
5 | 151 |
* @param WP_Customize_Manager $manager Customizer bootstrap instance. |
16 | 152 |
* @param string $id A specific ID of the section. |
153 |
* @param array $args { |
|
154 |
* Optional. Array of properties for the new Section object. Default empty array. |
|
155 |
* |
|
156 |
* @type int $priority Priority of the section, defining the display order |
|
157 |
* of panels and sections. Default 160. |
|
158 |
* @type string $panel The panel this section belongs to (if any). |
|
159 |
* Default empty. |
|
160 |
* @type string $capability Capability required for the section. |
|
161 |
* Default 'edit_theme_options' |
|
162 |
* @type string|string[] $theme_supports Theme features required to support the section. |
|
163 |
* @type string $title Title of the section to show in UI. |
|
164 |
* @type string $description Description to show in the UI. |
|
165 |
* @type string $type Type of the section. |
|
166 |
* @type callable $active_callback Active callback. |
|
167 |
* @type bool $description_hidden Hide the description behind a help icon, |
|
168 |
* instead of inline above the first control. |
|
169 |
* Default false. |
|
170 |
* } |
|
0 | 171 |
*/ |
5 | 172 |
public function __construct( $manager, $id, $args = array() ) { |
173 |
$keys = array_keys( get_object_vars( $this ) ); |
|
0 | 174 |
foreach ( $keys as $key ) { |
5 | 175 |
if ( isset( $args[ $key ] ) ) { |
0 | 176 |
$this->$key = $args[ $key ]; |
5 | 177 |
} |
0 | 178 |
} |
179 |
||
180 |
$this->manager = $manager; |
|
9 | 181 |
$this->id = $id; |
5 | 182 |
if ( empty( $this->active_callback ) ) { |
183 |
$this->active_callback = array( $this, 'active_callback' ); |
|
184 |
} |
|
185 |
self::$instance_count += 1; |
|
186 |
$this->instance_number = self::$instance_count; |
|
0 | 187 |
|
188 |
$this->controls = array(); // Users cannot customize the $controls array. |
|
189 |
} |
|
190 |
||
191 |
/** |
|
5 | 192 |
* Check whether section is active to current Customizer preview. |
193 |
* |
|
194 |
* @since 4.1.0 |
|
195 |
* |
|
196 |
* @return bool Whether the section is active to the current preview. |
|
197 |
*/ |
|
198 |
final public function active() { |
|
199 |
$section = $this; |
|
9 | 200 |
$active = call_user_func( $this->active_callback, $this ); |
5 | 201 |
|
202 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
203 |
* Filters response of WP_Customize_Section::active(). |
5 | 204 |
* |
205 |
* @since 4.1.0 |
|
206 |
* |
|
207 |
* @param bool $active Whether the Customizer section is active. |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
208 |
* @param WP_Customize_Section $section WP_Customize_Section instance. |
5 | 209 |
*/ |
210 |
$active = apply_filters( 'customize_section_active', $active, $section ); |
|
211 |
||
212 |
return $active; |
|
213 |
} |
|
214 |
||
215 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
216 |
* Default callback used when invoking WP_Customize_Section::active(). |
5 | 217 |
* |
218 |
* Subclasses can override this with their specific logic, or they may provide |
|
219 |
* an 'active_callback' argument to the constructor. |
|
220 |
* |
|
221 |
* @since 4.1.0 |
|
222 |
* |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
223 |
* @return true Always true. |
5 | 224 |
*/ |
225 |
public function active_callback() { |
|
226 |
return true; |
|
227 |
} |
|
228 |
||
229 |
/** |
|
230 |
* Gather the parameters passed to client JavaScript via JSON. |
|
231 |
* |
|
232 |
* @since 4.1.0 |
|
233 |
* |
|
234 |
* @return array The array to be exported to the client as JSON. |
|
235 |
*/ |
|
236 |
public function json() { |
|
9 | 237 |
$array = wp_array_slice_assoc( (array) $this, array( 'id', 'description', 'priority', 'panel', 'type', 'description_hidden' ) ); |
238 |
$array['title'] = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) ); |
|
239 |
$array['content'] = $this->get_content(); |
|
240 |
$array['active'] = $this->active(); |
|
5 | 241 |
$array['instanceNumber'] = $this->instance_number; |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
242 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
243 |
if ( $this->panel ) { |
16 | 244 |
/* translators: ▸ is the unicode right-pointing triangle. %s: Section title in the Customizer. */ |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
245 |
$array['customizeAction'] = sprintf( __( 'Customizing ▸ %s' ), esc_html( $this->manager->get_panel( $this->panel )->title ) ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
246 |
} else { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
247 |
$array['customizeAction'] = __( 'Customizing' ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
248 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
249 |
|
5 | 250 |
return $array; |
251 |
} |
|
252 |
||
253 |
/** |
|
254 |
* Checks required user capabilities and whether the theme has the |
|
255 |
* feature support required by the section. |
|
0 | 256 |
* |
257 |
* @since 3.4.0 |
|
258 |
* |
|
259 |
* @return bool False if theme doesn't support the section or user doesn't have the capability. |
|
260 |
*/ |
|
5 | 261 |
final public function check_capabilities() { |
16 | 262 |
if ( $this->capability && ! current_user_can( $this->capability ) ) { |
0 | 263 |
return false; |
5 | 264 |
} |
0 | 265 |
|
16 | 266 |
if ( $this->theme_supports && ! current_theme_supports( ... (array) $this->theme_supports ) ) { |
0 | 267 |
return false; |
5 | 268 |
} |
0 | 269 |
|
270 |
return true; |
|
271 |
} |
|
272 |
||
273 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
274 |
* Get the section's content for insertion into the Customizer pane. |
5 | 275 |
* |
276 |
* @since 4.1.0 |
|
277 |
* |
|
278 |
* @return string Contents of the section. |
|
279 |
*/ |
|
280 |
final public function get_content() { |
|
281 |
ob_start(); |
|
282 |
$this->maybe_render(); |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
283 |
return trim( ob_get_clean() ); |
5 | 284 |
} |
285 |
||
286 |
/** |
|
0 | 287 |
* Check capabilities and render the section. |
288 |
* |
|
289 |
* @since 3.4.0 |
|
290 |
*/ |
|
5 | 291 |
final public function maybe_render() { |
292 |
if ( ! $this->check_capabilities() ) { |
|
0 | 293 |
return; |
5 | 294 |
} |
0 | 295 |
|
5 | 296 |
/** |
297 |
* Fires before rendering a Customizer section. |
|
298 |
* |
|
299 |
* @since 3.4.0 |
|
300 |
* |
|
301 |
* @param WP_Customize_Section $this WP_Customize_Section instance. |
|
302 |
*/ |
|
0 | 303 |
do_action( 'customize_render_section', $this ); |
5 | 304 |
/** |
305 |
* Fires before rendering a specific Customizer section. |
|
306 |
* |
|
307 |
* The dynamic portion of the hook name, `$this->id`, refers to the ID |
|
308 |
* of the specific Customizer section to be rendered. |
|
309 |
* |
|
310 |
* @since 3.4.0 |
|
311 |
*/ |
|
312 |
do_action( "customize_render_section_{$this->id}" ); |
|
0 | 313 |
|
314 |
$this->render(); |
|
315 |
} |
|
316 |
||
317 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
318 |
* Render the section UI in a subclass. |
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 |
* Sections are now rendered in JS by default, see WP_Customize_Section::print_template(). |
0 | 321 |
* |
322 |
* @since 3.4.0 |
|
323 |
*/ |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
324 |
protected function render() {} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
325 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
326 |
/** |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
327 |
* Render the section's JS template. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
328 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
329 |
* This function is only run for section types that have been registered with |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
330 |
* WP_Customize_Manager::register_section_type(). |
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 |
* @since 4.3.0 |
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 |
* @see WP_Customize_Manager::render_template() |
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 |
public function print_template() { |
0 | 337 |
?> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
338 |
<script type="text/html" id="tmpl-customize-section-<?php echo $this->type; ?>"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
339 |
<?php $this->render_template(); ?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
340 |
</script> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
341 |
<?php |
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 |
|
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 |
* An Underscore (JS) template for rendering this section. |
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 |
* Class variables for this section 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_Section::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 |
* @since 4.3.0 |
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 |
* @see WP_Customize_Section::print_template() |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
353 |
*/ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
354 |
protected function render_template() { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
355 |
?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
356 |
<li id="accordion-section-{{ data.id }}" class="accordion-section control-section control-section-{{ data.type }}"> |
5 | 357 |
<h3 class="accordion-section-title" tabindex="0"> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
358 |
{{ data.title }} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
359 |
<span class="screen-reader-text"><?php _e( 'Press return or enter to open this section' ); ?></span> |
5 | 360 |
</h3> |
0 | 361 |
<ul class="accordion-section-content"> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
362 |
<li class="customize-section-description-container section-meta <# if ( data.description_hidden ) { #>customize-info<# } #>"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
363 |
<div class="customize-section-title"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
364 |
<button class="customize-section-back" tabindex="-1"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
365 |
<span class="screen-reader-text"><?php _e( 'Back' ); ?></span> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
366 |
</button> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
367 |
<h3> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
368 |
<span class="customize-action"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
369 |
{{{ data.customizeAction }}} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
370 |
</span> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
371 |
{{ data.title }} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
372 |
</h3> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
373 |
<# if ( data.description && data.description_hidden ) { #> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
374 |
<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
|
375 |
<div class="description customize-section-description"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
376 |
{{{ data.description }}} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
377 |
</div> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
378 |
<# } #> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
379 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
380 |
<div class="customize-control-notifications-container"></div> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
381 |
</div> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
382 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
383 |
<# if ( data.description && ! data.description_hidden ) { #> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
384 |
<div class="description customize-section-description"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
385 |
{{{ data.description }}} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
386 |
</div> |
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 |
</li> |
0 | 389 |
</ul> |
390 |
</li> |
|
391 |
<?php |
|
392 |
} |
|
393 |
} |
|
5 | 394 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
395 |
/** WP_Customize_Themes_Section class */ |
16 | 396 |
require_once ABSPATH . WPINC . '/customize/class-wp-customize-themes-section.php'; |
5 | 397 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
398 |
/** WP_Customize_Sidebar_Section class */ |
16 | 399 |
require_once ABSPATH . WPINC . '/customize/class-wp-customize-sidebar-section.php'; |
5 | 400 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
401 |
/** WP_Customize_Nav_Menu_Section class */ |
16 | 402 |
require_once ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-section.php'; |