On this page
apply_filters( 'embed_defaults', int[] $size, string $url )
Filters the default array of embed dimensions.
Parameters
$sizeint[]-
Indexed array of the embed width and height in pixels.
- int
The embed width.
1intThe embed height.
- int
$urlstring-
The URL that should be embedded.
More Information
- 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 callback function is expected to return an array of embed width and height in pixels.
Source
File: wp-includes/embed.php. View all references
return apply_filters( 'embed_defaults', compact( 'width', 'height' ), $url );
Related
Used By
| Used By | Description |
|---|---|
| wp_embed_defaults() wp-includes/embed.php | Creates default array of embed parameters. |
Changelog
| Version | Description |
|---|---|
| 2.9.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/embed_defaults