tag_escape
Filters a string cleaned and escaped for output as an HTML tag.
Использование
add_filter( 'tag_escape', 'wp_kama_tag_escape_filter', 10, 2 );
/**
* Function for `tag_escape` filter-hook.
*
* @param string $safe_tag The tag name after it has been escaped.
* @param string $tag_name The text before it was escaped.
*
* @return string
*/
function wp_kama_tag_escape_filter( $safe_tag, $tag_name ){
// filter...
return $safe_tag;
}
- $safe_tag(строка)
- The tag name after it has been escaped.
- $tag_name(строка)
- The text before it was escaped.
Список изменений
| С версии 2.8.0 | Введена. |
Где вызывается хук
tag_escape
wp-includes/formatting.php 4828
return apply_filters( 'tag_escape', $safe_tag, $tag_name );