From 0290f79eacbc4e44fad42bcf4d8dbf2a3b2ec5b8 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Tue, 10 Jun 2014 06:29:14 +0000 Subject: [PATCH] Add inline documentation for the `run_wptexturize` filter. Props miqrogroove for the original patch. Fixes #19550. Built from https://develop.svn.wordpress.org/trunk@28723 git-svn-id: http://core.svn.wordpress.org/trunk@28537 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/formatting.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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;