Submit
Path:
~
/
home
/
contenidosenred
/
www
/
OD
/
wp-admin
/
includes
/
219846
/
File Content:
inc.zip
PK �m[�Ϻ�� � icon-functions.phpnu �[��� <?php /** * SVG icons related functions and filters * * @package WordPress * @subpackage streamit * @since 1.0 */ /** * Return SVG markup. * * @param array $args { * Parameters needed to display an SVG. * * @type string $icon Required SVG icon filename. * @type string $title Optional SVG title. * @type string $desc Optional SVG description. * } * @return string SVG markup. */ function streamit_get_svg( $args = array() ) { // Make sure $args are an array. if ( empty( $args ) ) { return esc_html__( 'Please define default parameters in the form of an array.', 'streamit' ); } // Define an icon. if ( false === array_key_exists( 'icon', $args ) ) { return esc_html__( 'Please define an SVG icon filename.', 'streamit' ); } // Set defaults. $defaults = array( 'icon' => '', 'title' => '', 'desc' => '', 'fallback' => false, ); // Parse args. $args = wp_parse_args( $args, $defaults ); // Set aria hidden. $aria_hidden = ' aria-hidden="true"'; // Set ARIA. $aria_labelledby = ''; /* * streamit doesn't use the SVG title or description attributes; non-decorative icons are described with .screen-reader-text. * * However, child themes can use the title and description to add information to non-decorative SVG icons to improve accessibility. * * Example 1 with title: <?php echo streamit_get_svg( array( 'icon' => 'arrow-right', 'title' => __( 'This is the title', 'textdomain' ) ) ); ?> * * Example 2 with title and description: <?php echo streamit_get_svg( array( 'icon' => 'arrow-right', 'title' => __( 'This is the title', 'textdomain' ), 'desc' => __( 'This is the description', 'textdomain' ) ) ); ?> * * See https://www.paciellogroup.com/blog/2013/12/using-aria-enhance-svg-accessibility/. */ if ( $args['title'] ) { $aria_hidden = ''; $unique_id = uniqid(); $aria_labelledby = ' aria-labelledby="title-' . $unique_id . '"'; if ( $args['desc'] ) { $aria_labelledby = ' aria-labelledby="title-' . $unique_id . ' desc-' . $unique_id . '"'; } } } /** * Display SVG icons in social links menu. * * @param string $item_output The menu item output. * @param WP_Post $item Menu item object. * @param int $depth Depth of the menu. * @param array $args wp_nav_menu() arguments. * @return string $item_output The menu item output with social icon. */ function streamit_nav_menu_social_icons( $item_output, $item, $depth, $args ) { // Get supported social icons. $social_icons = streamit_social_links_icons(); // Change SVG icon inside social links menu if there is supported URL. if ( 'social' === $args->theme_location ) { foreach ( $social_icons as $attr => $value ) { if ( false !== strpos( $item_output, $attr ) ) { $item_output = str_replace( $args->link_after, '</span>' . streamit_get_svg( array( 'icon' => esc_attr( $value ) ) ), $item_output ); } } } return $item_output; } add_filter( 'walker_nav_menu_start_el', 'streamit_nav_menu_social_icons', 10, 4 ); /** * Add dropdown icon if menu item has children. * * @param string $title The menu item's title. * @param WP_Post $item The current menu item. * @param array $args An array of wp_nav_menu() arguments. * @param int $depth Depth of menu item. Used for padding. * @return string $title The menu item's title with dropdown icon. */ function streamit_dropdown_icon_to_menu_link( $title, $item, $args, $depth ) { if ( 'top' === $args->theme_location ) { foreach ( $item->classes as $value ) { if ( 'menu-item-has-children' === $value || 'page_item_has_children' === $value ) { $title = $title . streamit_get_svg( array( 'icon' => 'angle-down' ) ); } } } return $title; } add_filter( 'nav_menu_item_title', 'streamit_dropdown_icon_to_menu_link', 10, 4 ); /** * Returns an array of supported social links (URL and icon name). * * @return array $social_links_icons */ function streamit_social_links_icons() { // Supported social links icons. $social_links_icons = array( 'behance.net' => 'behance', 'codepen.io' => 'codepen', 'deviantart.com' => 'deviantart', 'digg.com' => 'digg', 'docker.com' => 'dockerhub', 'dribbble.com' => 'dribbble', 'dropbox.com' => 'dropbox', 'facebook.com' => 'facebook', 'flickr.com' => 'flickr', 'foursquare.com' => 'foursquare', 'plus.google.com' => 'google-plus', 'github.com' => 'github', 'instagram.com' => 'instagram', 'linkedin.com' => 'linkedin', 'mailto:' => 'envelope-o', 'medium.com' => 'medium', 'pinterest.com' => 'pinterest-p', 'pscp.tv' => 'periscope', 'getpocket.com' => 'get-pocket', 'reddit.com' => 'reddit-alien', 'skype.com' => 'skype', 'skype:' => 'skype', 'slideshare.net' => 'slideshare', 'snapchat.com' => 'snapchat-ghost', 'soundcloud.com' => 'soundcloud', 'spotify.com' => 'spotify', 'stumbleupon.com' => 'stumbleupon', 'tumblr.com' => 'tumblr', 'twitch.tv' => 'twitch', 'twitter.com' => 'twitter', 'vimeo.com' => 'vimeo', 'vine.co' => 'vine', 'vk.com' => 'vk', 'wordpress.org' => 'wordpress', 'wordpress.com' => 'wordpress', 'yelp.com' => 'yelp', 'youtube.com' => 'youtube', ); /** * Filter streamit social links icons. * * @since streamit 1.0 * * @param array $social_links_icons Array of social links icons. */ return apply_filters( 'streamit_social_links_icons', $social_links_icons ); } PK �m[{\��_ _ custom/pagination.phpnu �[��� <?php function streamit_pagination($numpages = '', $pagerange = '', $paged='') { if (empty($pagerange)) { $pagerange = 2; } global $paged; if (empty($paged)) { $paged = 1; } if ($numpages == '') { global $wp_query; $numpages = $wp_query->max_num_pages; if(!$numpages) { $numpages = 1; } } /** * We construct the pagination arguments to enter into our paginate_links * function. */ $pagination_args = array( //'base' => get_pagenum_link(1) . '%_%', 'format' => '?paged=%#%', 'total' => $numpages, 'current' => $paged, 'show_all' => False, 'end_size' => 1, 'mid_size' => $pagerange, 'prev_next' => True, 'prev_text' => '<span aria-hidden="true">'. esc_html__( 'Previous page', 'streamit' ) .'</span>', 'next_text' => '<span aria-hidden="true">'. esc_html__( 'Next page', 'streamit' ) .'</span>', 'type' => 'list', 'add_args' => false, 'add_fragment' => '' ); $paginate_links = paginate_links($pagination_args); if ($paginate_links) { echo '<div class="row">'; echo '<div class="col-lg-12 col-md-12 col-sm-12"> <div class="pagination justify-content-center"> <nav aria-label="Page navigation">'; printf( esc_html__('%s','streamit'),$paginate_links); echo '</nav> </div> </div> </div>'; } }PK �m[=�s�p p custom/layout-option.phpnu �[��� <?php $streamit_options = get_option('streamit_options'); if (isset($streamit_options['streamit_enable_sswitcher'])) { if ($streamit_options['streamit_enable_sswitcher']) { add_action('wp_enqueue_scripts', 'streamit_style_switcher_styles', 20); add_action('wp_footer', 'streamit_style_switcher'); } } function streamit_style_switcher_styles() { // Add iq-style-switcher.js file wp_enqueue_script('iq-style-switcher-js', get_template_directory_uri() . '/assets/js/iq-style-switcher.js', array(), '20140826', false); // Load iq-style-switcher css style wp_enqueue_style('iq-style-switcher-css', get_template_directory_uri() . '/assets/css/iq-style-switcher.css', array(), '1.0.0'); } //iq Style Switcher function streamit_style_switcher() { $streamit_options = get_option('streamit_options'); $options = $streamit_options['streamit_layout_mode_options']; ?> <div class="iq-theme-feature hidden-xs hidden-sm hidden-md"> <div class="iq-switchbuttontoggler"><i class="fa fa-cog"></i></div> <div class="spanel"> <form name="styleswitcher" action="<?php echo esc_url(home_url('/')); ?>" method="post"> <div class="presets"> <ul id="preset" class="preset"> <?php if ($options == 2) { ?> <li class="active"><a class="ltr" id="ltr" href="?preset=2"><?php _e('LTR','streamit'); ?><input name="b" type="radio" value="LTR" hidden></a></li> <li><a class="rtl" href="?preset=1" id="rtl"><?php _e('RTL','streamit'); ?><input name="b" type="radio" value="RTL" hidden></a></li> <?php } else { ?> <li class="active"><a class="ltr" id="ltr" href="?preset=1"><?php _e('LTR','streamit'); ?><input name="b" type="radio" value="1" hidden></a></li> <li><a class="rtl" href="?preset=2" id="rtl"><?php _e('RTL','streamit'); ?><input name="b" type="radio" value="2" hidden></a></li> <?php } ?> </ul> </div> </form> </div> </div> <?php } PK �m[�� custom/comment.phpnu �[��� <?php function streamit_comments($comment, $args, $depth) { $GLOBALS['comment'] = $comment; switch ($comment->comment_type): case 'pingback': case 'trackback': if ('div' == $args['style']) { $tag = 'div'; $add_below = 'comment'; } else { $tag = 'li'; $add_below = 'div-comment'; } ?> <li <?php comment_class('iq-comments-item'); ?> id="comment-<?php comment_ID(); ?>"> <h5 class="mt-0 mb-0"> <span class="iq-type-date"><span class="mr-2"><?php echo esc_html__(comment_type() . ':', 'streamit'); ?></span><?php comment_author_link(); ?></span> <?php edit_comment_link(esc_html__('(Edit)', 'streamit'), '<span class="edit-link">', '</span>'); ?></h5> <div class="iq-comment-type-date"> <a href="<?php echo esc_url(comment_link()); ?>"> <time datetime="<?php comment_time('c'); ?>"> <i class="fa fa-calendar mr-1"></i> <?php printf(wp_kses('%1$s', '1: date'), comment_date()); ?> </time> </a> </div> <?php break; default: global $post; ?> <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>"> <article id="div-comment-<?php comment_ID(); ?>" class="comment-body"> <div class="iq-comments-media"> <div class="iq-comment-wrap"> <div class="iq-comments-photo"> <?php if (get_avatar($comment, $args['avatar_size'])) { echo get_avatar($comment, $args['avatar_size']); } else { $user = wp_get_current_user(); if ($user) { ?> <img src="<?php echo esc_url(get_avatar_url($user->ID)); ?>" alt="image" /> <?php } } ?> </div> <div class="iq-comments-info"> <h4 class="title"> <?php printf(wp_kses('%s ', 'streamit'), sprintf('%s', get_comment_author_link())); ?> </h4> <?php if ('0' == $comment->comment_approved) : ?> <p class="comment-awaiting-moderation"><?php esc_html__('Your comment is awaiting moderation.', 'streamit'); ?></p> <?php endif; ?> <div class="comment-content"> <?php comment_text(); ?> </div><!-- .comment-content --> <div class="iq-comment-metadata"> <a href="<?php echo esc_url(get_comment_link($comment->comment_ID)); ?>"> <time datetime="<?php comment_time('c'); ?>"> <i class="fa fa-calendar mr-1"></i> <?php printf(wp_kses('%1$s', '1: date'), get_comment_date()); ?> </time> </a> </div> <?php edit_comment_link(esc_html__('Edit', 'streamit'), '<span class="edit-link">', '</span>'); ?> <!-- .comment-metadata --> <div class="reply iq-reply iq-button-style-2 has-icon btn-icon-right"> <?php comment_reply_link(array_merge($args, array('add_below' => 'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?> </div><!-- .reply --> </div><!-- .comment-author --> </div> </div> </article><!-- .comment-body --> <?php break; endswitch; } PK �m[QJ��$ $ custom/maintenance.phpnu �[��� <?php $streamit_options = get_option('streamit_options'); if(isset($streamit_options['mainte_mode'])) { $options = $streamit_options['mainte_mode']; if($options == "yes") { global $pagenow; if ( $pagenow !== 'wp-login.php' && ! current_user_can( 'manage_options' ) && ! is_admin()){ function streamit_maintance_js_css(){ /* Custom JS */ wp_enqueue_script('maintance-countTo', get_template_directory_uri() .'/assets/js/maintance/js/jquery.countTo.js', array('jquery'),'1.0', true); wp_enqueue_script('maintance-countdown', get_template_directory_uri() .'/assets/js/maintance/js/jquery.countdown.min.js', array('jquery'),'1.0', true); wp_enqueue_script('maintance-custom', get_template_directory_uri() .'/assets/js/maintance/js/maintance-custom.js', array(),'1.0', true); /* Custom CSS */ wp_enqueue_style('maintance-style', get_template_directory_uri() .'/assets/css/maintance/css/main-style.css',array(), '1.0', 'all'); wp_enqueue_style('maintance-responsive', get_template_directory_uri() .'/assets/css/maintance/css/main-responsive.css',array(), '1.0', 'all'); wp_enqueue_style('maintance-countdown', get_template_directory_uri() .'/assets/css/maintance/css/jquery.countdown.css',array(), '1.0', 'all'); } add_action( 'wp_enqueue_scripts', 'streamit_maintance_js_css' ); header( 'Content-Type: text/html; charset=utf-8' ); require_once get_template_directory() . '/template-parts/maintenance/maintenance.php'; die(); } } } PK �m[��i/ i/ custom/custom-code.phpnu �[��� <?php global $streamit_options; // TGM plugin activation require_once get_template_directory() . '/inc/tgm/required-plugins.php'; // Breadcrumbs require_once get_template_directory() . '/inc/custom/breadcrumbs.php'; // Demo import require_once get_template_directory() . '/inc/demo/import.php'; // Header Breadcrumbs require_once get_template_directory() . '/inc/custom/breadcrumbs.php'; // Comment require_once get_template_directory() . '/inc/custom/comment.php'; // Pagination require_once get_template_directory() . '/inc/custom/pagination.php'; // Widget require_once get_template_directory() . '/inc/custom/widget.php'; //Maintenance require_once get_template_directory() . '/inc/custom/maintenance.php'; // Dynamic Style require_once get_template_directory() . '/inc/custom/dynamic-style.php'; // StyleSwticher Style require_once get_template_directory() . '/inc/custom/layout-option.php'; // Color Style require_once get_template_directory() . '/inc/custom/color-style.php'; require_once get_template_directory() . '/inc/custom/dynamic-style/init.php'; //Healper Function require_once get_template_directory() . '/inc/custom/helper/helper-functions.php'; require_once get_template_directory() . '/inc/remove-hook/remove-hook.php'; function streamit_custom_fonts_url() { $fonts_url = ''; /* Translators: If there are characters in your language that are not * supported by Roboto, translate this to 'off'. Do not translate * into your own language. */ /* Translators: If there are characters in your language that are not * supported by Nunito, translate this to 'off'. Do not translate * into your own language. */ $Heebo = _x('on', 'Heebo: on or off', 'streamit'); $Roboto = _x('on', 'Roboto: on or off', 'streamit'); if ('off' !== $Heebo || 'off' !== $Roboto) { $font_families = array(); $font_families[] = 'Heebo:wght@200;300;400;500;600;700;800&family=Roboto:ital,wght@0,400;0,500;0,700;0,900;1,400;1,500;1,700'; $query_args = array( 'family' => implode('&family', $font_families), 'subset' => urlencode('latin,latin-ext'), ); $fonts_url = add_query_arg($query_args, '//fonts.googleapis.com/css2'); } return esc_url_raw($fonts_url); } function streamit_load_js_css() { /* Start layout style swticher option */ global $wp_query; $streamit_options = get_option('streamit_options'); $previewpreset = (isset($_REQUEST['preset']) ? $_REQUEST['preset'] : null); if ($previewpreset) { $_SESSION["preset"] = $previewpreset; } if (!isset($_SESSION["preset"])) { $_SESSION["preset"] = 1; } if ($_SESSION["preset"] != 1) { if ($streamit_options['streamit_layout_mode_options'] == 2) { $presetopt = 1; $presetopt1 = 1; $presetopt2 = 1; } else { $presetopt = $_SESSION["preset"]; $presetopt1 = $_SESSION["preset"]; $presetopt2 = $_SESSION["preset"]; } } else { /* if no preset varialbe found in url, use from theme options */ $presetopt = isset($streamit_options['streamit_layout_mode_options']) ? $streamit_options['streamit_layout_mode_options'] : 1; $presetopt1 = isset($streamit_options['streamit_layout_mode_options']) ? $streamit_options['streamit_layout_mode_options'] : 1; $presetopt2 = isset($streamit_options['streamit_layout_mode_options']) ? $streamit_options['streamit_layout_mode_options'] : 1; } if (!isset($presetopt)) $presetopt = 1; /* in case first time install theme, no options found ...bootstrap*/ if (!isset($presetopt1)) $presetopt1 = 1; /* in case first time install theme, no options found ...custom*/ if (!isset($presetopt2)) $presetopt2 = 1; /* in case first time install theme, no options found...responsive */ /* end layout style swticher option */ wp_enqueue_script('jquery'); /* Custom JS */ wp_enqueue_script('bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.min.js', array(), '4.1.3', true); wp_enqueue_script('streamit-custom', get_template_directory_uri() . '/assets/js/streamit-custom.js', array(), '1.0', true); wp_enqueue_script('wow', get_template_directory_uri() . '/assets/js/wow.min.js', array(), '1.0', true); // wp_enqueue_script('delight', get_template_directory_uri() . '/assets/js/delight.js', array(), '4.1.3', true); // loadmore wp_register_script('my_loadmore', get_template_directory_uri() . '/assets/js/myloadmore.js', array('jquery')); wp_localize_script('my_loadmore', 'streamit_loadmore_params', array( 'ajaxurl' => site_url() . '/wp-admin/admin-ajax.php', // WordPress AJAX 'posts' => json_encode($wp_query->query_vars), // everything about your loop is here 'current_page' => get_query_var('paged') ? get_query_var('paged') : 1, 'max_page' => $wp_query->max_num_pages )); wp_enqueue_script('my_loadmore'); /* Custom CSS */ wp_enqueue_style('streamit-fonts', streamit_custom_fonts_url(), array(), null); wp_enqueue_style('wow', get_template_directory_uri() . '/assets/css/wow.css', array(), '4.1.3', 'all'); /* Custom CSS */ wp_enqueue_style('bootstrap', get_template_directory_uri() . '/assets/css/bootstrap.min' . $presetopt . '.css', array(), '4.1.3', 'all'); wp_enqueue_style('ionicons', get_template_directory_uri() . '/assets/css/ionicons/css/ionicons.min.css', array(), '4.5.10', 'all'); wp_enqueue_style('font-awesome', get_template_directory_uri() . '/assets/css/font-awesome/css/font-awesome.min.css', array(), '4.7.0', 'all'); // Load main strap css style wp_enqueue_style('streamit-style', get_template_directory_uri() . '/assets/css/streamit-style' . $presetopt1 . '.css', array(), '1.0.0', 'all'); wp_enqueue_style('streamit-responsive', get_template_directory_uri() . '/assets/css/streamit-responsive' . $presetopt2 . '.css', array(), '1.0', 'all'); } add_action('wp_enqueue_scripts', 'streamit_load_js_css'); if (!function_exists('streamit_dynamic_style')) { function streamit_dynamic_style($streamit_css_array) { foreach ($streamit_css_array as $css_part) { if (!empty($css_part['value'])) { echo esc_attr($css_part['elements']) . "{\n"; echo esc_attr($css_part['property']) . ":" . esc_attr($css_part['value']) . ";\n"; echo "}\n\n"; } } } } function streamit_categories_postcount_filter($variable) { $variable = str_replace('(', '<span class="post_count"> ', $variable); $variable = str_replace(')', ' </span>', $variable); return $variable; } add_filter('wp_list_categories', 'streamit_categories_postcount_filter'); function streamit_style_the_archive_count($links) { $links = str_replace('</a> (', '</a> <span class="archiveCount">', $links); $links = str_replace(')', '</span>', $links); return $links; } add_filter('get_archives_link', 'streamit_style_the_archive_count'); function streamit_inline_css() { $streamit_options = get_option('streamit_options'); $custom_style = ""; if (!empty($streamit_options['streamit_css_code'])) { $streamit_css_code = $streamit_options['streamit_css_code']; $custom_style = $streamit_css_code; } wp_add_inline_style('streamit-style', $custom_style); } add_action('wp_enqueue_scripts', 'streamit_inline_css', 100); if (class_exists('MasVideos')) { function streamit_pre_get_posts($query) { if (!is_admin()) { if (is_search() && $query->is_main_query()) { $query->set('post_type', array('movie', 'tv_show', 'episode', 'video', 'post')); } } } add_action('pre_get_posts', 'streamit_pre_get_posts'); } if (is_user_logged_in()) { $user = wp_get_current_user(); if ($user->roles[0] === 'subscriber') { show_admin_bar(false); } } function hex2RGB($hexStr, $returnAsString = false, $seperator = ',') { $hexStr = preg_replace("/[^0-9A-Fa-f]/", '', $hexStr); // Gets a proper hex string $rgbArray = array(); if (strlen($hexStr) == 6) { //If a proper hex code, convert using bitwise operation. No overhead... faster $colorVal = hexdec($hexStr); $rgbArray['red'] = 0xFF & ($colorVal >> 0x10); $rgbArray['green'] = 0xFF & ($colorVal >> 0x8); $rgbArray['blue'] = 0xFF & $colorVal; } elseif (strlen($hexStr) == 3) { //if shorthand notation, need some string manipulations $rgbArray['red'] = hexdec(str_repeat(substr($hexStr, 0, 1), 2)); $rgbArray['green'] = hexdec(str_repeat(substr($hexStr, 1, 1), 2)); $rgbArray['blue'] = hexdec(str_repeat(substr($hexStr, 2, 1), 2)); } else { return false; //Invalid hex color code } return $returnAsString ? implode($seperator, $rgbArray) : $rgbArray; // returns the rgb string or the associative array } function my_callback_function() { $test = "<i class='fa fa-user'></i> test"; return ["test" => $test]; } //** admin custom css *// add_action('admin_head', 'streamit_admin_custom_css'); function streamit_admin_custom_css() { echo '<style> .redux-container .ui-buttonset .ui-button { height: unset; } .redux-container #ui-datepicker-div{ position: unset !important; } </style>'; } // the ajax function search add_action('wp_ajax_data_fetch', 'data_fetch'); add_action('wp_ajax_nopriv_data_fetch', 'data_fetch'); function data_fetch() { $wp_query = new WP_Query( array('posts_per_page' => 5, 's' => esc_attr($_POST['keyword']), 'post_type' => array('movie', 'tv_show', 'episode', 'video', 'post')) ); ?> <div class="widget streamit-ajax-custom-search mb-0 pb-0"> <div class="list-inline iq-widget-menu"> <ul class="iq-post"> <?php $genre = ''; if ($wp_query->have_posts()) : while ($wp_query->have_posts()) : $wp_query->the_post(); if ('movie' == get_post_type() || 'tv_show' == get_post_type()) { $wp_object = wp_get_post_terms(get_the_ID(), 'movie_genre'); } else if ('video' == get_post_type()) { $wp_object = wp_get_post_terms(get_the_ID(), 'video_cat'); } else { $wp_object = wp_get_post_terms(get_the_ID(), 'category'); } if (!empty($wp_object)) { $k = 1; foreach ($wp_object as $val) { if ($k == 1) $genre = $val->name; else $genre .= ', ' . $val->name; $k++; } } $img_url = wp_get_attachment_image_url(get_post_thumbnail_id(get_the_ID()), "medium"); ?> <li class="mr-0 mb-2 pb-0 d-block"> <div class="post-img"> <div class="post-img-holder"> <a class="img-height" href="<?php echo esc_url(get_permalink()); ?>"> <img src='<?php echo esc_url($img_url, 'streamit'); ?>' alt="image" /> </a> </div> <div class="post-blog pt-2 pb-2 pr-2"> <div class="blog-box"> <a class="new-link" href="<?php echo esc_url(get_permalink()); ?>"> <h6><?php the_title(); ?></h6> </a> <ul class="list-inline iq-category-list"> <li class="list-inline-item"><span><?php echo esc_html(rtrim($genre, ",")); ?></span></li> </ul> </div> </div> </div> </li> <?php endwhile; wp_reset_postdata(); ?> </ul> <?php else : echo '<p class="no-result pb-2">' . __('No Results Found', 'streamit') . '</p>'; endif; ?> </div> </div> <?php $tot = $wp_query->found_posts; $total_pages = $wp_query->max_num_pages; if ($total_pages > 1) { ?> <button type="submit" class="hover-buttons btn w-100"><?php esc_html_e('More Results', 'streamit'); ?></button> <?php } ?> <?php die(); } // add the ajax fetch js add_action('wp_footer', 'ajax_fetch'); function ajax_fetch() { ?> <script type="text/javascript"> function fetchResults() { let keyword = jQuery('#searchInput').val(); if (keyword == "") { jQuery('#datafetch').html(""); } else { jQuery.ajax({ url: '<?php echo admin_url('admin-ajax.php'); ?>', type: 'post', data: { action: 'data_fetch', keyword: keyword }, success: function(data) { jQuery('#datafetch').html(data); } }); } } </script> <?php } PK �m[6r�c� � '