HEX
Server: Apache
System: Linux hp3-wp-1011494.hostingp3.local 3.10.0-1160.139.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Nov 3 13:30:41 UTC 2025 x86_64
User: csh2729955 (2121743)
PHP: 7.4.33
Disabled: shell_exec,exec,system,popen,set_time_limit
Upload Files
File: /home/storage/162/3480162/user/htdocs/wp-content/plugins/envo-magazine-pro/options/ad-spaces.php
<?php
if ( !class_exists( 'Kirki' ) ) {
	return;
}

Kirki::add_section( 'ad_section', array(
	'title'		 => esc_attr__( 'Ad Spaces', 'envo-magazine-pro' ),
	'priority'	 => 10,
) );
Kirki::add_field( 'envo_magazine_pro', array(
	'type'			 => 'editor',
	'settings'		 => 'ad-after-menu',
	'label'			 => __( 'Ad after main menu', 'envo-magazine-pro' ),
	'description'	 => __( 'HTML is allowed', 'envo-magazine-pro' ),
	'section'		 => 'ad_section',
	'transport'		 => 'postMessage',
	'sanitize_callback' => 'envo_magazine_pro_do_not_filter_anything',
	'js_vars'		 => array(
		array(
			'element'	 => '.ad-after-menu',
			'function'	 => 'html',
		),
	),
	'default'		 => '',
	'priority'		 => 10,
) );
Kirki::add_field( 'envo_magazine_pro', array(
	'type'			 => 'editor',
	'settings'		 => 'ad-before-content',
	'label'			 => __( 'Ad before content', 'envo-magazine-pro' ),
	'description'	 => __( 'HTML is allowed', 'envo-magazine-pro' ),
	'section'		 => 'ad_section',
	'transport'		 => 'postMessage',
	'sanitize_callback' => 'envo_magazine_pro_do_not_filter_anything',
	'js_vars'		 => array(
		array(
			'element'	 => '.ad-before-content',
			'function'	 => 'html',
		),
	),
	'default'		 => '',
	'priority'		 => 10,
) );
Kirki::add_field( 'envo_magazine_pro', array(
	'type'			 => 'editor',
	'settings'		 => 'ad-after-content',
	'label'			 => __( 'Ad after content', 'envo-magazine-pro' ),
	'description'	 => __( 'HTML is allowed', 'envo-magazine-pro' ),
	'section'		 => 'ad_section',
	'transport'		 => 'postMessage',
	'sanitize_callback' => 'envo_magazine_pro_do_not_filter_anything',
	'js_vars'		 => array(
		array(
			'element'	 => '.ad-after-content',
			'function'	 => 'html',
		),
	),
	'default'		 => '',
	'priority'		 => 10,
) );
Kirki::add_field( 'envo_magazine_pro', array(
	'type'			 => 'editor',
	'settings'		 => 'sliding-ad',
	'label'			 => __( 'Post/Page sliding Ad', 'envo-magazine-pro' ),
	'description'	 => __( 'HTML is allowed', 'envo-magazine-pro' ),
	'section'		 => 'ad_section',
	'sanitize_callback' => 'envo_magazine_pro_do_not_filter_anything',
	'default'		 => '',
	'priority'		 => 10,
) );


add_action( 'envo_magazine_before_content', 'envo_magazine_pro_generate_ad_before_content' );

function envo_magazine_pro_generate_ad_before_content() {
	if ( get_theme_mod( 'ad-before-content', '' ) != '' ) :
		?>
		<div class="ad-before-content text-center"><?php echo do_shortcode( get_theme_mod( 'ad-before-content', '' ) ); ?></div>
	<?php else : ?>
		<div class="ad-before-content text-center"></div>
	<?php
	endif;
}

add_action( 'envo_magazine_after_content', 'envo_magazine_pro_generate_ad_after_content' );

function envo_magazine_pro_generate_ad_after_content() {
	if ( get_theme_mod( 'ad-after-content', '' ) != '' ) :
		?>
		<div class="ad-after-content text-center"><?php echo do_shortcode( get_theme_mod( 'ad-after-content', '' ) ); ?></div>
	<?php else : ?>
		<div class="ad-after-content text-center"></div>
	<?php
	endif;
}

add_action( 'envo_magazine_after_content', 'envo_magazine_pro_generate_ad_slidebox' );

function envo_magazine_pro_generate_ad_slidebox() {
	if ( get_theme_mod( 'sliding-ad', '' ) != '' ) :
		?>
		<div id="slidebox">
			<a class="close-me"></a>
			<div class="sliding-ad text-center"><?php echo do_shortcode( get_theme_mod( 'sliding-ad', '' ) ); ?></div>
		</div> <!-- End Content Slider -->
	<?php
	endif;
}

/**
 * Ad after menu
 */
add_action( 'envo_magazine_after_menu', 'envo_magazine_pro_ad_after_menu' );

function envo_magazine_pro_ad_after_menu() {
	if ( get_theme_mod( 'ad-after-menu', '' ) != '' ) : ?>
		<div class="ad-after-menu container text-center">
			<?php echo do_shortcode( get_theme_mod( 'ad-after-menu', '' ) ); ?>
		</div>
	<?php else : ?>
		<div class="ad-after-menu container text-center"></div>
	<?php
	endif;
}

function envo_magazine_pro_do_not_filter_anything( $value ) {
	return $value;
}