WordPress.org

Make WordPress Core

Ticket #28607: 28607.diff

File 28607.diff, 1.2 KB (added by nofearinc, 7 years ago)
  • wp-includes/formatting.php

     
    348348        }
    349349
    350350        $pee = preg_replace('|<br />\s*<br />|', "\n\n", $pee);
     351       
    351352        // Space things out a little
    352         $allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|noscript|legend|section|article|aside|hgroup|header|footer|nav|figure|details|menu|summary)';
     353        /**
     354         * Filter the list of all blocks used by wpautop.
     355         *
     356         * @since 4.0
     357         *
     358         * @param string $allblocks List with all filterable blocks.
     359         */
     360        $allblocks = apply_filters( 'wpautop_allblocks', '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|noscript|legend|section|article|aside|hgroup|header|footer|nav|figure|details|menu|summary)' );
    353361        $pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', "\n$1", $pee);
    354362        $pee = preg_replace('!(</' . $allblocks . '>)!', "$1\n\n", $pee);
    355363        $pee = str_replace(array("\r\n", "\r"), "\n", $pee); // cross-platform newlines