add_section( 'gtl_footer', array( 'title' => __('Footer Setting', 'business-curve'), 'priority' => 18, ) ); // footer widget ares $wp_customize->add_setting( 'footer_widget_areas', array( 'default' => '4', 'sanitize_callback' => 'gtl_sanitize_footer_widget', ) ); $wp_customize->add_control( 'footer_widget_areas', array( 'type' => 'radio', 'label' => __('Footer widget areas', 'business-curve'), 'section' => 'gtl_footer', 'description' => __('No of widgets you want on footer. You can add widgets from Appearance->Widgets.', 'business-curve'), 'choices' => array( '1' => __('One', 'business-curve'), '2' => __('Two', 'business-curve'), '3' => __('Three', 'business-curve'), '4' => __('Four', 'business-curve'), ), ) ); // footer copyright text $wp_customize->add_setting( 'footer_copyright', array( 'default' => __('Copyright Themeglory. All rights reserved.','business-curve'), 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'footer_copyright', array( 'type' => 'text', 'label' => __('Footer copyright', 'business-curve'), 'section' => 'gtl_footer', 'description' => __('Enter copyright text', 'business-curve'), ) ); /** * Sanitazation */ // footer widget areas function gtl_sanitize_footer_widget( $input ) { $valid = array( '1' => __('One', 'business-curve'), '2' => __('Two', 'business-curve'), '3' => __('Three', 'business-curve'), '4' => __('Four', 'business-curve') ); if ( array_key_exists( $input, $valid ) ) { return $input; } else { return ''; } }