Changeset 38829 for trunk/src/wp-includes/class-wp-customize-section.php
- Timestamp:
- 10/19/2016 06:14:21 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-section.php
r38470 r38829 147 147 148 148 /** 149 * Show the description or hide it behind the help icon. 150 * 151 * @since 4.7.0 152 * @access public 153 * 154 * @var bool Indicates whether the Section's description should be 155 * hidden behind a help icon ("?") in the Section header, 156 * similar to how help icons are displayed on Panels. 157 */ 158 public $description_hidden = false; 159 160 /** 149 161 * Constructor. 150 162 * … … 224 236 */ 225 237 public function json() { 226 $array = wp_array_slice_assoc( (array) $this, array( 'id', 'description', 'priority', 'panel', 'type' ) );238 $array = wp_array_slice_assoc( (array) $this, array( 'id', 'description', 'priority', 'panel', 'type', 'description_hidden' ) ); 227 239 $array['title'] = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) ); 228 240 $array['content'] = $this->get_content(); … … 325 337 */ 326 338 public function print_template() { 327 339 ?> 328 340 <script type="text/html" id="tmpl-customize-section-<?php echo $this->type; ?>"> 329 341 <?php $this->render_template(); ?> 330 342 </script> 331 343 <?php 332 344 } 333 345 … … 351 363 </h3> 352 364 <ul class="accordion-section-content"> 353 <li class="customize-section-description-container ">365 <li class="customize-section-description-container section-meta <# if ( data.description_hidden ) { #>customize-info<# } #>"> 354 366 <div class="customize-section-title"> 355 367 <button class="customize-section-back" tabindex="-1"> … … 362 374 {{ data.title }} 363 375 </h3> 376 <# if ( data.description && data.description_hidden ) { #> 377 <button type="button" class="customize-help-toggle dashicons dashicons-editor-help" aria-expanded="false"><span class="screen-reader-text"><?php _e( 'Help' ); ?></span></button> 378 <div class="description customize-section-description"> 379 {{{ data.description }}} 380 </div> 381 <# } #> 364 382 </div> 365 <# if ( data.description ) { #> 383 384 <# if ( data.description && ! data.description_hidden ) { #> 366 385 <div class="description customize-section-description"> 367 386 {{{ data.description }}}
Note: See TracChangeset
for help on using the changeset viewer.