ery->post_count ) { echo ''; echo ''; echo ''; $loop_counter = 0; } endwhile; // end of the loop. } $products = ob_get_clean(); $output .= $products; if( $paginate == 'yes' && $avia_pagination = avia_pagination( '', 'nav', 'avia-element-paging', $this->current_page ) ) { $output .= "
{$avia_pagination}
"; } /** * @since WC 3.3.0 we have to reset WC loop counter otherwise layout might break */ if( function_exists( 'wc_reset_loop' ) ) { wc_reset_loop(); } wp_reset_query(); return $output; } /** * Create arrows to scroll slides * * @since 4.8.3 reroute to aviaFrontTemplates * @return string */ protected function slide_navigation_arrows() { $args = array( 'context' => get_class(), 'params' => $this->atts ); return aviaFrontTemplates::slide_navigation_arrows( $args ); } /** * Fetch new entries * * @param array $params */ public function query_entries( $params = array() ) { global $woocommerce, $avia_config; $query = array(); if( empty( $params ) ) { $params = $this->atts; } if( ! empty( $params['categories'] ) ) { //get the product categories $terms = explode( ',', $params['categories'] ); } $this->current_page = ( $params['paginate'] == 'no' || $params['type'] == 'slider' ) ? 1: avia_get_current_pagination_number( 'avia-element-paging' ); //if we find no terms for the taxonomy fetch all taxonomy terms if( empty($terms[0]) || is_null( $terms[0] ) || $terms[0] === 'null' ) { $term_args = array( 'taxonomy' => $params['taxonomy'], 'hide_empty' => true ); /** * To display private posts you need to set 'hide_empty' to false, * otherwise a category with ONLY private posts will not be returned !! * * You also need to add post_status 'private' to the query params with filter avia_product_slide_query. * * @since 4.4.2 * @added_by Günter * @param array $term_args * @param array $params * @return array */ $term_args = apply_filters( 'avf_av_productslider_term_args', $term_args, $params ); $allTax = AviaHelper::get_terms( $term_args ); $terms = array(); foreach( $allTax as $tax ) { $terms[] = $tax->term_id; } } if( $params['sort'] == 'dropdown' ) { $avia_config['woocommerce']['default_posts_per_page'] = $params['items']; $ordering = $woocommerce->query->get_catalog_ordering_args(); $order = $ordering['order']; $orderBY = $ordering['orderby']; if( ! empty( $avia_config['shop_overview_products_overwritten'] ) && $params['items'] != -1 ) { $params['items'] = $avia_config['shop_overview_products']; } } else { $avia_config['woocommerce']['disable_sorting_options'] = true; $chk_sort = ( empty( $params['sort'] ) || $params['sort'] == '0' ) ? '' : $params['sort']; $ordering = avia_wc_get_product_query_order_args( $chk_sort, $params['prod_order'] ); $order = $ordering['order']; $orderBY = $ordering['orderby']; } if( $params['offset'] == 'no_duplicates' ) { $params['offset'] = 0; $no_duplicates = true; } if( $params['offset'] == 0 ) { $params['offset'] = false; } // Meta query - replaced by Tax query in WC 3.0.0 $meta_query = array(); $tax_query = array(); avia_wc_set_out_of_stock_query_params( $meta_query, $tax_query, $params['wc_prod_visible'] ); avia_wc_set_hidden_prod_query_params( $meta_query, $tax_query, $params['wc_prod_hidden'] ); avia_wc_set_featured_prod_query_params( $meta_query, $tax_query, $params['wc_prod_featured'] ); if( 'use_additional_filter' == $params['wc_prod_additional_filter'] ) { avia_wc_set_additional_filter_args( $meta_query, $tax_query ); } $avia_config['woocommerce']['disable_sorting_options'] = true; // sets filter hooks !! $ordering_args = avia_wc_get_product_query_order_args( $orderBY, $order ); if( ! empty( $terms ) ) { $tax_query[] = array( 'taxonomy' => $params['taxonomy'], 'field' => 'id', 'terms' => $terms, 'operator' => 'IN' ); } $query = array( 'post_type' => $params['post_type'], 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'paged' => $this->current_page, 'offset' => $params['offset'], 'post__not_in' => ( !empty( $no_duplicates ) ) ? $avia_config['posts_on_current_page'] : array(), 'posts_per_page' => $params['items'], 'orderby' => $ordering_args['orderby'], 'order' => $ordering_args['order'], 'meta_query' => $meta_query, 'tax_query' => $tax_query ); if ( ! empty( $ordering_args['meta_key'] ) ) { $query['meta_key'] = $ordering_args['meta_key']; } /** * @used_by currently unused * * @since < 4.0 * @param array $query * @param array $params * @param array $ordering_args * @return array */ $query = apply_filters( 'avia_product_slide_query', $query, $params, $ordering_args ); query_posts( $query ); // store the queried post ids in if( have_posts() ) { while( have_posts() ) { the_post(); $avia_config['posts_on_current_page'][] = get_the_ID(); } } // remove all filters avia_wc_clear_catalog_ordering_args_filters(); $avia_config['woocommerce']['disable_sorting_options'] = false; } /** * Returns the selected image size * * @since 4.8 * @param string $size * @return string */ public function handler_wc_image_size_slider( $size ) { return ! empty( $this->atts['image_size'] ) ? $this->atts['image_size'] : $size; } } } {"version":"1.0","provider_name":"Stichting Collot Zien en Beleven","provider_url":"https:\/\/www.collotzienenbeleven.nl","author_name":"Stichting Collot Zien en Beleven","author_url":"https:\/\/www.collotzienenbeleven.nl","title":"Hearts Of Venice Free Play Demo","type":"rich","width":600,"height":338,"html":"
Hearts Of Venice Free Play Demo<\/a><\/blockquote>