首页 WordPress函数大全 get_media_embedded_in_content()

get_media_embedded_in_content()

2020-05-01 / 3976阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

get_media_embedded_in_content( string $content, string[] $types = null )

Check the content HTML for a audio, video, object, embed, or iframe tags.

描述

参数

$content

(string)
(Required)
A string of HTML which might contain media elements.

$types

(string[])
(Optional)
An array of media types: 'audio', 'video', 'object', 'embed', or 'iframe'.

Default value: null

返回

(string[]) Array of found HTML media elements.

大家谈论
    我的见解