WP_Customize_Image_Control

Customize Image Control class.


Description Description

See also See also


Top ↑

Source Source

File: wp-includes/customize/class-wp-customize-image-control.php

class WP_Customize_Image_Control extends WP_Customize_Upload_Control {
	public $type      = 'image';
	public $mime_type = 'image';

	/**
	 * @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
	 */
	public function add_tab( $id, $label, $callback ) {
		_deprecated_function( __METHOD__, '4.1.0' );
	}

	/**
	 * @since 3.4.0
	 * @deprecated 4.1.0
	 *
	 * @param string $id
	 */
	public function remove_tab( $id ) {
		_deprecated_function( __METHOD__, '4.1.0' );
	}

	/**
	 * @since 3.4.0
	 * @deprecated 4.1.0
	 *
	 * @param string $url
	 * @param string $thumbnail_url
	 */
	public function print_tab_image( $url, $thumbnail_url = null ) {
		_deprecated_function( __METHOD__, '4.1.0' );
	}
}

Top ↑

Changelog Changelog

Changelog
Version Description
3.4.0 Introduced.


Top ↑

Methods Methods


Top ↑

User Contributed Notes User Contributed Notes

  1. Skip to note 2 content
    Contributed by Chetan Satasiya

    This class is used with the Theme Customization API to render the custom image control on the Theme Customizer in WordPress 3.4 or newer.

    $wp_customize->add_control(
           new WP_Customize_Image_Control(
               $wp_customize,
               'logo',
               array(
                   'label'      => __( 'Upload a logo', 'theme_name' ),
                   'section'    => 'your_section_id',
                   'settings'   => 'your_setting_id',
                   'context'    => 'your_setting_context' 
               )
           )
       );
    

You must log in before being able to contribute a note or feedback.