WP_Embed::autoembed_callback()publicWP 1.0

Callback function for WP_Embed::autoembed().

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

Хуков нет.

Возвращает

Строку. The embed HTML on success, otherwise the original URL.

Использование

global $wp_embed;
$wp_embed->autoembed_callback( $matches );
$matches(массив) (обязательный)
A regex match array.

Код WP_Embed::autoembed_callback() WP 6.5.2

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];
}