wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_oembed_get › WordPress Function

Seit2.9.0
Veraltetn/v
wp_oembed_get ( $url, $args = '' )
Parameter: (2)
  • (string) $url The URL that should be embedded.
    Erforderlich: Ja
  • (array|string) $args { Optional. Additional arguments for retrieving embed HTML. Default empty. @type int|string $width Optional. The `maxwidth` value passed to the provider URL. @type int|string $height Optional. The `maxheight` value passed to the provider URL. @type bool $discover Optional. Determines whether to attempt to discover link tags at the given URL for an oEmbed provider when the provider URL is not found in the built-in providers list. Default true. }
    Erforderlich: Nein
    Standard: (leer)
Siehe:
  • WP_oEmbed
Gibt zurück:
  • (string|false) The embed HTML on success, false on failure.
Definiert in:
Codex:

Attempts to fetch the embed HTML for a provided URL using oEmbed.



Quellcode

function wp_oembed_get( $url, $args = '' ) {
	$oembed = _wp_oembed_get_object();
	return $oembed->get_html( $url, $args );
}