oembed_default_width
Filter HookDescription
Filters the maxwidth oEmbed parameter.Hook Information
File Location |
wp-includes/class-wp-oembed-controller.php
View on GitHub
|
Hook Type | Filter |
Line Number | 33 |
Hook Parameters
Type | Name | Description |
---|---|---|
int
|
$maxwidth
|
Maximum allowed width. Default 600. |
Usage Examples
Basic Usage
<?php
// Hook into oembed_default_width
add_filter('oembed_default_width', 'my_custom_filter', 10, 1);
function my_custom_filter($maxwidth) {
// Your custom filtering logic here
return $maxwidth;
}
Source Code Context
wp-includes/class-wp-oembed-controller.php:33
- How this hook is used in WordPress core
<?php
28 *
29 * @since 4.4.0
30 *
31 * @param int $maxwidth Maximum allowed width. Default 600.
32 */
33 $maxwidth = apply_filters( 'oembed_default_width', 600 );
34
35 register_rest_route(
36 'oembed/1.0',
37 '/embed',
38 array(
PHP Documentation
<?php
/**
* Filters the maxwidth oEmbed parameter.
*
* @since 4.4.0
*
* @param int $maxwidth Maximum allowed width. Default 600.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/class-wp-oembed-controller.php
Related Hooks
Related hooks will be displayed here in future updates.