<?php 

// Add block patterns
require get_template_directory() . '/inc/block-patterns.php';

// Add Customizer
require get_template_directory() . '/inc/customizer.php';


// Upsell in the customizer
if ( class_exists( 'WP_Customize_Section' ) ) {
	class workwaves_Upsell_Section extends WP_Customize_Section {
		public $type = 'workwaves-upsell';
		public $button_text = '';
		public $url = '';
		public $background = '';
		public $text_color = '';
		protected function render() {
			$background = ! empty( $this->background ) ? esc_attr( $this->background ) : 'linear-gradient(90deg,rgb(0,0,0) 0%,rgb(0,0,0) 35%,rgb(0,0,0) 70%,rgb(0,0,0) 100%)
            ';
			$text_color       = ! empty( $this->text_color ) ? esc_attr( $this->text_color ) : '#fff';
			?>
			<li id="accordion-section-<?php echo esc_attr( $this->id ); ?>" class="workwaves_upsell_section accordion-section control-section control-section-<?php echo esc_attr( $this->id ); ?> cannot-expand">
				<h3 class="accordion-section-title" style="border: 0; color:#fff; background:<?php echo esc_attr( $background ); ?>;">
					<?php echo esc_html( $this->title ); ?>
					<a href="<?php echo esc_url( $this->url ); ?>" class="button button-secondary alignright" target="_blank" style="margin-top: -4px;"><?php echo esc_html( $this->button_text ); ?></a>
				</h3>
			</li>
			<?php
		}
	}
}


// Add Get Started
require get_template_directory() . '/inc/get-started/get-started.php';


/* Theme credit link */
define('WORKWAVES_BUY_NOW',__('https://jokerthemes.com/theme-workwaves','workwaves'));
define('WORKWAVES_PRO_DEMO',__('https://preview.jokerthemes.com/workwaves/','workwaves'));
define('WORKWAVES_REVIEW',__('https://jokerthemes.com/theme-workwaves','workwaves'));
define('WORKWAVES_SUPPORT',__('https://jokerthemes.com/','workwaves'));
?>