<?php
/**
 * SEO Settings
 *
 * @package Feminine_Lifestyle_Blog
 */

function feminine_lifestyle_blog_customize_register_general_seo( $wp_customize ) {
    
    /** SEO Settings */
    $wp_customize->add_section(
        'seo_settings',
        array(
            'title'    => __( 'SEO', 'feminine-lifestyle-blog' ),
            'priority' => 40,
            'panel'    => 'general_settings',
        )
    );
    
    /** Enable Social Links */
    $wp_customize->add_setting( 
        'ed_post_update_date', 
        array(
            'default'           => true,
            'sanitize_callback' => 'feminine_lifestyle_blog_sanitize_checkbox'
        ) 
    );
    
    $wp_customize->add_control(
		new Feminine_Lifestyle_Blog_Toggle_Control( 
			$wp_customize,
			'ed_post_update_date',
			array(
				'section'     => 'seo_settings',
				'label'	      => __( 'Enable Last Update Post Date', 'feminine-lifestyle-blog' ),
                'description' => __( 'Enable to show last updated post date on listing as well as in single post.', 'feminine-lifestyle-blog' ),
			)
		)
	);
    
    /** Enable Social Links */
    $wp_customize->add_setting( 
        'ed_breadcrumb', 
        array(
            'default'           => true,
            'sanitize_callback' => 'feminine_lifestyle_blog_sanitize_checkbox'
        ) 
    );
    
    $wp_customize->add_control(
		new Feminine_Lifestyle_Blog_Toggle_Control( 
			$wp_customize,
			'ed_breadcrumb',
			array(
				'section'     => 'seo_settings',
				'label'	      => __( 'Enable Breadcrumb', 'feminine-lifestyle-blog' ),
                'description' => __( 'Enable to show breadcrumb in inner pages.', 'feminine-lifestyle-blog' ),
			)
		)
	);
    
    /** Breadcrumb Home Text */
    $wp_customize->add_setting(
        'home_text',
        array(
            'default'           => __( 'Home', 'feminine-lifestyle-blog' ),
            'sanitize_callback' => 'sanitize_text_field' 
        )
    );
    
    $wp_customize->add_control(
        'home_text',
        array(
            'type'    => 'text',
            'section' => 'seo_settings',
            'label'   => __( 'Breadcrumb Home Text', 'feminine-lifestyle-blog' ),
        )
    );  
    /** SEO Settings Ends */
    
}
add_action( 'customize_register', 'feminine_lifestyle_blog_customize_register_general_seo' );