WordPress开发者和主题制作者的搜索引擎



wp_oembed_get ›

Since2.9.0
已弃用n/a
wp_oembed_get ( $url, $args = '' )
参数: (2)
  • (string) $url The URL that should be embedded.
    Required: Yes
  • (array) $args Optional. Additional arguments and parameters for retrieving embed HTML. Default empty.
    Required: No
    默认: (empty)
查看:
  • WP_oEmbed
返回:
  • (false|string) False on failure or the embed HTML on success.
定义在:
文档:

Attempts to fetch the embed HTML for a provided URL using oEmbed.



源码

function wp_oembed_get( $url, $args = '' ) {
	$oembed = _wp_oembed_get_object();
	return $oembed->get_html( $url, $args );
}