<?php
    /**
     * Render a redirect control
     * 
     * @package Blog Bee
     * @since 1.0.0
     */
    namespace BBE\Customizer\Controls;

    use BBE\Customizer\Base as Base;

    if( ! class_exists( __NAMESPACE__ . '\\Redirect' ) ) {
        /**
         * Redirect class
         */
        class Redirect extends Base {
            /**
             * Control Type
             * 
             * @since 1.0.0
             */
            public $type = 'redirect';

            /**
             * Section to expand
             * 
             * @since 1.0.0
             */
            public $section_to_expand = '';

            /**
             * To json
             * 
             * @since 1.0.0
             */
            public function to_json() {
                parent::to_json();
                $this->json[ 'section_to_expand' ] = $this->section_to_expand;
            }
        }
        Redirect::set_control_type( 'redirect' );
    }