Registers an embed handler.
Do not use this function directly, use wp_embed_register_handler() instead.
This function should probably also only be used for sites that do not support oEmbed.
$idstringrequired
$regexstringrequired
$callbackcallablerequired
$priorityintoptional
Default:10
public function register_handler( $id, $regex, $callback, $priority = 10 ) {
$this->handlers[ $priority ][ $id ] = array(
'regex' => $regex,
'callback' => $callback,
);
}
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_embed/register_handler