Summery Summery
Based on a supplied width/height example, return the biggest possible dimensions based on the max width/height.
Syntax Syntax
Parameters Parameters
- $example_width
-
(Required) The width of an example embed.
- $example_height
-
(Required) The height of an example embed.
- $max_width
-
(Required) The maximum allowed width.
- $max_height
-
(Required) The maximum allowed height.
Return Return
(int[]) An array of maximum width and height values.
- (int) The maximum width in pixels.
- '1'
(int) The maximum height in pixels.
Source Source
File: wp-includes/media.php
'class' => $atts['class'], 'id' => sprintf( 'video-%d-%d', $post_id, $instance ), 'width' => absint( $atts['width'] ), 'height' => absint( $atts['height'] ), 'poster' => esc_url( $atts['poster'] ), 'loop' => wp_validate_boolean( $atts['loop'] ), 'autoplay' => wp_validate_boolean( $atts['autoplay'] ), 'preload' => $atts['preload'],
Advertisement
Changelog Changelog
Version | Description |
---|---|
2.9.0 | Introduced. |