<?php
/**
 * Into Customizer Control
*/
if( class_exists( 'WP_Customize_control' ) ){

	class Excel_Business_Theme_Info extends WP_Customize_Control
	{
    	/**
       	* Render the content on the theme customizer page
       	*/
       	public function render_content(){ ?>
    	    <span class="customize-control-title">
    			<?php echo esc_html( $this->label ); ?>
    		</span>
    
    		<?php if( $this->description ){ ?>
    			<span class="description customize-control-description">
    			<?php echo wp_kses_post($this->description); ?>
    			</span>
    		<?php }
        }
    }//editor close
    
}//class close

function excel_business_customizer_theme_info( $wp_customize ) {
	
    $wp_customize->add_section( 'theme_info', 
        array(
            'title'    => __( 'Important Links', 'excel-business' ),
            'priority' => 6,
        )
    );
    
    /** Important Links */
	$wp_customize->add_setting( 'theme_info_theme',
        array(
            'default' => '',
            'sanitize_callback' => 'wp_kses_post',
        )
    );
    
    $theme_info = '<ul>';
	$theme_info .= sprintf( __( '<li>View demo: %1$sClick here%2$s</li>', 'excel-business' ),  '<a href="' . esc_url( 'http://exceltheme.com/demo/excel-business/' ) . '" target="_blank">', '</a>' );
    $theme_info .= sprintf( __( '<li>View documentation: %1$sClick here%2$s</li>', 'excel-business' ),  '<a href="' . esc_url( 'http://exceltheme.com/documentation/excel-business/' ) . '" target="_blank">', '</a>' );
    $theme_info .= sprintf( __( '<li>Theme info: %1$sClick here%2$s</li>', 'excel-business' ),  '<a href="' . esc_url( 'http://exceltheme.com/wordpress-theme/excel-business/' ) . '" target="_blank">', '</a>' );
    $theme_info .= sprintf( __( '<li>Support ticket: %1$sClick here%2$s</li>', 'excel-business' ),  '<a href="' . esc_url( 'http://exceltheme.com/support/' ) . '" target="_blank">', '</a>' );
    $theme_info .= sprintf( __( '<li>Please %1$sreview us%2$s</li>', 'excel-business' ),  '<a href="' . esc_url( 'https://wordpress.org/support/theme/excel-business/reviews/' ) . '" target="_blank">', '</a>' );
    $theme_info .= '</ul>';

	$wp_customize->add_control( new Excel_Business_Theme_Info( $wp_customize,
        'theme_info_theme', 
            array(
                'label'       => __( 'Important Links', 'excel-business' ),
                'section'     => 'theme_info',
                'description' => $theme_info
            )
        )
    );
    
}
add_action( 'customize_register', 'excel_business_customizer_theme_info' );