wp_video_shortcode_override хук-фильтрWP 3.6.0

Filters the default video shortcode output.

If the filtered output isn't empty, it will be used instead of generating the default video template.

Использование

add_filter( 'wp_video_shortcode_override', 'wp_kama_video_shortcode_override_filter', 10, 4 );

/**
 * Function for `wp_video_shortcode_override` filter-hook.
 * 
 * @param string $html     Empty variable to be replaced with shortcode markup.
 * @param array  $attr     Attributes of the shortcode. @see wp_video_shortcode()
 * @param string $content  Video shortcode content.
 * @param int    $instance Unique numeric ID of this video shortcode instance.
 *
 * @return string
 */
function wp_kama_video_shortcode_override_filter( $html, $attr, $content, $instance ){

	// filter...
	return $html;
}
$html(строка)
Empty variable to be replaced with shortcode markup.
$attr(массив)
Attributes of the shortcode. @see wp_video_shortcode()
$content(строка)
Video shortcode content.
$instance(int)
Unique numeric ID of this video shortcode instance.

Список изменений

С версии 3.6.0 Введена.

Где вызывается хук

wp_video_shortcode()
wp_video_shortcode_override
wp-includes/media.php 3278
$override = apply_filters( 'wp_video_shortcode_override', '', $attr, $content, $instance );

Где используется хук в WordPress

Использование не найдено.