clean_url хук-фильтрWP 2.3.0

Filters a string cleaned and escaped for output as a URL.

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

add_filter( 'clean_url', 'wp_kama_clean_url_filter', 10, 3 );

/**
 * Function for `clean_url` filter-hook.
 * 
 * @param string $good_protocol_url The cleaned URL to be returned.
 * @param string $original_url      The URL prior to cleaning.
 * @param string $_context          If 'display', replace ampersands and single quotes only.
 *
 * @return string
 */
function wp_kama_clean_url_filter( $good_protocol_url, $original_url, $_context ){

	// filter...
	return $good_protocol_url;
}
$good_protocol_url(строка)
The cleaned URL to be returned.
$original_url(строка)
The URL prior to cleaning.
$_context(строка)
If 'display', replace ampersands and single quotes only.

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

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

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

esc_url()
clean_url
wp-includes/formatting.php 4583
return apply_filters( 'clean_url', $good_protocol_url, $original_url, $_context );

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

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