WP_Embed::autoembed_callback()publicWP 1.0

Метод класса: WP_Embed{}

No Hooks.

Return

String. The embed HTML on success, otherwise the original URL.

Usage

global $wp_embed;
$wp_embed->autoembed_callback( $matches );
$matches(array) (required)
A regex match array.

Код WP_Embed::autoembed_callback() WP 6.1.1

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

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