wp_embed_handler_video
Filters the video embed output.
Использование
add_filter( 'wp_embed_handler_video', 'wp_kama_embed_handler_video_filter', 10, 4 );
/**
* Function for `wp_embed_handler_video` filter-hook.
*
* @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.
*
* @return string
*/
function wp_kama_embed_handler_video_filter( $video, $attr, $url, $rawattr ){
// filter...
return $video;
}
- $video(строка)
- Video embed output.
- $attr(массив)
- An array of embed attributes.
- $url(строка)
- The original URL that was matched by the regex.
- $rawattr(массив)
- The original unmodified attributes.
Список изменений
| С версии 3.6.0 | Введена. |
Где вызывается хук
wp_embed_handler_video
wp-includes/embed.php 317
return apply_filters( 'wp_embed_handler_video', $video, $attr, $url, $rawattr );