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

Filters the default audio shortcode output.

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

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

add_filter( 'wp_audio_shortcode_override', 'wp_kama_audio_shortcode_override_filter', 10, 4 );

/**
 * Function for `wp_audio_shortcode_override` filter-hook.
 * 
 * @param string $html     Empty variable to be replaced with shortcode markup.
 * @param array  $attr     Attributes of the shortcode. See {@see wp_audio_shortcode()}.
 * @param string $content  Shortcode content.
 * @param int    $instance Unique numeric ID of this audio shortcode instance.
 *
 * @return string
 */
function wp_kama_audio_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 {@see wp_audio_shortcode()}.
$content(строка)
Shortcode content.
$instance(int)
Unique numeric ID of this audio shortcode instance.

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

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

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

wp_audio_shortcode()
wp_audio_shortcode_override
wp-includes/media.php 3252
$override = apply_filters( 'wp_audio_shortcode_override', '', $attr, $content, $instance );

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

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