BP_Core_oEmbed_Extension::set_permalink()

Set permalink for oEmbed link discovery.

Description

This method will be called on the page we want to oEmbed. In most cases, you will not need to override this method. However, if you need to, do override in your extended class.

Source

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

	protected function set_permalink() {
		$url = bp_get_requested_url();

		// Remove querystring from bp_get_requested_url().
		if ( false !== strpos( bp_get_requested_url(), '?' ) ) {
			$url = substr( bp_get_requested_url(), 0, strpos( bp_get_requested_url(), '?' ) );
		}

		return $url;
	}

Changelog

Changelog
Version Description
BuddyPress 2.6.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.