wp_targeted_link_rel хук-фильтрWP 5.1.0

Filters the rel values that are added to links with target attribute.

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

add_filter( 'wp_targeted_link_rel', 'wp_kama_targeted_link_rel_filter', 10, 2 );

/**
 * Function for `wp_targeted_link_rel` filter-hook.
 * 
 * @param string $rel       The rel values.
 * @param string $link_html The matched content of the link tag including all HTML attributes.
 *
 * @return string
 */
function wp_kama_targeted_link_rel_filter( $rel, $link_html ){

	// filter...
	return $rel;
}
$rel(строка)
The rel values.
$link_html(строка)
The matched content of the link tag including all HTML attributes.

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

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

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

wp_targeted_link_rel_callback()
wp_targeted_link_rel
wp-includes/formatting.php 3372
$rel = apply_filters( 'wp_targeted_link_rel', 'noopener', $link_html );

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

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