oembed_linktypes filter-hookWP 2.9.0

Filters the link types that contain oEmbed provider URLs.

Usage

add_filter( 'oembed_linktypes', 'wp_kama_oembed_linktypes_filter' );

/**
 * Function for `oembed_linktypes` filter-hook.
 * 
 * @param string[] $format Array of oEmbed link types. Accepts 'application/json+oembed', 'text/xml+oembed', and 'application/xml+oembed' (incorrect, used by at least Vimeo).
 *
 * @return string[]
 */
function wp_kama_oembed_linktypes_filter( $format ){

	// filter...
	return $format;
}
$format(string[])
Array of oEmbed link types. Accepts 'application/json+oembed', 'text/xml+oembed', and 'application/xml+oembed' (incorrect, used by at least Vimeo).

Changelog

Since 2.9.0 Introduced.

Where the hook is called

WP_oEmbed::discover()
oembed_linktypes
wp-includes/class-wp-oembed.php 470-477
$linktypes = apply_filters(
	'oembed_linktypes',
	array(
		'application/json+oembed' => 'json',
		'text/xml+oembed'         => 'xml',
		'application/xml+oembed'  => 'xml',
	)
);

Where the hook is used in WordPress

Usage not found.