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
This commit is contained in:
Drew Jaynes 2014-06-10 06:29:14 +00:00
parent 6a61826660
commit 0290f79eac

View File

@ -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;