author | ymh <ymh.work@gmail.com> |
Tue, 22 Oct 2019 16:11:46 +0200 | |
changeset 15 | 3d4e9c994f10 |
parent 9 | 177826044cd9 |
child 16 | a86126ab1dd4 |
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 |
/** |
|
80 |
* Theme feature support for the section. |
|
81 |
* |
|
82 |
* @since 3.4.0 |
|
83 |
* @var string|array |
|
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. |
152 |
* @param string $id An specific ID of the section. |
|
153 |
* @param array $args Section arguments. |
|
0 | 154 |
*/ |
5 | 155 |
public function __construct( $manager, $id, $args = array() ) { |
156 |
$keys = array_keys( get_object_vars( $this ) ); |
|
0 | 157 |
foreach ( $keys as $key ) { |
5 | 158 |
if ( isset( $args[ $key ] ) ) { |
0 | 159 |
$this->$key = $args[ $key ]; |
5 | 160 |
} |
0 | 161 |
} |
162 |
||
163 |
$this->manager = $manager; |
|
9 | 164 |
$this->id = $id; |
5 | 165 |
if ( empty( $this->active_callback ) ) { |
166 |
$this->active_callback = array( $this, 'active_callback' ); |
|
167 |
} |
|
168 |
self::$instance_count += 1; |
|
169 |
$this->instance_number = self::$instance_count; |
|
0 | 170 |
|
171 |
$this->controls = array(); // Users cannot customize the $controls array. |
|
172 |
} |
|
173 |
||
174 |
/** |
|
5 | 175 |
* Check whether section is active to current Customizer preview. |
176 |
* |
|
177 |
* @since 4.1.0 |
|
178 |
* |
|
179 |
* @return bool Whether the section is active to the current preview. |
|
180 |
*/ |
|
181 |
final public function active() { |
|
182 |
$section = $this; |
|
9 | 183 |
$active = call_user_func( $this->active_callback, $this ); |
5 | 184 |
|
185 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
186 |
* Filters response of WP_Customize_Section::active(). |
5 | 187 |
* |
188 |
* @since 4.1.0 |
|
189 |
* |
|
190 |
* @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
|
191 |
* @param WP_Customize_Section $section WP_Customize_Section instance. |
5 | 192 |
*/ |
193 |
$active = apply_filters( 'customize_section_active', $active, $section ); |
|
194 |
||
195 |
return $active; |
|
196 |
} |
|
197 |
||
198 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
199 |
* Default callback used when invoking WP_Customize_Section::active(). |
5 | 200 |
* |
201 |
* Subclasses can override this with their specific logic, or they may provide |
|
202 |
* an 'active_callback' argument to the constructor. |
|
203 |
* |
|
204 |
* @since 4.1.0 |
|
205 |
* |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
206 |
* @return true Always true. |
5 | 207 |
*/ |
208 |
public function active_callback() { |
|
209 |
return true; |
|
210 |
} |
|
211 |
||
212 |
/** |
|
213 |
* Gather the parameters passed to client JavaScript via JSON. |
|
214 |
* |
|
215 |
* @since 4.1.0 |
|
216 |
* |
|
217 |
* @return array The array to be exported to the client as JSON. |
|
218 |
*/ |
|
219 |
public function json() { |
|
9 | 220 |
$array = wp_array_slice_assoc( (array) $this, array( 'id', 'description', 'priority', 'panel', 'type', 'description_hidden' ) ); |
221 |
$array['title'] = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) ); |
|
222 |
$array['content'] = $this->get_content(); |
|
223 |
$array['active'] = $this->active(); |
|
5 | 224 |
$array['instanceNumber'] = $this->instance_number; |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
225 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
226 |
if ( $this->panel ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
227 |
/* 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
|
228 |
$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
|
229 |
} else { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
230 |
$array['customizeAction'] = __( 'Customizing' ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
231 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
232 |
|
5 | 233 |
return $array; |
234 |
} |
|
235 |
||
236 |
/** |
|
237 |
* Checks required user capabilities and whether the theme has the |
|
238 |
* feature support required by the section. |
|
0 | 239 |
* |
240 |
* @since 3.4.0 |
|
241 |
* |
|
242 |
* @return bool False if theme doesn't support the section or user doesn't have the capability. |
|
243 |
*/ |
|
5 | 244 |
final public function check_capabilities() { |
245 |
if ( $this->capability && ! call_user_func_array( 'current_user_can', (array) $this->capability ) ) { |
|
0 | 246 |
return false; |
5 | 247 |
} |
0 | 248 |
|
5 | 249 |
if ( $this->theme_supports && ! call_user_func_array( 'current_theme_supports', (array) $this->theme_supports ) ) { |
0 | 250 |
return false; |
5 | 251 |
} |
0 | 252 |
|
253 |
return true; |
|
254 |
} |
|
255 |
||
256 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
257 |
* Get the section's content for insertion into the Customizer pane. |
5 | 258 |
* |
259 |
* @since 4.1.0 |
|
260 |
* |
|
261 |
* @return string Contents of the section. |
|
262 |
*/ |
|
263 |
final public function get_content() { |
|
264 |
ob_start(); |
|
265 |
$this->maybe_render(); |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
266 |
return trim( ob_get_clean() ); |
5 | 267 |
} |
268 |
||
269 |
/** |
|
0 | 270 |
* Check capabilities and render the section. |
271 |
* |
|
272 |
* @since 3.4.0 |
|
273 |
*/ |
|
5 | 274 |
final public function maybe_render() { |
275 |
if ( ! $this->check_capabilities() ) { |
|
0 | 276 |
return; |
5 | 277 |
} |
0 | 278 |
|
5 | 279 |
/** |
280 |
* Fires before rendering a Customizer section. |
|
281 |
* |
|
282 |
* @since 3.4.0 |
|
283 |
* |
|
284 |
* @param WP_Customize_Section $this WP_Customize_Section instance. |
|
285 |
*/ |
|
0 | 286 |
do_action( 'customize_render_section', $this ); |
5 | 287 |
/** |
288 |
* Fires before rendering a specific Customizer section. |
|
289 |
* |
|
290 |
* The dynamic portion of the hook name, `$this->id`, refers to the ID |
|
291 |
* of the specific Customizer section to be rendered. |
|
292 |
* |
|
293 |
* @since 3.4.0 |
|
294 |
*/ |
|
295 |
do_action( "customize_render_section_{$this->id}" ); |
|
0 | 296 |
|
297 |
$this->render(); |
|
298 |
} |
|
299 |
||
300 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
301 |
* Render the section UI in a subclass. |
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 |
* Sections are now rendered in JS by default, see WP_Customize_Section::print_template(). |
0 | 304 |
* |
305 |
* @since 3.4.0 |
|
306 |
*/ |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
307 |
protected function render() {} |
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 |
/** |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
310 |
* Render the section's JS template. |
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 |
* 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
|
313 |
* WP_Customize_Manager::register_section_type(). |
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 |
* @since 4.3.0 |
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 |
* @see WP_Customize_Manager::render_template() |
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 |
public function print_template() { |
0 | 320 |
?> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
321 |
<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
|
322 |
<?php $this->render_template(); ?> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
323 |
</script> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
324 |
<?php |
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 |
/** |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
328 |
* An Underscore (JS) template for rendering this section. |
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 |
* 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
|
331 |
* export custom variables by overriding WP_Customize_Section::json(). |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
332 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
333 |
* @since 4.3.0 |
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 |
* @see WP_Customize_Section::print_template() |
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 |
protected function render_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 |
<li id="accordion-section-{{ data.id }}" class="accordion-section control-section control-section-{{ data.type }}"> |
5 | 340 |
<h3 class="accordion-section-title" tabindex="0"> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
341 |
{{ data.title }} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
342 |
<span class="screen-reader-text"><?php _e( 'Press return or enter to open this section' ); ?></span> |
5 | 343 |
</h3> |
0 | 344 |
<ul class="accordion-section-content"> |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
345 |
<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
|
346 |
<div class="customize-section-title"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
347 |
<button class="customize-section-back" tabindex="-1"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
348 |
<span class="screen-reader-text"><?php _e( 'Back' ); ?></span> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
349 |
</button> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
350 |
<h3> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
351 |
<span class="customize-action"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
352 |
{{{ data.customizeAction }}} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
353 |
</span> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
354 |
{{ data.title }} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
355 |
</h3> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
356 |
<# if ( data.description && data.description_hidden ) { #> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
357 |
<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
|
358 |
<div class="description customize-section-description"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
359 |
{{{ data.description }}} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
360 |
</div> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
361 |
<# } #> |
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 |
<div class="customize-control-notifications-container"></div> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
364 |
</div> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
365 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
366 |
<# if ( data.description && ! data.description_hidden ) { #> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
367 |
<div class="description customize-section-description"> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
368 |
{{{ data.description }}} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
369 |
</div> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
370 |
<# } #> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
371 |
</li> |
0 | 372 |
</ul> |
373 |
</li> |
|
374 |
<?php |
|
375 |
} |
|
376 |
} |
|
5 | 377 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
378 |
/** WP_Customize_Themes_Section class */ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
379 |
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-themes-section.php' ); |
5 | 380 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
381 |
/** WP_Customize_Sidebar_Section 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-sidebar-section.php' ); |
5 | 383 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
384 |
/** WP_Customize_Nav_Menu_Section class */ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
385 |
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-nav-menu-section.php' ); |
5 | 386 |
|
387 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
388 |
* WP_Customize_New_Menu_Section class |
5 | 389 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
390 |
* 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
|
391 |
* 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
|
392 |
* required at all. |
5 | 393 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
394 |
* @deprecated 4.9.0 This file is no longer used due to new menu creation UX. |
5 | 395 |
*/ |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
396 |
require_once( ABSPATH . WPINC . '/customize/class-wp-customize-new-menu-section.php' ); |