$who: $what
\n"; } else { $chatoutput .= $haystack . "\n"; } } // print our new formated chat post $content = $chatoutput . "\n"; return $content; } } if(!function_exists('apollo13framework_display_items_from_query_post_list')) { /** * @param bool|WP_Query $query * @param array $args */ function apollo13framework_display_items_from_query_post_list($query = false, $args = array()){ global $apollo13framework_a13; static $id = 0; $id++; if($query === false){ global $wp_query; $query = $wp_query; } $default_args = array( 'columns' => $apollo13framework_a13->get_option( 'blog_brick_columns' ), 'max_width' => $apollo13framework_a13->get_option( 'blog_bricks_max_width' ), 'margin' => $apollo13framework_a13->get_option( 'blog_brick_margin' ), 'filter' => false, 'default_filter' => '__all', 'all_filter' => true, 'display_post_id' => true, ); $args = wp_parse_args($args, $default_args); /* show filter? */ if($args['filter']){ $query_args = array( 'hide_empty' => true, 'object_ids' => wp_list_pluck( $query->posts, 'ID' ), 'taxonomy' => 'category' ); /** @noinspection PhpInternalEntityUsedInspection */ $terms = get_terms( $query_args ); apollo13framework_make_post_grid_filter($terms, 'posts-filter', $args['default_filter'], $args['all_filter']); } /* If there are no posts to display, such as an empty archive page */ if ( ! $query->have_posts() ): ?>