public function replaceOembed( $return, $data, $url ) {

		// Check for iframe HTML code, bail if there isn't any
		if ( stripos( $return, '<iframe' ) === false ) {
			return $return;
		}

		global $id; // This is the Post ID, [@see WP_Query::setup_postdata, ...]

		$title = $data->title ?? $this->getTitle( $id );
		$img_src = $data->thumbnail_url ?? null;
		$provider_name = $data->provider_name ?? null;
		$url = wp_get_shortlink( $id );

		$html = $this->blade->render(
			'interactive.oembed', [
				'title' => $title,
				'img_src' => $img_src,
				'provider_name' => $provider_name,
				'url' => $url,
			]
		);

		return $html;
	}
public function replaceOembed( $return, $data, $url ) {

		// Check for iframe HTML code, bail if there isn't any
		if ( stripos( $return, '<iframe' ) === false ) {
			return $return;
		}

		global $id; // This is the Post ID, [@see WP_Query::setup_postdata, ...]

		$title = $data->title ?? $this->getTitle( $id );
		$img_src = $data->thumbnail_url ?? null;
		$provider_name = $data->provider_name ?? null;
		$url = wp_get_shortlink( $id );

		$html = $this->blade->render(
			'interactive.oembed', [
				'title' => $title,
				'img_src' => $img_src,
				'provider_name' => $provider_name,
				'url' => $url,
			]
		);

		return $html;
	}
public function replaceOembed ( $ return , $ data , $ url ) { // Check for iframe HTML code, bail if there isn't any if ( stripos ( $ return , '<iframe' ) === false ) { return $ return ; } global $ id ; // This is the Post ID, [@see WP_Query::setup_postdata, ...] $ title = $ data -> title ?? $ this -> getTitle ( $ id ) ; $ img_src = $ data -> thumbnail_url ?? null ; $ provider_name = $ data -> provider_name ?? null ; $ url = wp_get_shortlink ( $ id ) ; $ html = $ this -> blade -> render ( 'interactive.oembed' , [ 'title' => $ title , 'img_src' => $ img_src , 'provider_name' => $ provider_name , 'url' => $ url , ] ) ; return $ html ; }
Filters the returned oEmbed HTML.
Hooked into `oembed_dataparse` filter

@param string $return The returned oEmbed HTML.
@param object $data A data object result from an oEmbed provider. See Response Parameters in https://oembed.com/ specification
@param string $url The URL of the content to be embedded.

@return string
Filters the returned oEmbed HTML . Hooked into oembed_dataparse filter