Filter hook 'run_wptexturize'

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

View Source

run_wptexturize

Filter Hook
Description
Filters whether to skip running wptexturize(). Returning false from the filter will effectively short-circuit wptexturize() and return the original text passed to the function instead. The filter runs only once, the first time wptexturize() is called.

Hook Information

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

Hook Parameters

Type Name Description
bool $run_texturize Whether to short-circuit wptexturize().

Usage Examples

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

function my_custom_filter($run_texturize) {
    // Your custom filtering logic here
    return $run_texturize;
}

Source Code Context

wp-includes/formatting.php:78 - How this hook is used in WordPress core
<?php
  73  		 *
  74  		 * @see wptexturize()
  75  		 *
  76  		 * @param bool $run_texturize Whether to short-circuit wptexturize().
  77  		 */
  78  		$run_texturize = apply_filters( 'run_wptexturize', $run_texturize );
  79  		if ( false === $run_texturize ) {
  80  			return $text;
  81  		}
  82  
  83  		/* translators: Opening curly double quote. */

PHP Documentation

<?php
/**
		 * Filters whether to skip running wptexturize().
		 *
		 * Returning false from the filter will effectively short-circuit wptexturize()
		 * and return the original text passed to the function instead.
		 *
		 * The filter runs only once, the first time wptexturize() is called.
		 *
		 * @since 4.0.0
		 *
		 * @see wptexturize()
		 *
		 * @param bool $run_texturize Whether to short-circuit wptexturize().
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/formatting.php
Related Hooks

Related hooks will be displayed here in future updates.