WordPress 4.5
[autoinstalls/wordpress.git] / wp-includes / customize / class-wp-customize-image-control.php
1 <?php
2 /**
3  * Customize API: WP_Customize_Image_Control class
4  *
5  * @package WordPress
6  * @subpackage Customize
7  * @since 4.4.0
8  */
9
10 /**
11  * Customize Image Control class.
12  *
13  * @since 3.4.0
14  *
15  * @see WP_Customize_Upload_Control
16  */
17 class WP_Customize_Image_Control extends WP_Customize_Upload_Control {
18         public $type = 'image';
19         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         }
44
45         /**
46          * @since 3.4.2
47          * @deprecated 4.1.0
48          */
49         public function prepare_control() {}
50
51         /**
52          * @since 3.4.0
53          * @deprecated 4.1.0
54          *
55          * @param string $id
56          * @param string $label
57          * @param mixed $callback
58          */
59         public function add_tab( $id, $label, $callback ) {}
60
61         /**
62          * @since 3.4.0
63          * @deprecated 4.1.0
64          *
65          * @param string $id
66          */
67         public function remove_tab( $id ) {}
68
69         /**
70          * @since 3.4.0
71          * @deprecated 4.1.0
72          *
73          * @param string $url
74          * @param string $thumbnail_url
75          */
76         public function print_tab_image( $url, $thumbnail_url = null ) {}
77 }