X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/0459461f9ea42e0b090759ff6fe5f48360bef750..refs/tags/wordpress-4.5:/wp-includes/customize/class-wp-customize-media-control.php diff --git a/wp-includes/customize/class-wp-customize-media-control.php b/wp-includes/customize/class-wp-customize-media-control.php index c99fd986..f066c022 100644 --- a/wp-includes/customize/class-wp-customize-media-control.php +++ b/wp-includes/customize/class-wp-customize-media-control.php @@ -55,15 +55,17 @@ class WP_Customize_Media_Control extends WP_Customize_Control { public function __construct( $manager, $id, $args = array() ) { parent::__construct( $manager, $id, $args ); - $this->button_labels = array( - 'select' => __( 'Select File' ), - 'change' => __( 'Change File' ), - 'default' => __( 'Default' ), - 'remove' => __( 'Remove' ), - 'placeholder' => __( 'No file selected' ), - 'frame_title' => __( 'Select File' ), - 'frame_button' => __( 'Choose File' ), - ); + if ( ! ( $this instanceof WP_Customize_Image_Control ) ) { + $this->button_labels = wp_parse_args( $this->button_labels, array( + 'select' => __( 'Select File' ), + 'change' => __( 'Change File' ), + 'default' => __( 'Default' ), + 'remove' => __( 'Remove' ), + 'placeholder' => __( 'No file selected' ), + 'frame_title' => __( 'Select File' ), + 'frame_button' => __( 'Choose File' ), + ) ); + } } /** @@ -193,8 +195,8 @@ class WP_Customize_Media_Control extends WP_Customize_Control {
<# if ( data.canUpload ) { #> - - + +
<# } #>
@@ -204,7 +206,7 @@ class WP_Customize_Media_Control extends WP_Customize_Control {
- button_labels['placeholder']; ?> + {{ data.button_labels.placeholder }}
@@ -212,10 +214,10 @@ class WP_Customize_Media_Control extends WP_Customize_Control {
<# if ( data.defaultAttachment ) { #> - + <# } #> <# if ( data.canUpload ) { #> - + <# } #>