Summery Summery

Creates default array of embed parameters.

Syntax Syntax

wp_embed_defaults( string $url = '' )

Description Description

The width defaults to the content width as specified by the theme. If the theme does not specify a content width, then 500px is used.

The default height is 1.5 times the width, or 1000px, whichever is smaller.

The ’embed_defaults’ filter can be used to adjust either of these values.

Parameters Parameters


(string) (Optional) The URL that should be embedded.

Default value: ''

Return Return

(array) Indexed array of the embed width and height in pixels.

  • (int) The embed width.
  • '1'
    (int) The embed height.

Source Source

File: wp-includes/embed.php



Changelog Changelog

Version Description
2.9.0 Introduced.


Leave a Reply

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