Filter hook 'oembed_min_max_width'

in WP Core File wp-includes/embed.php at line 577

View Source

oembed_min_max_width

Filter Hook
Description
Filters the allowed minimum and maximum widths for the oEmbed response. }

Hook Information

File Location wp-includes/embed.php View on GitHub
Hook Type Filter
Line Number 577

Hook Parameters

Type Name Description
array $min_max_width { Minimum and maximum widths for the oEmbed response.

Usage Examples

Basic Usage
<?php
// Hook into oembed_min_max_width
add_filter('oembed_min_max_width', 'my_custom_filter', 10, 1);

function my_custom_filter($min_max_width) {
    // Your custom filtering logic here
    return $min_max_width;
}

Source Code Context

wp-includes/embed.php:577 - How this hook is used in WordPress core
<?php
 572  	 *
 573  	 *     @type int $min Minimum width. Default 200.
 574  	 *     @type int $max Maximum width. Default 600.
 575  	 * }
 576  	 */
 577  	$min_max_width = apply_filters(
 578  		'oembed_min_max_width',
 579  		array(
 580  			'min' => 200,
 581  			'max' => 600,
 582  		)

PHP Documentation

<?php
/**
	 * Filters the allowed minimum and maximum widths for the oEmbed response.
	 *
	 * @since 4.4.0
	 *
	 * @param array $min_max_width {
	 *     Minimum and maximum widths for the oEmbed response.
	 *
	 *     @type int $min Minimum width. Default 200.
	 *     @type int $max Maximum width. Default 600.
	 * }
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/embed.php
Related Hooks

Related hooks will be displayed here in future updates.