Summery Summery
Registers an embed handler.
Syntax Syntax
Description Description
Should probably only be used for sites that do not support oEmbed.
Parameters Parameters
- $id
-
(Required) An internal ID/name for the handler. Needs to be unique.
- $regex
-
(Required) The regex that will be used to see if this handler should be used for a URL.
- $callback
-
(Required) The callback function that will be called if the regex is matched.
- $priority
-
(Optional) Used to specify the order in which the registered handlers will be tested.
Default value: 10
Source Source
File: wp-includes/embed.php
function wp_embed_register_handler( $id, $regex, $callback, $priority = 10 ) { global $wp_embed; $wp_embed->register_handler( $id, $regex, $callback, $priority ); }
Advertisement
Changelog Changelog
Version | Description |
---|---|
2.9.0 | Introduced. |