author | ymh <ymh.work@gmail.com> |
Mon, 14 Oct 2019 17:39:30 +0200 | |
changeset 7 | cf61fcea0001 |
parent 5 | 5e2f62d02dcd |
child 9 | 177826044cd9 |
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 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
27 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
28 |
* @static |
5 | 29 |
* @var int |
30 |
*/ |
|
31 |
protected static $instance_count = 0; |
|
32 |
||
33 |
/** |
|
34 |
* Order in which this instance was created in relation to other instances. |
|
35 |
* |
|
36 |
* @since 4.1.0 |
|
37 |
* @var int |
|
38 |
*/ |
|
39 |
public $instance_number; |
|
40 |
||
41 |
/** |
|
42 |
* WP_Customize_Manager instance. |
|
43 |
* |
|
44 |
* @since 3.4.0 |
|
45 |
* @var WP_Customize_Manager |
|
46 |
*/ |
|
0 | 47 |
public $manager; |
5 | 48 |
|
49 |
/** |
|
50 |
* Unique identifier. |
|
51 |
* |
|
52 |
* @since 3.4.0 |
|
53 |
* @var string |
|
54 |
*/ |
|
0 | 55 |
public $id; |
5 | 56 |
|
57 |
/** |
|
58 |
* Priority of the section which informs load order of sections. |
|
59 |
* |
|
60 |
* @since 3.4.0 |
|
61 |
* @var integer |
|
62 |
*/ |
|
63 |
public $priority = 160; |
|
64 |
||
65 |
/** |
|
66 |
* Panel in which to show the section, making it a sub-section. |
|
67 |
* |
|
68 |
* @since 4.0.0 |
|
69 |
* @var string |
|
70 |
*/ |
|
71 |
public $panel = ''; |
|
72 |
||
73 |
/** |
|
74 |
* Capability required for the section. |
|
75 |
* |
|
76 |
* @since 3.4.0 |
|
77 |
* @var string |
|
78 |
*/ |
|
79 |
public $capability = 'edit_theme_options'; |
|
80 |
||
81 |
/** |
|
82 |
* Theme feature support for the section. |
|
83 |
* |
|
84 |
* @since 3.4.0 |
|
85 |
* @var string|array |
|
86 |
*/ |
|
0 | 87 |
public $theme_supports = ''; |
5 | 88 |
|
89 |
/** |
|
90 |
* Title of the section to show in UI. |
|
91 |
* |
|
92 |
* @since 3.4.0 |
|
93 |
* @var string |
|
94 |
*/ |
|
95 |
public $title = ''; |
|
96 |
||
97 |
/** |
|
98 |
* Description to show in the UI. |
|
99 |
* |
|
100 |
* @since 3.4.0 |
|
101 |
* @var string |
|
102 |
*/ |
|
103 |
public $description = ''; |
|
104 |
||
105 |
/** |
|
106 |
* Customizer controls for this section. |
|
107 |
* |
|
108 |
* @since 3.4.0 |
|
109 |
* @var array |
|
110 |
*/ |
|
0 | 111 |
public $controls; |
112 |
||
113 |
/** |
|
5 | 114 |
* Type of this section. |
115 |
* |
|
116 |
* @since 4.1.0 |
|
117 |
* @var string |
|
118 |
*/ |
|
119 |
public $type = 'default'; |
|
120 |
||
121 |
/** |
|
122 |
* Active callback. |
|
123 |
* |
|
124 |
* @since 4.1.0 |
|
125 |
* |
|
126 |
* @see WP_Customize_Section::active() |
|
127 |
* |
|
128 |
* @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
|
129 |
* WP_Customize_Section, and returns bool to indicate whether |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
130 |
* 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
|
131 |
* being previewed). |
5 | 132 |
*/ |
133 |
public $active_callback = ''; |
|
134 |
||
135 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
136 |
* 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
|
137 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
138 |
* @since 4.7.0 |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
139 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
140 |
* @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
|
141 |
* hidden behind a help icon ("?") in the Section header, |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
142 |
* similar to how help icons are displayed on Panels. |
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 |
public $description_hidden = false; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
145 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
146 |
/** |
0 | 147 |
* Constructor. |
148 |
* |
|
5 | 149 |
* Any supplied $args override class property defaults. |
150 |
* |
|
0 | 151 |
* @since 3.4.0 |
152 |
* |
|
5 | 153 |
* @param WP_Customize_Manager $manager Customizer bootstrap instance. |
154 |
* @param string $id An specific ID of the section. |
|
155 |
* @param array $args Section arguments. |
|
0 | 156 |
*/ |
5 | 157 |
public function __construct( $manager, $id, $args = array() ) { |
158 |
$keys = array_keys( get_object_vars( $this ) ); |
|
0 | 159 |
foreach ( $keys as $key ) { |
5 | 160 |
if ( isset( $args[ $key ] ) ) { |
0 | 161 |
$this->$key = $args[ $key ]; |
5 | 162 |
} |
0 | 163 |
} |
164 |
||
165 |
$this->manager = $manager; |
|
166 |
$this->id = $id; |
|
5 | 167 |
if ( empty( $this->active_callback ) ) { |
168 |
$this->active_callback = array( $this, 'active_callback' ); |
|
169 |
} |
|
170 |
self::$instance_count += 1; |
|
171 |
$this->instance_number = self::$instance_count; |
|
0 | 172 |
|
173 |
$this->controls = array(); // Users cannot customize the $controls array. |
|
174 |
} |
|
175 |
||
176 |
/** |
|
5 | 177 |
* Check whether section is active to current Customizer preview. |
178 |
* |
|
179 |
* @since 4.1.0 |
|
180 |
* |
|
181 |
* @return bool Whether the section is active to the current preview. |
|
182 |
*/ |
|
183 |
final public function active() { |
|
184 |
$section = $this; |
|
185 |
$active = call_user_func( $this->active_callback, $this ); |
|
186 |
||
187 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
188 |
* Filters response of WP_Customize_Section::active(). |
5 | 189 |
* |
190 |
* @since 4.1.0 |
|
191 |
* |
|
192 |
* @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
|
193 |
* @param WP_Customize_Section $section WP_Customize_Section instance. |
5 | 194 |
*/ |
195 |
$active = apply_filters( 'customize_section_active', $active, $section ); |
|
196 |
||
197 |
return $active; |
|
198 |
} |
|
199 |
||
200 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
201 |
* Default callback used when invoking WP_Customize_Section::active(). |
5 | 202 |
* |
203 |
* Subclasses can override this with their specific logic, or they may provide |
|
204 |
* an 'active_callback' argument to the constructor. |
|
205 |
* |
|
206 |
* @since 4.1.0 |
|
207 |
* |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
208 |
* @return true Always true. |
5 | 209 |
*/ |
210 |
public function active_callback() { |
|
211 |
return true; |
|
212 |
} |
|
213 |
||
214 |
/** |
|
215 |
* Gather the parameters passed to client JavaScript via JSON. |
|
216 |
* |
|
217 |
* @since 4.1.0 |
|
218 |
* |
|
219 |
* @return array The array to be exported to the client as JSON. |
|
220 |
*/ |
|
221 |
public function json() { |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
222 |
$array = wp_array_slice_assoc( (array) $this, array( 'id', 'description', 'priority', 'panel', 'type', 'description_hidden' ) ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
223 |
$array['title'] = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) ); |
5 | 224 |
$array['content'] = $this->get_content(); |
225 |
$array['active'] = $this->active(); |
|
226 |
$array['instanceNumber'] = $this->instance_number; |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
227 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
228 |
if ( $this->panel ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
229 |
/* translators: ▸ is the unicode right-pointing triangle, and %s is the section title in the Customizer */ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
230 |
$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
|
231 |
} else { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
232 |
$array['customizeAction'] = __( 'Customizing' ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
233 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
234 |
|
5 | 235 |
return $array; |
236 |
} |
|
237 |
||
238 |
/** |
|
239 |
* Checks required user capabilities and whether the theme has the |
|
240 |
* feature support required by the section. |
|
0 | 241 |
* |
242 |
* @since 3.4.0 |
|
243 |
* |
|
244 |
* @return bool False if theme doesn't support the section or user doesn't have the capability. |
|
245 |
*/ |
|
5 | 246 |
final public function check_capabilities() { |
247 |
if ( $this->capability && ! call_user_func_array( 'current_user_can', (array) $this->capability ) ) { |
|
0 | 248 |
return false; |
5 | 249 |
} |
0 | 250 |
|
5 | 251 |
if ( $this->theme_supports && ! call_user_func_array( 'current_theme_supports', (array) $this->theme_supports ) ) { |
0 | 252 |
return false; |
5 | 253 |
} |
0 | 254 |
|
255 |
return true; |
|
256 |
} |
|
257 |
||
258 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
259 |
* Get the section's content for insertion into the Customizer pane. |
5 | 260 |
* |
261 |
* @since 4.1.0 |
|
262 |
* |
|
263 |
* @return string Contents of the section. |
|
264 |
*/ |
|
265 |
final public function get_content() { |
|
266 |
ob_start(); |
|
267 |
$this->maybe_render(); |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
268 |
return trim( ob_get_clean() ); |
5 | 269 |
} |
270 |
||
271 |
/** |
|
0 | 272 |
* Check capabilities and render the section. |
273 |
* |
|
274 |
* @since 3.4.0 |
|
275 |
*/ |
|
5 | 276 |
final public function maybe_render() { |
277 |
if ( ! $this->check_capabilities() ) { |
|
0 | 278 |
return; |
5 | 279 |
} |
0 | 280 |
|
5 | 281 |
/** |
282 |
* Fires before rendering a Customizer section. |
|
283 |
* |
|
284 |
* @since 3.4.0 |
|
285 |
* |
|
286 |
* @param WP_Customize_Section $this WP_Customize_Section instance. |
|
287 |
*/ |
|
0 | 288 |
do_action( 'customize_render_section', $this ); |
5 | 289 |
/** |
290 |
* Fires before rendering a specific Customizer section. |
|
291 |
* |
|
292 |
* The dynamic portion of the hook name, `$this->id`, refers to the ID |
|
293 |
* of the specific Customizer section to be rendered. |
|
294 |
* |
|
295 |
* @since 3.4.0 |
|
296 |
*/ |
|
297 |
do_action( "customize_render_section_{$this->id}" ); |
|
0 | 298 |
|
299 |
$this->render(); |
|
300 |
} |
|
301 |
||
302 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
303 |
* Render the section UI in a subclass. |
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 |
* Sections are now rendered in JS by default, see WP_Customize_Section::print_template(). |
0 | 306 |
* |
307 |
* @since 3.4.0 |
|
308 |
*/ |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
309 |
protected function render() {} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
310 |
|
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 |
* Render the section's JS template. |
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 |
* 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
|
315 |
* WP_Customize_Manager::register_section_type(). |
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 |
* @since 4.3.0 |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
318 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
319 |
* @see WP_Customize_Manager::render_template() |
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 |
public function print_template() { |
0 | 322 |
?> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
323 |
<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
|
324 |
<?php $this->render_template(); ?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
325 |
</script> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
326 |
<?php |
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 |
|
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 |
* An Underscore (JS) template for rendering this section. |
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 |
* 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
|
333 |
* export custom variables by overriding WP_Customize_Section::json(). |
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 |
* @since 4.3.0 |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
336 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
337 |
* @see WP_Customize_Section::print_template() |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
338 |
*/ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
339 |
protected function render_template() { |
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 |
<li id="accordion-section-{{ data.id }}" class="accordion-section control-section control-section-{{ data.type }}"> |
5 | 342 |
<h3 class="accordion-section-title" tabindex="0"> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
343 |
{{ data.title }} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
344 |
<span class="screen-reader-text"><?php _e( 'Press return or enter to open this section' ); ?></span> |
5 | 345 |
</h3> |
0 | 346 |
<ul class="accordion-section-content"> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
347 |
<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
|
348 |
<div class="customize-section-title"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
349 |
<button class="customize-section-back" tabindex="-1"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
350 |
<span class="screen-reader-text"><?php _e( 'Back' ); ?></span> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
351 |
</button> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
352 |
<h3> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
353 |
<span class="customize-action"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
354 |
{{{ data.customizeAction }}} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
355 |
</span> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
356 |
{{ data.title }} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
357 |
</h3> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
358 |
<# if ( data.description && data.description_hidden ) { #> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
359 |
<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
|
360 |
<div class="description customize-section-description"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
361 |
{{{ data.description }}} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
362 |
</div> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
363 |
<# } #> |
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 |
<div class="customize-control-notifications-container"></div> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
366 |
</div> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
367 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
368 |
<# if ( data.description && ! data.description_hidden ) { #> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
369 |
<div class="description customize-section-description"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
370 |
{{{ data.description }}} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
371 |
</div> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
372 |
<# } #> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
373 |
</li> |
0 | 374 |
</ul> |
375 |
</li> |
|
376 |
<?php |
|
377 |
} |
|
378 |
} |
|
5 | 379 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
380 |
/** WP_Customize_Themes_Section class */ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
381 |
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-themes-section.php' ); |
5 | 382 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
383 |
/** WP_Customize_Sidebar_Section class */ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
384 |
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-sidebar-section.php' ); |
5 | 385 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
386 |
/** WP_Customize_Nav_Menu_Section class */ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
387 |
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-section.php' ); |
5 | 388 |
|
389 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
390 |
* WP_Customize_New_Menu_Section class |
5 | 391 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
392 |
* As this file is deprecated, it will trigger a deprecation notice if instantiated. In a subsequent |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
393 |
* release, the require_once() here will be removed and _deprecated_file() will be called if file is |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
394 |
* required at all. |
5 | 395 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
396 |
* @deprecated 4.9.0 This file is no longer used due to new menu creation UX. |
5 | 397 |
*/ |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
398 |
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-new-menu-section.php' ); |