Customize: Allow button_labels to be overridden in $args passed to WP_Customize_Media_Control and WP_Customize_Image_Control.

Props chetanchauhan, celloexpressions.
See #33755.
Fixes #35542.


git-svn-id: https://develop.svn.wordpress.org/trunk@36769 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter
2016-02-29 00:39:33 +00:00
parent 92dbe29078
commit f60e7fd99d
2 changed files with 18 additions and 16 deletions
@@ -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' ),
);
) );
}
/**