<?php
/**
 * Add Middle Right Sidebar section and it's fields inside Frontpage Settings panel.
 * 
 * @package Ogma
 */

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



add_action( 'customize_register', 'ogma_register_middle_right_sidebar_options' );

if ( ! function_exists( 'ogma_register_middle_right_sidebar_options' ) ) :

    /**
     * Register theme options for Middle Right Sidebar section.
     * 
     * @param WP_Customize_Manager $wp_customize Object that holds the customizer data.
     * @since 1.0.0
     */
    function ogma_register_middle_right_sidebar_options( $wp_customize ) {

        /*
         * Failsafe is safe
         */
        if ( ! isset( $wp_customize ) ) {
            return;
        }

        /**
         * Add Middle Right Sidebar Section
         * 
         * Frontpage Settings > Middle Right Sidebar
         * 
         * @uses $wp_customize->add_section() https://developer.wordpress.org/reference/classes/wp_customize_manager/add_section/
         * @since 1.0.0
         */
        /*$wp_customize->add_section( new Ogma_Customize_Section (
            $wp_customize, 'ogma_section_middle_right_sidebar',
                array(
                    'priority'  => 20,
                    'panel'     => 'ogma_panel_frontpage',
                    'title'     => __( 'Middle Right Sidebar', 'ogma' ),
                )
            )
        );*/
        /*$wp_customize->add_section( new Ogma_Customize_Section(
            $wp_customize, 'sidebar-widgets-front-middle-right-sidebar',
                array(
                    'priority'      => 20,
                    'panel'         => 'ogma_panel_frontpage',
                    'title'         => __( 'Middle Right Sidebar', 'ogma' ),
                    'description'   => __( 'Add widgets to show on middle right sidebar area.', 'ogma' )
                )
            )
        );*/

        /**
         * Toggle option for frontpage banner.
         *
         * Frontpage Settings > Banner
         *
         * @since 1.0.0
         */
        /*$wp_customize->add_setting( 'frontpage_middle_right_enable',
            array(
                'default'           => true,
                'sanitize_callback' => 'ogma_sanitize_checkbox'
            )
        );
        $wp_customize->add_control( new Ogma_Control_Toggle(
            $wp_customize, 'frontpage_middle_right_enable',
                array(
                    'priority'      => 10,
                    'section'       => 'sidebar-widgets-front-middle-right-sidebar',
                    'settings'      => 'frontpage_middle_right_enable',
                    'label'         => __( 'Enable sidebar', 'ogma' )
                )
            )
        );*/


    }

endif;