<?php

//--------------------------Theme Information File------------------

if( class_exists( 'WP_Customize_control' ) ){

    class Gardening_Landscape_Aura_Custom_Text extends WP_Customize_Control
    {
        /**
        * Render the content on the theme customizer page
        */
        public function render_content()
        {
            ?>
            <label>
                <strong class="customize-text_editor"><?php echo wp_kses_post( $this->label ); ?></strong>
                <br />
                <span class="customize-text_editor_desc">
                    <?php echo wp_kses_post( $this->description ); ?>
                </span>
            </label>
            <?php
        }
    }//editor close
    
}//class close


//---------------------Custumizer Code------

add_action( 'customize_register', 'gardening_landscape_aura_customizer_theme_info' );

function gardening_landscape_aura_customizer_theme_info( $wp_customize ) {
  
    $wp_customize->add_section( 'gardening_landscape_aura_theme_info_section' , array(
    'title'       => esc_html__( 'Theme Information' , 'gardening-landscape-aura' ),
    'priority' => 2
  ) );
    

  $wp_customize->add_setting( 'theme_info', array(
    'default' => '',
    'sanitize_callback' => 'wp_kses_post',
  ) );
    
    $theme_info = '';

    $theme_info .= '<span class="sticky_info_row wp-clearfix"><label class="row-element">' . esc_html__( 'Theme Details', 'gardening-landscape-aura' ) . ': </label><a class="button alignright" href="' . esc_url( 'https://cawpthemes.com/gardening-landscape-aura-premium-wordpress-theme/' ) . '" target="_blank">' . esc_html__( 'Click Here', 'gardening-landscape-aura' ) . '</a></span><hr>';
  
  $theme_info .= '<span class="sticky_info_row wp-clearfix"><label class="row-element">' . esc_html__( 'Free Theme Demo', 'gardening-landscape-aura' ) . ': </label><a class="button alignright" href="' . esc_url( 'https://demo.cawpthemes.com/gardening-free/' ) . '" target="_blank">' . esc_html__( 'Click Here', 'gardening-landscape-aura' ) . '</a></span><hr>';
  $theme_info .= '<span class="sticky_info_row wp-clearfix"><label class="row-element">' . esc_html__( 'Documentation', 'gardening-landscape-aura' ) . ': </label><a class="button alignright" href="' . esc_url( 'https://cawpthemes.com/docs/gardening-landscape-aura-free-theme-documentation/' ) . '" target="_blank">' . esc_html__( 'Click Here', 'gardening-landscape-aura' ) . '</a></span><hr>';
  $theme_info .= '<span class="sticky_info_row wp-clearfix"><label class="row-element">' . esc_html__( 'Premium Theme Demo', 'gardening-landscape-aura' ) . ': </label><a class="button alignright" href="' . esc_url( 'https://demo.cawpthemes.com/gardening-pro/' ) . '" target="_blank">' . esc_html__( 'Click Here', 'gardening-landscape-aura' ) . '</a></span><hr>';
  $theme_info .= '<span class="sticky_info_row wp-clearfix"><label class="row-element">' . esc_html__( 'Need Support', 'gardening-landscape-aura' ) . ': </label><a class="button alignright" href="' . esc_url( 'https://cawpthemes.com/support/' ) . '" target="_blank">' . esc_html__( 'Click Here', 'gardening-landscape-aura' ) . '</a></span><hr>';

  $wp_customize->add_control( new Gardening_Landscape_Aura_Custom_Text( $wp_customize ,'theme_info',array(
    'section' => 'gardening_landscape_aura_theme_info_section',
    'label' => $theme_info
  ) ) );

}


//-------------------------Premium Information Display Code------

add_action( 'customize_register', 'gardening_landscape_aura_customizer_premium_features' );

function gardening_landscape_aura_customizer_premium_features( $wp_customize ) {
    

    $wp_customize->add_setting( 'premium_features', array(
        'default' => '',
        'sanitize_callback' => 'wp_kses_post',
    ) );
    
    $premium_features = '<div class="premium-info"><h2>' . esc_html__( 'Premium Version', 'gardening-landscape-aura' ) . ': </h2>

        <p>' . esc_html__( 'Would you like to enhance the appearance and functionality of your website with an extended range of color options, font styles, and the ability to modify your footer copyright information? Consider upgrading to the pro version of your current theme, which may also include premium support and additional features to further customize your website.', 'gardening-landscape-aura' ) . '</p>
        <ul>
        <li><span class="dashicons dashicons-yes"></span> ' . esc_html__( 'Premium Design', 'gardening-landscape-aura' ) . '</li>
        <li><span class="dashicons dashicons-yes"></span> ' . esc_html__( 'More Home Page Section', 'gardening-landscape-aura' ) . '</li>
        <li><span class="dashicons dashicons-yes"></span> ' . esc_html__( 'Edit Footer Copyright Information', 'gardening-landscape-aura' ) . '</li>
        <li><span class="dashicons dashicons-yes"></span> ' . esc_html__( 'Premium Support', 'gardening-landscape-aura' ) . '</li>
        <ul>
        <hr>

    <a class="button button-primary" href="' . esc_url( 'https://cawpthemes.com/gardening-landscape-aura-premium-wordpress-theme/' ) . '" target="_blank">' . esc_html__( 'Upgrade to Premium Version', 'gardening-landscape-aura' ) . '</a></div>';

    $wp_customize->add_control( new Gardening_Landscape_Aura_Custom_Text( $wp_customize ,'premium_features',array(
        'section' => 'gardening_landscape_aura_theme_info_section',
        'label' => $premium_features
    ) ) );

}


// ------------------------Theme More Premium Section Code-------


add_action( 'customize_register', 'gardening_landscape_aura_customizer_theme_premium_section' );

function gardening_landscape_aura_customizer_theme_premium_section( $wp_customize ) {
  
    $wp_customize->add_section( 'gardening_landscape_aura_theme_premium_info_section' , array(
    'title'       => esc_html__( 'Color / Typography Settings' , 'gardening-landscape-aura' ),
    'priority' => 2
  ) );
    

  $wp_customize->add_setting( 'theme_info_two', array(
    'default' => '',
    'sanitize_callback' => 'wp_kses_post',
  ) );
    
    $theme_info_two = '';

    $theme_info_two .= '<div class="premium-info"><h2>' . esc_html__( 'To use This Settings Upgrade to Premium Version', 'gardening-landscape-aura' ) . ': </h2>

    <a class="button button-primary" href="' . esc_url( 'https://cawpthemes.com/gardening-landscape-aura-premium-wordpress-theme/' ) . '" target="_blank">' . esc_html__( 'Upgrade to Premium Version', 'gardening-landscape-aura' ) . '</a></div>';

  $wp_customize->add_control( new Gardening_Landscape_Aura_Custom_Text( $wp_customize ,'theme_info_two',array(
    'section' => 'gardening_landscape_aura_theme_premium_info_section',
    'label' => $theme_info_two
  ) ) );

}