Function: wp_embed_defaults

wp_embed_defaults( string $url )

Creates default array of embed parameters.

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.


Name Type(s) Default Value Description
$url string ''

Optional. The URL that should be embedded. Default empty.



Default embed parameters.

WordPress Developer Newsletter

Stay on top of the latest WordPress API changes, developer tool updates, security alerts and more.