'article_cards', 'post_type' => $args['post_type'], 'post_status' => $args['post_status'], 'post__in' => $args['post_ids'], // May be empty! 'order' => $args['order'], 'orderby' => $args['orderby'], 'ignore_sticky_posts' => $args['ignore_sticky'], 'update_post_term_cache' => $show_terms // Improve performance ); // Pagination or count? if ( $args['count'] > 0 ) { $query_args['posts_per_page'] = $args['count']; $query_args['no_found_rows'] = true; } else { $query_args['paged'] = $args['page']; $query_args['posts_per_page'] = $args['posts_per_page']; } // Author? if ( ! empty( $args['author'] ) ) { $query_args['author_name'] = $args['author']; } // Author IDs? if ( ! empty( $args['author_ids'] ) ) { $query_args['author__in'] = $args['author_ids']; } // Excluded authors? if ( ! empty( $args['excluded_authors'] ) ) { $query_args['author__not_in'] = $args['excluded_authors']; } // Taxonomies? if ( ! empty( $args['taxonomies'] ) ) { $query_args['tax_query'] = fictioneer_get_shortcode_tax_query( $args ); } // Excluded categories? if ( ! empty( $args['excluded_cats'] ) ) { $query_args['category__not_in'] = $args['excluded_cats']; } // Excluded tags? if ( ! empty( $args['excluded_tags'] ) ) { $query_args['tag__not_in'] = $args['excluded_tags']; } // Ignore protected? if ( ! $args['ignore_protected'] || $args['only_protected'] ) { $obfuscation = str_repeat( _x( '· ', 'Protected post content obfuscation character.', 'fictioneer' ), 256 ); $obfuscation = apply_filters( 'fictioneer_filter_obfuscation_string', $obfuscation, $post ); } else { $query_args['has_password'] = false; } // Only protected? if ( $args['only_protected'] ) { $query_args['has_password'] = true; } // Apply filters $query_args = apply_filters( 'fictioneer_filter_shortcode_article_cards_query_args', $query_args, $args ); // Query $query = fictioneer_shortcode_query( $query_args ); // Unique ID $unique_id = wp_unique_id( 'article-block-' ); // Pagination $pag_args = array( 'current' => max( 1, $args['page'] ), 'total' => $query->max_num_pages, 'prev_text' => fcntr( 'previous' ), 'next_text' => fcntr( 'next' ), 'add_fragment' => "#{$unique_id}" ); // Extra attributes $attributes = []; if ( $splide ) { $attributes[] = "data-splide='{$splide}'"; } ?>
> ' . __( 'Splide JSON is invalid and has been ignored.', 'fictioneer' ) . ''; } if ( $splide ) { echo fictioneer_get_splide_loading_style( $splide, $args['uid'] ); echo fictioneer_get_splide_placeholders( $args['uid'] ); echo '
'; } ?> have_posts() ) : ?> '; } ?> max_num_pages > 1 ) : ?>
'; } ?>