oembed_default_width
Filters the maxwidth oEmbed parameter.
Usage
add_filter( 'oembed_default_width', 'wp_kama_oembed_default_width_filter' );
/**
* Function for `oembed_default_width` filter-hook.
*
* @param int $maxwidth Maximum allowed width.
*
* @return int
*/
function wp_kama_oembed_default_width_filter( $maxwidth ){
// filter...
return $maxwidth;
}
- $maxwidth(int)
- Maximum allowed width.
Default: 600
Changelog
| Since 4.4.0 | Introduced. |
Where the hook is called
oembed_default_width
wp-includes/class-wp-oembed-controller.php 33
$maxwidth = apply_filters( 'oembed_default_width', 600 );