W3cubDocs

/WordPress

WP_Embed::autoembed_callback( array $match )

Callback function for WP_Embed::autoembed().

Parameters

$match

(array) (Required) A regex match array.

Return

(string) The embed HTML on success, otherwise the original URL.

Source

File: wp-includes/class-wp-embed.php

public function autoembed_callback( $match ) {
		$oldval              = $this->linkifunknown;
		$this->linkifunknown = false;
		$return              = $this->shortcode( array(), $match[2] );
		$this->linkifunknown = $oldval;

		return $match[1] . $return . $match[3];
	}

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_embed/autoembed_callback