diff --git a/src/wp-includes/customize/class-wp-customize-image-control.php b/src/wp-includes/customize/class-wp-customize-image-control.php index dc50a3a115..ffb89e3f4a 100644 --- a/src/wp-includes/customize/class-wp-customize-image-control.php +++ b/src/wp-includes/customize/class-wp-customize-image-control.php @@ -31,7 +31,7 @@ class WP_Customize_Image_Control extends WP_Customize_Upload_Control { public function __construct( $manager, $id, $args = array() ) { parent::__construct( $manager, $id, $args ); - $this->button_labels = array( + $this->button_labels = wp_parse_args( $this->button_labels, array( 'select' => __( 'Select Image' ), 'change' => __( 'Change Image' ), 'remove' => __( 'Remove' ), @@ -39,7 +39,7 @@ class WP_Customize_Image_Control extends WP_Customize_Upload_Control { 'placeholder' => __( 'No image selected' ), 'frame_title' => __( 'Select Image' ), 'frame_button' => __( 'Choose Image' ), - ); + ) ); } /** diff --git a/src/wp-includes/customize/class-wp-customize-media-control.php b/src/wp-includes/customize/class-wp-customize-media-control.php index c99fd986f2..bcd8db8a63 100644 --- a/src/wp-includes/customize/class-wp-customize-media-control.php +++ b/src/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 ) { #> - + <# } #>