get_media_embedded_in_content

Advertisement

Summery Summery

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

Syntax Syntax

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

Parameters Parameters

$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

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

Changelog
Version Description
3.6.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.