WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Class Reference/WP Customize Upload Control

Intro

This class is used with the Theme Customization API to allow a user to upload a file on the Theme Customizer in WordPress 3.4 or newer.

$wp_customize->add_control( 
	new WP_Customize_Upload_Control( 
	$wp_customize, 
	'your_setting_id', 
	array(
		'label'      => __( 'Background Image', 'mytheme' ),
		'section'    => 'your_section_id',
		'settings'   => 'your_setting_id',
	) ) 
);

For more information on available Theme Customizer controls, see the codex entry for WP_Customize_Manager->add_control()

To force a specific image size see: WP_Customize_Cropped_Image_Control

This page is marked as incomplete. You can help Codex by expanding it.