2015-10-24 14:57:25 -04:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Customize API: WP_Customize_Image_Control class
|
|
|
|
*
|
|
|
|
* @package WordPress
|
|
|
|
* @subpackage Customize
|
|
|
|
* @since 4.4.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Customize Image Control class.
|
|
|
|
*
|
|
|
|
* @since 3.4.0
|
|
|
|
*
|
|
|
|
* @see WP_Customize_Upload_Control
|
|
|
|
*/
|
|
|
|
class WP_Customize_Image_Control extends WP_Customize_Upload_Control {
|
|
|
|
public $type = 'image';
|
|
|
|
public $mime_type = 'image';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Constructor.
|
|
|
|
*
|
|
|
|
* @since 3.4.0
|
|
|
|
* @uses WP_Customize_Upload_Control::__construct()
|
|
|
|
*
|
|
|
|
* @param WP_Customize_Manager $manager Customizer bootstrap instance.
|
|
|
|
* @param string $id Control ID.
|
|
|
|
* @param array $args Optional. Arguments to override class property defaults.
|
|
|
|
*/
|
|
|
|
public function __construct( $manager, $id, $args = array() ) {
|
|
|
|
parent::__construct( $manager, $id, $args );
|
|
|
|
|
2016-02-28 19:40:26 -05:00
|
|
|
$this->button_labels = wp_parse_args( $this->button_labels, array(
|
2015-10-24 14:57:25 -04:00
|
|
|
'select' => __( 'Select Image' ),
|
|
|
|
'change' => __( 'Change Image' ),
|
|
|
|
'remove' => __( 'Remove' ),
|
|
|
|
'default' => __( 'Default' ),
|
|
|
|
'placeholder' => __( 'No image selected' ),
|
|
|
|
'frame_title' => __( 'Select Image' ),
|
|
|
|
'frame_button' => __( 'Choose Image' ),
|
2016-02-28 19:40:26 -05:00
|
|
|
) );
|
2015-10-24 14:57:25 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @since 3.4.2
|
|
|
|
* @deprecated 4.1.0
|
|
|
|
*/
|
|
|
|
public function prepare_control() {}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @since 3.4.0
|
|
|
|
* @deprecated 4.1.0
|
|
|
|
*
|
|
|
|
* @param string $id
|
|
|
|
* @param string $label
|
|
|
|
* @param mixed $callback
|
|
|
|
*/
|
2017-08-19 23:38:46 -04:00
|
|
|
public function add_tab( $id, $label, $callback ) {
|
|
|
|
_deprecated_function( __METHOD__, '4.1.0' );
|
|
|
|
}
|
2015-10-24 14:57:25 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @since 3.4.0
|
|
|
|
* @deprecated 4.1.0
|
|
|
|
*
|
|
|
|
* @param string $id
|
|
|
|
*/
|
2017-08-19 23:38:46 -04:00
|
|
|
public function remove_tab( $id ) {
|
|
|
|
_deprecated_function( __METHOD__, '4.1.0' );
|
|
|
|
}
|
2015-10-24 14:57:25 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @since 3.4.0
|
|
|
|
* @deprecated 4.1.0
|
|
|
|
*
|
|
|
|
* @param string $url
|
|
|
|
* @param string $thumbnail_url
|
|
|
|
*/
|
2017-08-19 23:38:46 -04:00
|
|
|
public function print_tab_image( $url, $thumbnail_url = null ) {
|
|
|
|
_deprecated_function( __METHOD__, '4.1.0' );
|
|
|
|
}
|
2015-10-24 14:57:25 -04:00
|
|
|
}
|