add_section(
'instagram_settings',
array(
'title' => __( 'Instagram Settings', 'blossom-floral-pro' ),
'priority' => 70,
'panel' => 'frontpage_settings',
)
);
if( is_btif_activated() ){
/** Enable Instagram Section */
$wp_customize->add_setting(
'ed_instagram',
array(
'default' => false,
'sanitize_callback' => 'blossom_floral_pro_sanitize_checkbox'
)
);
$wp_customize->add_control(
new Blossom_Floral_Pro_Toggle_Control(
$wp_customize,
'ed_instagram',
array(
'section' => 'instagram_settings',
'label' => __( 'Instagram Section', 'blossom-floral-pro' ),
'description' => __( 'Enable to show Instagram Section', 'blossom-floral-pro' ),
)
)
);
$wp_customize->add_setting(
'ed_header_instagram',
array(
'default' => false,
'sanitize_callback' => 'blossom_floral_pro_sanitize_checkbox'
)
);
$wp_customize->add_control(
new Blossom_Floral_Pro_Toggle_Control(
$wp_customize,
'ed_header_instagram',
array(
'section' => 'instagram_settings',
'label' => __( 'Enable Instagram in Header', 'blossom-floral-pro' ),
'description' => __( 'Enable to show Instagram Section in header', 'blossom-floral-pro' ),
)
)
);
$wp_customize->add_setting(
'ed_footer_instagram',
array(
'default' => true,
'sanitize_callback' => 'blossom_floral_pro_sanitize_checkbox'
)
);
$wp_customize->add_control(
new Blossom_Floral_Pro_Toggle_Control(
$wp_customize,
'ed_footer_instagram',
array(
'section' => 'instagram_settings',
'label' => __( 'Enable Instagram in Footer', 'blossom-floral-pro' ),
'description' => __( 'Enable to show Instagram Section in footer', 'blossom-floral-pro' ),
)
)
);
/** Note */
$wp_customize->add_setting(
'instagram_text',
array(
'default' => '',
'sanitize_callback' => 'wp_kses_post'
)
);
$wp_customize->add_control(
new Blossom_Floral_Pro_Note_Control(
$wp_customize,
'instagram_text',
array(
'section' => 'instagram_settings',
'description' => sprintf( __( 'You can change the setting BlossomThemes Social Feed %1$sfrom here%2$s.', 'blossom-floral-pro' ), '', '' )
)
)
);
}else{
$wp_customize->add_setting(
'instagram_recommend',
array(
'sanitize_callback' => 'wp_kses_post',
)
);
$wp_customize->add_control(
new Blossom_Floral_Pro_Plugin_Recommend_Control(
$wp_customize,
'instagram_recommend',
array(
'section' => 'instagram_settings',
'capability' => 'install_plugins',
'plugin_slug' => 'blossomthemes-instagram-feed',//This is the slug of recommended plugin.
'description' => sprintf( __( 'Please install and activate the recommended plugin %1$sBlossomThemes Social Feed%2$s. After that option related with this section will be visible.', 'blossom-floral-pro' ), '', '' ),
)
)
);
}
}
add_action( 'customize_register', 'blossom_floral_pro_customize_register_frontpage_instagram' );