Summery Summery
Check the content HTML for a audio, video, object, embed, or iframe tags.
Syntax Syntax
Parameters Parameters
- $content
-
(Required) A string of HTML which might contain media elements.
- $types
-
(Optional) An array of media types: 'audio', 'video', 'object', 'embed', or 'iframe'.
Default value: null
Return Return
(string[]) Array of found HTML media elements.
Source Source
File: wp-includes/media.php
'attachment' ) ); } foreach ( $months as $month_year ) { $month_year->text = sprintf( /* translators: 1: Month, 2: Year. */ __( '%1$s %2$d' ), $wp_locale->get_month( $month_year->month ), $month_year->year ); } $settings = array( 'tabs' => $tabs, 'tabUrl' => add_query_arg( array( 'chromeless' => true ), admin_url( 'media-upload.php' ) ), 'mimeTypes' => wp_list_pluck( get_post_mime_types(), 0 ), /** This filter is documented in wp-admin/includes/media.php */ 'captions' => ! apply_filters( 'disable_captions', '' ), 'nonce' => array( 'sendToEditor' => wp_create_nonce( 'media-send-to-editor' ), ), 'post' => array( 'id' => 0, ), 'defaultProps' => $props, 'attachmentCounts' => array( 'audio' => ( $show_audio_playlist ) ? 1 : 0, 'video' => ( $show_video_playlist ) ? 1 : 0, ), 'oEmbedProxyUrl' => rest_url( 'oembed/1.0/proxy' ),
Advertisement
Changelog Changelog
Version | Description |
---|---|
3.6.0 | Introduced. |