From 0d0f24fbbb4827fdf25427f196b48a5501bdc860 Mon Sep 17 00:00:00 2001 From: "Drew Jaynes (DrewAPicture)" Date: Tue, 10 Jun 2014 06:28:19 +0000 Subject: [PATCH] Add inline documentation for the `run_wptexturize` filter. Props miqrogroove for the original patch. Fixes #19550. git-svn-id: https://develop.svn.wordpress.org/trunk@28723 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/formatting.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php index 94000b3995..b139b7d96a 100644 --- a/src/wp-includes/formatting.php +++ b/src/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;