Make WordPress Core

Ticket #30644: 30644.patch

File 30644.patch, 941 bytes (added by azaozz, 10 years ago)
  • src/wp-includes/formatting.php

     
    376376        if ( trim($pee) === '' )
    377377                return '';
    378378
     379        /**
     380         * Temporary filter. Enables replacement of the wpautop() function by plugins.
     381         *
     382         * If the filtered output isn't empty, it will be returned instead of running
     383         * the rest of the function.
     384         *
     385         * @since 4.2.0
     386         *
     387         * @param string $output  The filter output. Default empty.
     388         * @param string $pee     The text which has to be formatted.
     389         * @param bool   $br      Whether to convert the remaining line breaks into <br> tags.
     390         */
     391        if ( $output = apply_filters( '_temp_wpautop', '', $pee, $br ) ) {
     392                return $output;
     393        }
     394
    379395        $pee = $pee . "\n"; // just to make things a little easier, pad the end
    380396
    381397        if ( strpos($pee, '<pre') !== false ) {