Filter hook 'wp_video_embed_handler'

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

View Source

wp_video_embed_handler

Filter Hook
Description
Filters the video embed handler callback.

Hook Information

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

Hook Parameters

Type Name Description
callable $handler Video embed handler callback function.

Usage Examples

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

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

Source Code Context

wp-includes/embed.php:223 - How this hook is used in WordPress core
<?php
 218  	 *
 219  	 * @since 3.6.0
 220  	 *
 221  	 * @param callable $handler Video embed handler callback function.
 222  	 */
 223  	wp_embed_register_handler( 'video', '#^https?://.+?\.(' . implode( '|', wp_get_video_extensions() ) . ')$#i', apply_filters( 'wp_video_embed_handler', 'wp_embed_handler_video' ), 9999 );
 224  }
 225  
 226  /**
 227   * YouTube iframe embed handler callback.
 228   *

PHP Documentation

<?php
/**
	 * Filters the video embed handler callback.
	 *
	 * @since 3.6.0
	 *
	 * @param callable $handler Video embed handler callback function.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/embed.php
Related Hooks

Related hooks will be displayed here in future updates.