Core Function
View Source on Trac ↗ wp_embed_register_handler()
wp_embed_register_handler( mixed $id, mixed $regex, mixed $callback, mixed $priority = 10 ) Registers an embed handler.
Parameters 4 required
| Name / Type | Description |
|---|---|
| $id string | An internal ID/name for the handler. Needs to be unique. Required |
| $regex string | The regex that will be used to see if this handler should be used for a URL. Required |
| $callback callable | The callback function that will be called if the regex is matched. Required |
| int | $priority Optional. Used to specify the order in which the registered handlers will be tested. Default 10. Required |
Return Value
(void)
No return value description available.
Function Information
Since Version
2.9.0
Source File
wp-includes/embed.php
Advertisement