the_shortlink хук-фильтрWP 3.0.0

Filters the short link anchor tag for a post.

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

add_filter( 'the_shortlink', 'wp_kama_the_shortlink_filter', 10, 4 );

/**
 * Function for `the_shortlink` filter-hook.
 * 
 * @param string $link      Shortlink anchor tag.
 * @param string $shortlink Shortlink URL.
 * @param string $text      Shortlink's text.
 * @param string $title     Shortlink's title attribute.
 *
 * @return string
 */
function wp_kama_the_shortlink_filter( $link, $shortlink, $text, $title ){

	// filter...
	return $link;
}
$link(строка)
Shortlink anchor tag.
$shortlink(строка)
Shortlink URL.
$text(строка)
Shortlink's text.
$title(строка)
Shortlink's title attribute.

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

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

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

the_shortlink()
the_shortlink
wp-includes/link-template.php 4282
$link = apply_filters( 'the_shortlink', $link, $shortlink, $text, $title );

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

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