Filter hook 'tag_escape'

in WP Core File wp-includes/formatting.php at line 4812

View Source

tag_escape

Filter Hook
Description
Filters a string cleaned and escaped for output as an HTML tag.

Hook Information

File Location wp-includes/formatting.php View on GitHub
Hook Type Filter
Line Number 4812

Hook Parameters

Type Name Description
string $safe_tag The tag name after it has been escaped.
string $tag_name The text before it was escaped.

Usage Examples

Basic Usage
<?php
// Hook into tag_escape
add_filter('tag_escape', 'my_custom_filter', 10, 2);

function my_custom_filter($safe_tag, $tag_name) {
    // Your custom filtering logic here
    return $safe_tag;
}

Source Code Context

wp-includes/formatting.php:4812 - How this hook is used in WordPress core
<?php
4807  	 * @since 2.8.0
4808  	 *
4809  	 * @param string $safe_tag The tag name after it has been escaped.
4810  	 * @param string $tag_name The text before it was escaped.
4811  	 */
4812  	return apply_filters( 'tag_escape', $safe_tag, $tag_name );
4813  }
4814  
4815  /**
4816   * Converts full URL paths to absolute paths.
4817   *

PHP Documentation

<?php
/**
	 * Filters a string cleaned and escaped for output as an HTML tag.
	 *
	 * @since 2.8.0
	 *
	 * @param string $safe_tag The tag name after it has been escaped.
	 * @param string $tag_name The text before it was escaped.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-includes/formatting.php
Related Hooks

Related hooks will be displayed here in future updates.