add_section( 'theme_info', array( 'title' => __( 'Information Links', 'coachpress-health' ), 'priority' => 6, ) ); /** Important Links */ $wp_customize->add_setting( 'theme_info_theme', array( 'default' => '', 'sanitize_callback' => 'wp_kses_post', ) ); $theme_info = '
'; $theme_info .= sprintf( __( 'Demo Link: %1$sClick here.%2$s', 'coachpress-health' ), '', '' ); $theme_info .= '
'; $theme_info .= sprintf( __( 'Documentation Link: %1$sClick here.%2$s', 'coachpress-health' ), '', '' ); $theme_info .= '
'; $wp_customize->add_control( new CoachPress_Lite_Note_Control( $wp_customize, 'theme_info_theme', array( 'section' => 'theme_info', 'description' => $theme_info ) ) ); /** Header Layout Settings */ $wp_customize->add_section( 'header_layout_settings', array( 'title' => __( 'Header Layout', 'coachpress-health' ), 'priority' => 10, 'panel' => 'layout_settings', ) ); /** Header layout */ $wp_customize->add_setting( 'header_layout', array( 'default' => 'four', 'sanitize_callback' => 'coachpress_lite_sanitize_radio' ) ); $wp_customize->add_control( new CoachPress_Lite_Radio_Image_Control( $wp_customize, 'header_layout', array( 'section' => 'header_layout_settings', 'label' => __( 'Header Layout', 'coachpress-health' ), 'description' => __( 'Choose the layout of the header for your site.', 'coachpress-health' ), 'choices' => array( 'one' => get_stylesheet_directory_uri() . '/images/header/one.jpg', 'four' => get_stylesheet_directory_uri() . '/images/header/four.jpg', ) ) ) ); /** Static Banner Layout Settings */ $wp_customize->add_section( 'cta_static_banner_layout_settings', array( 'title' => __( 'CTA Static Banner Layout', 'coachpress-health' ), 'priority' => 30, 'panel' => 'layout_settings', ) ); $wp_customize->add_setting( 'cta_static_banner_layout', array( 'default' => 'one', 'sanitize_callback' => 'coachpress_lite_sanitize_radio' ) ); $wp_customize->add_control( new CoachPress_Lite_Radio_Image_Control( $wp_customize, 'cta_static_banner_layout', array( 'section' => 'cta_static_banner_layout_settings', 'label' => __( 'CTA Static Banner Layout', 'coachpress-health' ), 'description' => __( 'Choose the layout of the cta static banner for your site.', 'coachpress-health' ), 'choices' => array( 'one' => get_stylesheet_directory_uri() . '/images/static_banner/cta_one.jpg', 'two' => get_stylesheet_directory_uri() . '/images/static_banner/cta_two.jpg', ) ) ) ); $wp_customize->add_panel( 'appearance_settings', array( 'title' => __( 'Appearance Settings', 'coachpress-health' ), 'priority' => 25, 'capability' => 'edit_theme_options', 'description' => __( 'Change color and body background.', 'coachpress-health' ), ) ); /** Typography */ $wp_customize->add_section( 'typography_settings', array( 'title' => __( 'Typography', 'coachpress-health' ), 'priority' => 20, 'panel' => 'appearance_settings', ) ); /** Primary Font */ $wp_customize->add_setting( 'primary_font', array( 'default' => array( 'font-family' => 'Nunito Sans', 'variant' => 'regular', ), 'sanitize_callback' => array( 'CoachPress_Lite_Fonts', 'sanitize_typography' ) ) ); $wp_customize->add_control( new CoachPress_Lite_Typography_Control( $wp_customize, 'primary_font', array( 'label' => __( 'Primary Font', 'coachpress-health' ), 'description' => __( 'Primary font of the site.', 'coachpress-health' ), 'section' => 'typography_settings', 'priority' => 5, ) ) ); /** Secondary Font */ $wp_customize->add_setting( 'secondary_font', array( 'default' => 'Karma', 'sanitize_callback' => 'coachpress_lite_sanitize_select' ) ); $wp_customize->add_control( new CoachPress_Lite_Select_Control( $wp_customize, 'secondary_font', array( 'label' => __( 'Secondary Font', 'coachpress-health' ), 'description' => __( 'Secondary font of the site.', 'coachpress-health' ), 'section' => 'typography_settings', 'choices' => coachpress_lite_get_all_fonts(), 'priority' => 5, ) ) ); /** Tertiary Font */ $wp_customize->add_setting( 'tertiary_font', array( 'default' => 'Great Vibes', 'sanitize_callback' => 'coachpress_lite_sanitize_select' ) ); $wp_customize->add_control( new CoachPress_Lite_Select_Control( $wp_customize, 'tertiary_font', array( 'label' => __( 'Tertiary Font', 'coachpress-health' ), 'section' => 'typography_settings', 'choices' => coachpress_lite_get_all_fonts(), ) ) ); /** Move Background Image section to appearance panel */ $wp_customize->get_section( 'colors' )->panel = 'appearance_settings'; $wp_customize->get_section( 'colors' )->priority = 10; $wp_customize->get_section( 'background_image' )->panel = 'appearance_settings'; $wp_customize->get_section( 'background_image' )->priority = 15; $wp_customize->add_setting( 'header_contact_button', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'header_contact_button', array( 'label' => __( 'Header Contact Button', 'coachpress-health' ), 'description' => __( 'This button shows only on header layout 2.', 'coachpress-health' ), 'section' => 'header_settings', 'type' => 'text', ) ); $wp_customize->add_setting( 'header_contact_url', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'header_contact_url', array( 'label' => __( 'Header Contact Button', 'coachpress-health' ), 'section' => 'header_settings', 'type' => 'url', ) ); } add_action( 'customize_register', 'coachpress_health_customizer_register', 40 ); /** * Form */ function coachpress_lite_header_contact(){ $phone = get_theme_mod( 'phone' ); $email = get_theme_mod( 'email' ); $header_layout = get_theme_mod( 'header_layout', 'four' ); if ( $header_layout == 'one' ) { $class = 'left'; }else{ $class = 'center'; } if( $phone || $email ) : echo '