'', ] ); function p2020_echo_close_group_container() { echo ''; } $o2_data = [ 'data' => [] ]; $open_group = false; $has_open_container = false; $use_grouping = false; if ( class_exists( '\Automattic\P2\Plugins\Core\Pinned_Posts\Grouped_Posts' ) ) { $use_grouping = \Automattic\P2\Plugins\Core\Pinned_Posts\Grouped_Posts::should_group_pinned_posts(); } ?>
$current_group ] ); $has_open_container = true; $open_group = $current_group; } } get_template_part( 'partials/post-types/post', null, [ 'post_identifier' => $post_identifier ] ); // If not underscore template add to the o2 post data array. if ( 'underscore' !== $args['engine'] ) { if ( class_exists( '\Automattic\P2\Plugins\Core\Thirdparty\O2_Data' ) ) { $post_data = \Automattic\P2\Plugins\Core\Thirdparty\O2_Data::get_fragment_for_post( $post_identifier ); if ( $post_data ) { $o2_data['data'][] = $post_data; } } } if ( ! $found_one_regular_post ) { $is_xpost = ! empty( get_post_meta( $post_identifier, '_xpost_original_permalink', true ) ); $found_one_regular_post = ! $is_xpost; } $found_any_post = true; } // If all posts in the loop are xposts... if ( $found_any_post && ! $found_one_regular_post ) { // Apply a workaround for the page not loading the likes_master iframe. // // The post_flair filter appends the likes-widget-placeholder html to the post, but also // has the side effect of queueing up the iframe and queuehandler on wp_footer if certain // conditions apply. Untangling the logic is tough, so let's just send a dummy post through // the filter if rendering a page of only xposts. $throwaway = apply_filters( 'post_flair', '' ); } if ( $use_grouping ) { get_template_part( 'partials/posts-group', 'close' ); } ?>
' . $json . ''; } ); } ?>