diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 94000b3995..b139b7d96a 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -37,6 +37,18 @@ function wptexturize($text) { // No need to set up these static variables more than once if ( ! isset( $static_characters ) ) { + /** + * Filter whether to skip running `wptexturize()`. + * + * Passing false to the filter will effectively short-circuit `wptexturize()`. + * returning the original text passed to the function instead. + * + * The filter runs only once, the first time `wptexturize()` is called. + * + * @since 4.0.0 + * + * @param bool $run_texturize Whether to short-circuit `wptexturize()`. + */ $run_texturize = apply_filters( 'run_wptexturize', $run_texturize ); if ( false === $run_texturize ) { return $text;