media_embedded_in_content_allowed_types хук-фильтрWP 4.2.0

Filters the embedded media types that are allowed to be returned from the content blob.

Использование

add_filter( 'media_embedded_in_content_allowed_types', 'wp_kama_media_embedded_in_content_allowed_types_filter' );

/**
 * Function for `media_embedded_in_content_allowed_types` filter-hook.
 * 
 * @param string[] $allowed_media_types An array of allowed media types.
 *
 * @return string[]
 */
function wp_kama_media_embedded_in_content_allowed_types_filter( $allowed_media_types ){

	// filter...
	return $allowed_media_types;
}
$allowed_media_types(string[])
An array of allowed media types.
По умолчанию: media types are 'audio', 'video', 'object', 'embed', and 'iframe'

Список изменений

С версии 4.2.0 Введена.

Где вызывается хук

get_media_embedded_in_content()
media_embedded_in_content_allowed_types
wp-includes/media.php 5030
$allowed_media_types = apply_filters( 'media_embedded_in_content_allowed_types', array( 'audio', 'video', 'object', 'embed', 'iframe' ) );

Где используется хук в WordPress

Использование не найдено.