} else { get_template_part('tpls/post-format-1'); } } ?> </div> <?php if ($max_num_pages > 1) { switch ($pagination_type) { case 'endless': case 'endless-reveal': if ($blog_post_formats) { wp_enqueue_script(array('slick', 'video-js', 'video-js-youtube', 'video-js-vimeo')); wp_enqueue_style(array('slick', 'video-js')); } $endless_opts = array('current' => $current_page + 1, 'maxpages' => $max_num_pages, 'reveal' => $pagination_type == 'endless-reveal', 'action' => 'laborator_get_paged_blog_posts', 'callback' => 'laboratorGetBlogPosts', 'type' => get_data('blog_endless_pagination_style'), 'opts' => array('useFormat' => $is_masonry ? 2 : 1, 'q' => rot13encrypt(serialize($posts_query->query)))); laborator_show_endless_pagination($endless_opts); break; default: laborator_show_pagination($current_page, $max_num_pages, $from, $to, $pagination_position); } } ?> </div> <?php if (in_array($sidebar_position, array('left', 'right'))) { ?> <div class="col-md-3 col-sm-12"> <div class="blog-sidebar">
if ($wp_query->max_num_pages <= 1) { return; } # start: modified by Arlind Nushi $shop_catalog_layout = get_data('shop_catalog_layout'); $shop_pagination_type = get_data('shop_pagination_type'); $shop_endless_pagination_style = get_data('shop_endless_pagination_style'); $shop_pagination_position = get_data('shop_pagination_position'); # end: modified by Arlind Nushi ?> <nav class="woocommerce-pagination pagination-holder <?php echo "pagination-holder-{$shop_pagination_position}"; echo $shop_catalog_layout != 'default' || $shop_catalog_layout == 'default' && get_data('shop_loop_masonry') ? ' no-top-margin' : ''; ?> "> <?php # start: modified by Arlind Nushi if (in_array($shop_pagination_type, array('endless', 'endless-reveal'))) { global $wp_query; $current_page = max(1, intval(get_query_var('paged'))); $max_num_pages = $wp_query->max_num_pages; $endless_opts = array('per_page' => get_query_var('posts_per_page'), 'current' => $current_page + 1, 'maxpages' => $max_num_pages, 'reveal' => $shop_pagination_type == 'endless-reveal', 'action' => 'laborator_get_paged_shop_products', 'callback' => 'laboratorGetProducts', 'type' => $shop_endless_pagination_style, 'finished' => __('No more products to show', 'kalium'), 'opts' => array('q' => rot13encrypt(serialize($wp_query->query)))); laborator_show_endless_pagination($endless_opts); } else { # end: modified by Arlind Nushi $pagination = paginate_links(apply_filters('woocommerce_pagination_args', array('base' => esc_url_raw(str_replace(999999999, '%#%', remove_query_arg('add-to-cart', get_pagenum_link(999999999, false)))), 'format' => '', 'add_args' => '', 'current' => max(1, get_query_var('paged')), 'total' => $wp_query->max_num_pages, 'prev_text' => '←', 'next_text' => '→', 'type' => 'list', 'end_size' => 3, 'mid_size' => 3))); echo str_replace('page-numbers', 'pagination', $pagination); } ?> </nav>
function lab_rot13_tourl_encrypt($data) { return urlencode(rot13encrypt(serialize($data))); }