Filter hook 'wp_embed_handler_video'

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

View Source

wp_embed_handler_video

Filter Hook
Description
Filters the video embed output.

Hook Information

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

Hook Parameters

Type Name Description
string $video Video embed output.
array $attr An array of embed attributes.
string $url The original URL that was matched by the regex.
array $rawattr The original unmodified attributes.

Usage Examples

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

function my_custom_filter($video, $attr, $url, $rawattr) {
    // Your custom filtering logic here
    return $video;
}

Source Code Context

wp-includes/embed.php:317 - How this hook is used in WordPress core
<?php
 312  	 * @param string $video   Video embed output.
 313  	 * @param array  $attr    An array of embed attributes.
 314  	 * @param string $url     The original URL that was matched by the regex.
 315  	 * @param array  $rawattr The original unmodified attributes.
 316  	 */
 317  	return apply_filters( 'wp_embed_handler_video', $video, $attr, $url, $rawattr );
 318  }
 319  
 320  /**
 321   * Registers the oEmbed REST API route.
 322   *

PHP Documentation

<?php
/**
	 * Filters the video embed output.
	 *
	 * @since 3.6.0
	 *
	 * @param string $video   Video embed output.
	 * @param array  $attr    An array of embed attributes.
	 * @param string $url     The original URL that was matched by the regex.
	 * @param array  $rawattr The original unmodified attributes.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 4
  • File: wp-includes/embed.php
Related Hooks

Related hooks will be displayed here in future updates.