do_shortcode_tag хук-фильтрWP 4.7.0

Filters the output created by a shortcode callback.

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

add_filter( 'do_shortcode_tag', 'wp_kama_do_shortcode_tag_filter', 10, 4 );

/**
 * Function for `do_shortcode_tag` filter-hook.
 * 
 * @param string       $output Shortcode output.
 * @param string       $tag    Shortcode name.
 * @param array|string $attr   Shortcode attributes array or the original arguments string if it cannot be parsed.
 * @param array        $m      Regular expression match array.
 *
 * @return string
 */
function wp_kama_do_shortcode_tag_filter( $output, $tag, $attr, $m ){

	// filter...
	return $output;
}
$output(строка)
Shortcode output.
$tag(строка)
Shortcode name.
$attr(массив|строка)
Shortcode attributes array or the original arguments string if it cannot be parsed.
$m(массив)
Regular expression match array.

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

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

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

do_shortcode_tag()
do_shortcode_tag
wp-includes/shortcodes.php 445
return apply_filters( 'do_shortcode_tag', $output, $tag, $attr, $m );

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

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