WordPress customization default control list

WordPress Some default control are list as bellow.

function dalwadi_theme_customizer( $wp_customize ) {
	
	/**********/
	/* add Panle in WP Customizer
	/**********/
	$wp_customize->add_panel( 'dalwadi_list_controls', array(
		'capability'     =>	'edit_theme_options',
		'theme_supports' =>	'',
		'title'          =>	__('Wp List Of Controls [PANEL]','textdomain'),
		'description'    =>	'',
		'priority'		 =>	30,
	) );
	
	/**********/
	/* add Section in WP Customizer
	/**********/
	$wp_customize->add_section( 'dalwadi_section' , array(
		'title'			=>	__( 'Controls List [SECTION]', 'textdomain' ),
		'priority'		=>	30,
		'panel'  		=>	'dalwadi_list_controls',
		'capability'	=>	'edit_theme_options',
	) );
	
	
	
	
	/**********/
	/* Control in WP Customizer
	/**********/
	
	// Text Control
	$wp_customize->add_setting( 'dalwadi_demo_text', array(
		'default'        => ' ',
		'sanitize_callback' => 'esc_attr',
		'capability'     => 'edit_theme_options',
	) );
   $wp_customize->add_control( 'dalwadi_demo_text', array(
		'label'   => __('Demo Title [CONTROL]','textdomain'),
		'section' => 'dalwadi_section',
		'type'    => 'text',
   ) );
   
   // Number Control
	$wp_customize->add_setting( 'dalwadi_demo_number', array(
		'default'        => ' ',
		'sanitize_callback' => 'esc_attr',
		'capability'     => 'edit_theme_options',
	) );
   $wp_customize->add_control( 'dalwadi_demo_number', array(
		'label'   => __('Text Title [CONTROL]','textdomain'),
		'section' => 'dalwadi_section',
		'type'    => 'number',
   ) );
   
   // Number Control
	$wp_customize->add_setting( 'dalwadi_demo_number', array(
		'default'        => ' ',
		'sanitize_callback' => 'esc_attr',
		'capability'     => 'edit_theme_options',
	) );
   $wp_customize->add_control( 'dalwadi_demo_number', array(
		'label'   => __('Number Title [CONTROL]','textdomain'),
		'section' => 'dalwadi_section',
		'type'    => 'number',
   ) );
   
   // Radio Box Control
	$wp_customize->add_setting( 'dalwadi_demo_radio', array(
		'default'        => ' ',
		'sanitize_callback' => 'esc_attr',
		'capability'     => 'edit_theme_options',
	) );
   $wp_customize->add_control( 'dalwadi_demo_radio', array(
		'label'   => __('Radio Title [CONTROL]','textdomain'),
		'section' => 'dalwadi_section',
		'type'     => 'radio',
		'choices'  => array(
			'left'  => 'left',
			'right' => 'right',
		),
   ) );
   
   // Select Box Control
	$wp_customize->add_setting( 'dalwadi_demo_select', array(
		'default'        => 'right',
		'sanitize_callback' => 'esc_attr',
		'capability'     => 'edit_theme_options',
	) );
   $wp_customize->add_control( 'dalwadi_demo_select', array(
		'label'   => __('Select Title [CONTROL]','textdomain'),
		'section' => 'dalwadi_section',
		'type'     => 'select',
		'choices'  => array(
			'left'  => 'left',
			'right' => 'right',
		),
   ) );
   
	// Color Control
   	$wp_customize->add_setting( 'dalwadi_demo_color', array(
		'default'           => '#ddd',
		'sanitize_callback' => 'sanitize_hex_color',
		'transport'         => 'postMessage',
	) );

	$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'dalwadi_demo_color', array(
		'label'       => __( 'Color Title [CONTROL]', 'textdomain' ),
		'section'     => 'dalwadi_section',
	) ) );
	
	
	// Image Control
	$wp_customize->add_setting( 'dalwadi_demo_image' ,array(
		'sanitize_callback' => 'esc_url_raw',
		'capability'     => 'edit_theme_options',
		)
	 );
    $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'dalwadi_demo_image', array(
		'label'    => __( 'Image Title [CONTROL]', 'niche' ),
		'section'  => 'dalwadi_section',
		'settings' => 'dalwadi_demo_image',
	) ) );
	
		            
}
add_action( 'customize_register', 'dalwadi_theme_customizer' );

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s