3 * Customize API: WP_Widget_Area_Customize_Control class
6 * @subpackage Customize
11 * Widget Area Customize Control class.
15 * @see WP_Customize_Control
17 class WP_Widget_Area_Customize_Control extends WP_Customize_Control {
20 * Customize control type.
26 public $type = 'sidebar_widgets';
38 * Refreshes the parameters passed to the JavaScript via JSON.
43 public function to_json() {
45 $exported_properties = array( 'sidebar_id' );
46 foreach ( $exported_properties as $key ) {
47 $this->json[ $key ] = $this->$key;
52 * Renders the control's content.
57 public function render_content() {
58 $id = 'reorder-widgets-desc-' . str_replace( array( '[', ']' ), array( '-', '' ), $this->id );
60 <button type="button" class="button add-new-widget" aria-expanded="false" aria-controls="available-widgets">
61 <?php _e( 'Add a Widget' ); ?>
63 <button type="button" class="button-link reorder-toggle" aria-label="<?php esc_attr_e( 'Reorder widgets' ); ?>" aria-describedby="<?php echo esc_attr( $id ); ?>">
64 <span class="reorder"><?php _ex( 'Reorder', 'Reorder widgets in Customizer' ); ?></span>
65 <span class="reorder-done"><?php _ex( 'Done', 'Cancel reordering widgets in Customizer' ); ?></span>
67 <p class="screen-reader-text" id="<?php echo esc_attr( $id ); ?>"><?php _e( 'When in reorder mode, additional controls to reorder widgets will be available in the widgets list above.' ); ?></p>