wp_embed_register_handler
函数
wp_embed_register_handler ( $id, $regex, $callback, $priority = 10 )
- 参数
-
-
(string)
$id
An internal ID/name for the handler. Needs to be unique.- Required: 是
-
(string)
$regex
The regex that will be used to see if this handler should be used for a URL.- Required: 是
-
(callable)
$callback
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: 否
- Default: 10
-
(string)
- 定义位置
-
-
wp-includes/embed.php
, line 25
-
wp-includes/embed.php
- 引入
- 2.9.0
- 弃用
- –
Registers an embed handler.
Should probably only be used for sites that do not support oEmbed.
function wp_embed_register_handler( $id, $regex, $callback, $priority = 10 ) { global $wp_embed; $wp_embed->register_handler( $id, $regex, $callback, $priority ); }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。