WP_Embed::autoembed_callback
Callback function for WP_Embed::autoembed().
Method of the class: WP_Embed{}
No Hooks.
Returns
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 Embed::autoembed callback code WP 6.9.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];
}