BP_Core_oEmbed_Extension::setup_template_parts( string $template )

Set up custom embed template parts for BuddyPress use.


Description Description


Parameters Parameters

$template

(Required) File path to current embed template.


Top ↑

Return Return

(string)


Top ↑

Source Source

File: bp-core/classes/class-bp-core-oembed-extension.php

	public function setup_template_parts( $template ) {
		// Determine if we're on our BP page.
		if ( ! $this->is_page() || is_404() ) {
			return $template;
		}

		// Set up some BP-specific embed template overrides.
		add_action( 'get_template_part_embed', array( $this, 'content_buffer_start' ), -999, 2 );
		add_action( 'get_footer',              array( $this, 'content_buffer_end' ), -999 );

		// Return the original WP embed template.
		return $template;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.