Make WordPress Core


Ignore:
Timestamp:
09/20/2017 09:23:51 PM (7 years ago)
Author:
westonruter
Message:

Customize: Let media control button labels better automatically reflect the specified MIME type.

Props Christian1012, celloexpressions, westonruter.
Fixes #38796.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/customize/class-wp-customize-image-control.php

    r41273 r41550  
    1818    public $type = 'image';
    1919    public $mime_type = 'image';
    20 
    21     /**
    22      * Constructor.
    23      *
    24      * @since 3.4.0
    25      * @uses WP_Customize_Upload_Control::__construct()
    26      *
    27      * @param WP_Customize_Manager $manager Customizer bootstrap instance.
    28      * @param string               $id      Control ID.
    29      * @param array                $args    Optional. Arguments to override class property defaults.
    30      */
    31     public function __construct( $manager, $id, $args = array() ) {
    32         parent::__construct( $manager, $id, $args );
    33 
    34         $this->button_labels = wp_parse_args( $this->button_labels, array(
    35             'select'       => __( 'Select Image' ),
    36             'change'       => __( 'Change Image' ),
    37             'remove'       => __( 'Remove' ),
    38             'default'      => __( 'Default' ),
    39             'placeholder'  => __( 'No image selected' ),
    40             'frame_title'  => __( 'Select Image' ),
    41             'frame_button' => __( 'Choose Image' ),
    42         ) );
    43     }
    4420
    4521    /**
Note: See TracChangeset for help on using the changeset viewer.