equal
deleted
inserted
replaced
395 /** |
395 /** |
396 * Fires just before the current Customizer control is rendered. |
396 * Fires just before the current Customizer control is rendered. |
397 * |
397 * |
398 * @since 3.4.0 |
398 * @since 3.4.0 |
399 * |
399 * |
400 * @param WP_Customize_Control $this WP_Customize_Control instance. |
400 * @param WP_Customize_Control $control WP_Customize_Control instance. |
401 */ |
401 */ |
402 do_action( 'customize_render_control', $this ); |
402 do_action( 'customize_render_control', $this ); |
403 |
403 |
404 /** |
404 /** |
405 * Fires just before a specific Customizer control is rendered. |
405 * Fires just before a specific Customizer control is rendered. |
407 * The dynamic portion of the hook name, `$this->id`, refers to |
407 * The dynamic portion of the hook name, `$this->id`, refers to |
408 * the control ID. |
408 * the control ID. |
409 * |
409 * |
410 * @since 3.4.0 |
410 * @since 3.4.0 |
411 * |
411 * |
412 * @param WP_Customize_Control $this WP_Customize_Control instance. |
412 * @param WP_Customize_Control $control WP_Customize_Control instance. |
413 */ |
413 */ |
414 do_action( "customize_render_control_{$this->id}", $this ); |
414 do_action( "customize_render_control_{$this->id}", $this ); |
415 |
415 |
416 $this->render(); |
416 $this->render(); |
417 } |
417 } |
630 /* translators: %s: Add New Page label. */ |
630 /* translators: %s: Add New Page label. */ |
631 printf( __( '+ %s' ), get_post_type_object( 'page' )->labels->add_new_item ); |
631 printf( __( '+ %s' ), get_post_type_object( 'page' )->labels->add_new_item ); |
632 ?> |
632 ?> |
633 </button> |
633 </button> |
634 <div class="new-content-item"> |
634 <div class="new-content-item"> |
635 <label for="create-input-<?php echo $this->id; ?>"><span class="screen-reader-text"><?php _e( 'New page title' ); ?></span></label> |
635 <label for="create-input-<?php echo esc_attr( $this->id ); ?>"><span class="screen-reader-text"><?php _e( 'New page title' ); ?></span></label> |
636 <input type="text" id="create-input-<?php echo $this->id; ?>" class="create-item-input" placeholder="<?php esc_attr_e( 'New page title…' ); ?>"> |
636 <input type="text" id="create-input-<?php echo esc_attr( $this->id ); ?>" class="create-item-input" placeholder="<?php esc_attr_e( 'New page title…' ); ?>"> |
637 <button type="button" class="button add-content"><?php _e( 'Add' ); ?></button> |
637 <button type="button" class="button add-content"><?php _e( 'Add' ); ?></button> |
638 </div> |
638 </div> |
639 <?php endif; ?> |
639 <?php endif; ?> |
640 <?php |
640 <?php |
641 break; |
641 break; |
673 * |
673 * |
674 * @since 4.1.0 |
674 * @since 4.1.0 |
675 */ |
675 */ |
676 final public function print_template() { |
676 final public function print_template() { |
677 ?> |
677 ?> |
678 <script type="text/html" id="tmpl-customize-control-<?php echo $this->type; ?>-content"> |
678 <script type="text/html" id="tmpl-customize-control-<?php echo esc_attr( $this->type ); ?>-content"> |
679 <?php $this->content_template(); ?> |
679 <?php $this->content_template(); ?> |
680 </script> |
680 </script> |
681 <?php |
681 <?php |
682 } |
682 } |
683 |
683 |