add_panel('app7_theme_option', array( 'priority' => 10, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => esc_html__( 'App7 Theme Options', 'app7' ) )); // Subscribe text $app7_customizer->add_section('map', array( 'title' => esc_html__( 'Google Map', 'app7' ), 'priority' => 10, 'panel' => 'app7_theme_option' )); $app7_customizer->add_setting('map_api', array( 'default' => '', 'transport' => 'refresh' )); $app7_customizer->add_control('map_api', array( 'section' => 'map', 'label' => esc_html__( 'Map Api', 'app7' ), 'description' => esc_html__( 'Api Key Example: AIzaSyCYMloK_kzsasOQXg-xhGxnwvlAU3HTZWg', 'app7' ), 'type' => 'textarea', 'setting' => 'map_api' )); /** * Header Option */ $app7_customizer->add_section('header', array( 'title' => esc_html__( 'Header Options', 'app7' ), 'priority' => 10, 'panel' => 'app7_theme_option' )); // choose logo $app7_customizer->add_setting('logo_style', array( 'default' => '', 'transport' => 'refresh' )); $app7_customizer->add_control( 'logo_style', array( 'type' => 'radio', 'section' => 'header', 'setting' => 'logo_style', 'label' => esc_html__( 'Choose Your Logo', 'app7' ), 'choices' => array( 'one' => esc_html__( 'Logo Text', 'app7' ), 'two' => esc_html__( 'Logo Image', 'app7' ), ), ) ); // header logo Text $app7_customizer->add_setting('header_logo_text', array( 'default' => esc_html__( 'App7', 'app7' ), 'transport' => 'refresh' )); $app7_customizer->add_control('header_logo_text', array( 'section' => 'header', 'label' => esc_html__( 'Header Logo Text', 'app7' ), 'type' => 'text', 'setting' => 'header_logo_text' )); // header logo $app7_customizer->add_setting('header_logo', array( 'default' => ' ', 'transport' => 'refresh' )); $app7_customizer->add_control( new WP_Customize_Image_Control($app7_customizer, 'header_logo', array( 'section' => 'header', 'label' => esc_html__( 'Header Logo', 'app7' ), 'setting' => 'header_logo' )) ); /** * Footer Option */ $app7_customizer->add_section('footer', array( 'title' => esc_html__( 'Footer Options', 'app7' ), 'priority' => 20, 'panel' => 'app7_theme_option' )); // choose footer $app7_customizer->add_setting('footer_style', array( 'default' => '', 'transport' => 'refresh' )); $app7_customizer->add_control( 'footer_style', array( 'type' => 'radio', 'section' => 'footer', 'setting' => 'footer_style', 'label' => esc_html__( 'Choose Footer Style', 'app7' ), 'choices' => array( 'one' => esc_html__( 'Default Footer', 'app7' ), 'two' => esc_html__( 'Footer Style Two', 'app7' ), ), ) ); // footer-bg-image $app7_customizer->add_setting('footer_bg', array( 'default' => get_template_directory_uri() . '/images/bg-footer.png', 'transport' => 'refresh' )); $app7_customizer->add_control( new WP_Customize_Image_Control($app7_customizer, 'footer_bg', array( 'section' => 'footer', 'label' => esc_html__( 'Footer BG Image', 'app7' ), 'setting' => 'footer_bg' )) ); // Subscribe text $app7_customizer->add_setting('subscribe_text', array( 'default' => ' ', 'transport' => 'refresh' )); $app7_customizer->add_control('subscribe_text', array( 'section' => 'footer', 'label' => esc_html__( 'Subscribe Text', 'app7' ), 'type' => 'textarea_safe', 'setting' => 'subscribe_text' )); // Footer logo $app7_customizer->add_setting('footer_logo', array( 'default' => esc_html__( 'App7', 'app7' ), 'transport' => 'refresh' )); $app7_customizer->add_control('footer_logo', array( 'section' => 'footer', 'label' => esc_html__( 'Footer Logo', 'app7' ), 'type' => 'text', 'setting' => 'footer_logo' )); /** * Social media */ // facebook $app7_customizer->add_setting('facebook', array( 'default' => '', 'transport' => 'refresh' )); $app7_customizer->add_control('facebook', array( 'section' => 'footer', 'label' => esc_html__( 'Facebook Url', 'app7' ), 'type' => 'text', 'setting' => 'facebook' )); // twitter $app7_customizer->add_setting('twitter', array( 'default' => '', 'transport' => 'refresh' )); $app7_customizer->add_control('twitter', array( 'section' => 'footer', 'label' => esc_html__( 'Twitter Url', 'app7' ), 'type' => 'text', 'setting' => 'twitter' )); // google-plus $app7_customizer->add_setting('google_plus', array( 'default' => '', 'transport' => 'refresh' )); $app7_customizer->add_control('google_plus', array( 'section' => 'footer', 'label' => esc_html__( 'Google-plus Url', 'app7' ), 'type' => 'text', 'setting' => 'google_plus' )); // pinterest $app7_customizer->add_setting('pinterest', array( 'default' => '', 'transport' => 'refresh' )); $app7_customizer->add_control('pinterest', array( 'section' => 'footer', 'label' => esc_html__( 'Pinterest Url', 'app7' ), 'type' => 'text', 'setting' => 'pinterest' )); // linkedin $app7_customizer->add_setting('linkedin', array( 'default' => '', 'transport' => 'refresh' )); $app7_customizer->add_control('linkedin', array( 'section' => 'footer', 'label' => esc_html__( 'Linkedin Url', 'app7' ), 'type' => 'text', 'setting' => 'linkedin' )); //copyright $app7_customizer->add_setting('copyright', array( 'default' => esc_html__( '© Copyright ThemeLayer. All rights reserved 2018', 'app7' ), 'transport' => 'refresh' )); $app7_customizer->add_control('copyright', array( 'section' => 'footer', 'label' => esc_html__( 'Copyright', 'app7' ), 'type' => 'textarea', 'setting' => 'copyright' )); } } add_action( 'customize_register', 'app7_customizer_register' );