Changeset 29487
- Timestamp:
- 08/14/2014 04:39:42 AM (10 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-manager.php
r29454 r29487 67 67 public function __construct() { 68 68 require( ABSPATH . WPINC . '/class-wp-customize-setting.php' ); 69 require( ABSPATH . WPINC . '/class-wp-customize-panel.php' ); 69 70 require( ABSPATH . WPINC . '/class-wp-customize-section.php' ); 70 71 require( ABSPATH . WPINC . '/class-wp-customize-control.php' ); -
trunk/src/wp-includes/class-wp-customize-section.php
r29482 r29487 195 195 } 196 196 } 197 198 /**199 * Customize Panel Class.200 *201 * A UI container for sections, managed by the WP_Customize_Manager.202 *203 * @package WordPress204 * @subpackage Customize205 * @since 4.0.0206 */207 class WP_Customize_Panel extends WP_Customize_Section {208 209 /**210 * Customizer sections for this panel.211 *212 * @since 4.0.0213 * @access public214 * @var array215 */216 public $sections;217 218 /**219 * Constructor.220 *221 * Any supplied $args override class property defaults.222 *223 * @since 4.0.0224 * @access public225 *226 * @param WP_Customize_Manager $manager Customizer bootstrap instance.227 * @param string $id An specific ID of the section.228 * @param array $args Optional. Section arguments. Default empty array.229 */230 public function __construct( $manager, $id, $args = array() ) {231 parent::__construct( $manager, $id, $args );232 233 $this->sections = array(); // Users cannot customize the $sections array.234 235 return $this;236 }237 238 /**239 * Render the panel, and the sections that have been added to it.240 *241 * @since 4.0.0242 * @access protected243 */244 protected function render() {245 ?>246 <li id="accordion-panel-<?php echo esc_attr( $this->id ); ?>" class="control-section control-panel accordion-section">247 <h3 class="accordion-section-title" tabindex="0">248 <?php echo esc_html( $this->title ); ?>249 <span class="screen-reader-text"><?php _e( 'Press return or enter to open panel' ); ?></span>250 </h3>251 <span class="control-panel-back" tabindex="-1"><span class="screen-reader-text"><?php _e( 'Back' ); ?></span></span>252 <ul class="accordion-sub-container control-panel-content">253 <li class="accordion-section control-section<?php if ( empty( $this->description ) ) echo ' cannot-expand'; ?>">254 <div class="accordion-section-title" tabindex="0">255 <span class="preview-notice"><?php256 /* translators: %s is the site/panel title in the Customize pane */257 echo sprintf( __( 'You are customizing %s' ), '<strong class="panel-title">' . esc_html( $this->title ) . '</strong>' );258 ?></span>259 </div>260 <?php if ( ! empty( $this->description ) ) : ?>261 <div class="accordion-section-content description">262 <?php echo $this->description; ?>263 </div>264 <?php endif; ?>265 </li>266 <?php267 foreach ( $this->sections as $section ) {268 $section->maybe_render();269 }270 ?>271 </ul>272 </li>273 <?php274 }275 }
Note: See TracChangeset
for help on using the changeset viewer.