<?php
/**
 * Customizer Control: Note
 *
 * Displays a simple informational note / upgrade prompt in the Customizer
 * without any input field.
 *
 * @package ella-parallax-one-page
 */

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

if ( ! class_exists( 'Ella_Parallax_One_Page_Note_Control' ) ) {

    /**
     * Class Ella_Parallax_One_Page_Note_Control
     */
    class Ella_Parallax_One_Page_Note_Control extends WP_Customize_Control {

        /**
         * The type of customize control being rendered.
         *
         * @var string
         */
        public $type = 'note';

        /**
         * Renders the control content.
         */
        public function render_content() {
            ?>
            <span class="customize-control-title">
                <?php echo esc_html( $this->label ); ?>
            </span>

            <?php if ( ! empty( $this->description ) ) : ?>
                <span class="description customize-control-description">
                    <?php echo wp_kses_post( $this->description ); ?>
                </span>
            <?php endif; ?>
            <?php
        }
    }
}