/** * End object buffer. * * We're going to override WP's get_template_part( 'embed, 'content' ) call * and inject our own template for BuddyPress use. * * @since 2.6.0 * * @param string $name Template name. */ public function content_buffer_end($name) { if ('embed' !== $name || is_404()) { return; } // Wipe out get_template_part( 'embed, 'content' ). ob_end_clean(); // Start our custom BuddyPress embed template! echo '<div '; post_class('wp-embed'); echo '>'; // Template part for our embed header. bp_get_asset_template_part('embeds/header', bp_current_component()); /** * Inject BuddyPress embed content on this hook. * * You shouldn't really need to use this if you extend the * {@link BP_oEmbed_Component} class. * * @since 2.6.0 */ do_action('bp_embed_content'); // Template part for our embed footer. bp_get_asset_template_part('embeds/footer', bp_current_component()); echo '</div>'; }
/** * Output our custom embed template part. * * @since 2.6.0 */ protected function content() { bp_get_asset_template_part('embeds/activity'); }