class-wp-customize-image-control.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. * Customize Image Control class.
  11. *
  12. * @since 3.4.0
  13. *
  14. * @see WP_Customize_Upload_Control
  15. */
  16. class WP_Customize_Image_Control extends WP_Customize_Upload_Control {
  17. public $type = 'image';
  18. public $mime_type = 'image';
  19. /**
  20. * Constructor.
  21. *
  22. * @since 3.4.0
  23. * @uses WP_Customize_Upload_Control::__construct()
  24. *
  25. * @param WP_Customize_Manager $manager Customizer bootstrap instance.
  26. * @param string $id Control ID.
  27. * @param array $args Optional. Arguments to override class property defaults.
  28. */
  29. public function __construct( $manager, $id, $args = array() ) {
  30. parent::__construct( $manager, $id, $args );
  31. $this->button_labels = wp_parse_args( $this->button_labels, array(
  32. 'select' => __( 'Select Image' ),
  33. 'change' => __( 'Change Image' ),
  34. 'remove' => __( 'Remove' ),
  35. 'default' => __( 'Default' ),
  36. 'placeholder' => __( 'No image selected' ),
  37. 'frame_title' => __( 'Select Image' ),
  38. 'frame_button' => __( 'Choose Image' ),
  39. ) );
  40. }
  41. /**
  42. * @since 3.4.2
  43. * @deprecated 4.1.0
  44. */
  45. public function prepare_control() {}
  46. /**
  47. * @since 3.4.0
  48. * @deprecated 4.1.0
  49. *
  50. * @param string $id
  51. * @param string $label
  52. * @param mixed $callback
  53. */
  54. public function add_tab( $id, $label, $callback ) {}
  55. /**
  56. * @since 3.4.0
  57. * @deprecated 4.1.0
  58. *
  59. * @param string $id
  60. */
  61. public function remove_tab( $id ) {}
  62. /**
  63. * @since 3.4.0
  64. * @deprecated 4.1.0
  65. *
  66. * @param string $url
  67. * @param string $thumbnail_url
  68. */
  69. public function print_tab_image( $url, $thumbnail_url = null ) {}
  70. }