Path : /home/vishqocm/vishalwebtech.in/blog/wp-content/themes/katerio/functions/
File Upload :
Current File : /home/vishqocm/vishalwebtech.in///blog/wp-content/themes/katerio/functions/actions.php

<?php
/**
 * Site Actions
 *
 * @package Katerio
 */

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

/*
--------------------------------------------------------------------------------
* Footer Actions
* ------------------------------------------------------------------------------
*/
if ( ! function_exists( 'th90_footer_actions' ) ) {
	function th90_footer_actions() {
		if ( th90_opt( 'noise_bg' ) ) {
			echo '<div class="noise"><div class="noise-inner"></div></div>';
		}
		if ( ! th90_is_amp() ) {
			get_template_part( 'template-parts/popup', 'search' );

			get_template_part( 'template-parts/popup', 'newsletter' );

			get_template_part( 'template-parts/offcanvas' );

			get_template_part( 'template-parts/mobile', 'menu' );

			th90_breadcrumbs();

			if( is_singular('post') && th90_opt( 'reading_indicator' ) ) {
		        echo '<div class="reading-indicator"></div>';
		    }

			/* Scroll to Top */
			if ( th90_opt( 'scroll_top' ) ) {
				$top_icon = th90_opt( 'scroll_top_icon' );
				echo '<div class="fly-trigger flex-desktop-el">';
					th90_trigger_button( 'totop', array(
						'content'     	=> 'text' != $top_icon ? 'icon' : 'text',
				        'style'       	=> 'color',
				        'size'        	=> 'medium',
						'radius'       	=> 'circle',
						'custom_icon' 	=> 'text' != $top_icon ? th90_get_svg_icon( $top_icon ) : '',
						'add_class' 	=> 'top-' . $top_icon,
					) );
				echo '</div>';
			}

			/* Mobile Menu Trigger */
			if ( th90_opt( 'mobilemenu_trigger' ) ) {
				echo '<div class="fly-trigger flex-mobile-el always-show">';
					th90_trigger_button( 'mobile_menu', array(
						'content'     	=> 'icon',
				        'style'       	=> 'color',
				        'size'        	=> 'medium',
						'radius'       	=> 'circle',
					) );
				echo '</div>';
			}

			/* Skin Trigger */
			if ( 'yes' == th90_field( 'skin_trigger' ) || th90_opt( 'skin_trigger_all' ) ) {
				echo '<div class="fixed-trigger">';
				    th90_trigger_button( 'dark', array(
				        'style'       	=> 'light',
				        'size'        	=> 'medium',
				        'radius'       	=> 'circle',
				        'custom_icon_dark' => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M5 5v2H3v2h2v2h2V9h2V7H7V5Zm15.281 2.938L18.625 8C13.281 8.191 9 12.578 9 17.969c0 5.511 4.488 10 10 10 5.39 0 9.777-4.282 9.969-9.625l.062-1.625-1.468.687A5.94 5.94 0 0 1 25 17.97c-3.324 0-6-2.676-6-6 0-.914.223-1.75.594-2.531Zm-2.906 2.375c-.125.554-.375 1.062-.375 1.656 0 4.406 3.594 8 8 8 .605 0 1.121-.246 1.688-.375-.762 3.625-3.829 6.375-7.688 6.375-4.43 0-8-3.57-8-8 0-3.852 2.758-6.887 6.375-7.657Z"/></svg>',
				        'custom_text_dark' => '',

				    ) );
				    th90_trigger_button( 'light', array(
				        'style'       	=> 'light',
				        'size'        	=> 'medium',
				        'radius'       	=> 'circle',
				        'custom_icon_light' => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M15 3v5h2V3ZM7.5 6.094 6.094 7.5l3.531 3.563 1.438-1.438Zm17 0-3.563 3.531 1.438 1.438L25.906 7.5ZM16 9c-3.855 0-7 3.145-7 7s3.145 7 7 7 7-3.145 7-7-3.145-7-7-7Zm0 2c2.773 0 5 2.227 5 5s-2.227 5-5 5-5-2.227-5-5 2.227-5 5-5ZM3 15v2h5v-2Zm21 0v2h5v-2ZM9.625 20.938 6.094 24.5 7.5 25.906l3.563-3.531Zm12.75 0-1.438 1.437 3.563 3.531 1.406-1.406ZM15 24v5h2v-5Z"/></svg>',
				        'custom_text_light' => '',
				    ) );
				echo '</div>';
			}
		} else {
			get_template_part( 'template-parts/amp', 'menu' );
		}
    }
}
add_action( 'wp_footer', 'th90_footer_actions' );

/**
 * -------------------------------------------------------------------------
 *  Body Open Actions
 * -------------------------------------------------------------------------
 */
if ( ! function_exists( 'th90_body_open_actions' ) ) {
	function th90_body_open_actions() {
		if ( th90_is_amp() ) {
			return;
		}

		if ( 'yes' == th90_field( 'preloader_active' ) || th90_opt( 'preloader_all' ) ) {
			?>
			<div class="preloader">
				<div class="preloader-inner">
					<div class="preloader-spinner">
						<div class="dot1"></div>
						<div class="dot2"></div>
					</div>
				</div>
			</div>
			<?php
		}
	}
}
add_action( 'wp_body_open', 'th90_body_open_actions' );