<?php
if (!defined('ABSPATH')) {
    exit; // Exit if accessed directly
}

// -----------------------------------------
// All Breadcrumb Metabox Options
// -----------------------------------------

add_action( 'csf_loaded', 'glowify_page_options_widgets' );
function glowify_page_options_widgets() {

    // Set a unique slug-like ID
    $glowify_wp_breadcrumb_options = 'glowify_wp_breadcrumb_options';

    // Create a metabox
    CSF::createMetabox($glowify_wp_breadcrumb_options, array(
        'title'     => esc_html__('Page Banner Settings', 'glowify-wp'),
        'post_type' => array('page', 'post', 'product', 'glowify-service'),
        'priority'  => 'low',
    ));

    // Create a section
    CSF::createSection($glowify_wp_breadcrumb_options, array(
        'title'  => 'Banner Settings',
        'fields' => array(
            array(
                'id'       => 'enable_breadcrumb',
                'type'     => 'switcher',
                'title'    => esc_html__('Enable breadcrumb?', 'glowify-wp'),
                'default'  => true,
                'desc'     => esc_html__('If you want to enable title, please select yes', 'glowify-wp'),
            ),
            array(
                'id'         => 'bc_custom_title',
                'type'       => 'text',
                'title'      => esc_html__('Custom Title?', 'glowify-wp'),
                'dependency' => array('enable_breadcrumb', '==', 'true'),
                'desc'       => esc_html__('Type breadcrumb custom title. This will replace the current title.', 'glowify-wp'),
            ),
			array(
				'id'       => 'bc_page_background',
				'type'     => 'media',
				'title'    => esc_html__('Background Thumbnail', 'glowify-wp' ),
				'desc' => esc_html__('Select default banner image for all page / post. You can override this settings in individual page / post.', 'glowify-wp'),
                'dependency' => array('enable_breadcrumb', '==', 'true'),
            ), 
        ),
    ));

}
?>