/** * Constructor. * * @since 3.4.0 * @uses WP_Customize_Upload_Control::__construct() * * @param WP_Customize_Manager $manager * @param string $id * @param array $args */ public function __construct($manager, $id, $args) { $this->statuses = array('' => __('No Image', 'kirki')); parent::__construct($manager, $id, $args); $this->add_tab('upload-new', __('Upload New', 'kirki'), array($this, 'tab_upload_new')); $this->add_tab('uploaded', __('Uploaded', 'kirki'), array($this, 'tab_uploaded')); // Early priority to occur before $this->manager->prepare_controls(); add_action('customize_controls_init', array($this, 'prepare_control'), 5); }
/** * Constructor. * * @since 1.0.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()) { // Calls the parent __construct parent::__construct($manager, $id, $args); // Set button labels for image uploader $button_labels = $this->get_button_labels(); $this->button_labels = apply_filters('customizer_background_button_labels', $button_labels, $id); // Set field labels $field_labels = $this->get_field_labels(); $this->field_labels = apply_filters('customizer_background_field_labels', $field_labels, $id); // Set background choices $background_choices = $this->get_background_choices(); $this->background_choices = apply_filters('customizer_background_choices', $background_choices, $id); }
/** * 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); $this->button_labels = array('select' => __('Select Image'), 'change' => __('Change Image'), 'remove' => __('Remove'), 'default' => __('Default'), 'placeholder' => __('No image selected'), 'frame_title' => __('Select Image'), 'frame_button' => __('Choose Image')); }
/** * Constructor. * * If $args['settings'] is not defined, use the $id as the setting ID. * * @since 3.4.0 * @uses WP_Customize_Upload_Control::__construct() * * @param WP_Customize_Manager $manager * @param string $id * @param array $args */ public function __construct($manager, $id, $args) { $this->statuses = array('' => __('No Image')); parent::__construct($manager, $id, $args); $this->add_tab('upload-new', __('Upload New'), array($this, 'tab_upload_new')); $this->add_tab('uploaded', __('Uploaded'), array($this, 'tab_uploaded')); }