WordPress.org

Make WordPress Core

Ticket #21149: 21149.2.patch

File 21149.2.patch, 2.8 KB (added by SergeyBiryukov, 22 months ago)
  • wp-includes/formatting.php

     
    100100        } 
    101101 
    102102        // Transform into regexp sub-expression used in _wptexturize_pushpop_element 
    103         // Must do this everytime in case plugins use these filters in a context sensitive manner 
     103        // Must do this every time in case plugins use these filters in a context sensitive manner 
    104104        $no_texturize_tags = '(' . implode('|', apply_filters('no_texturize_tags', $default_no_texturize_tags) ) . ')'; 
    105105        $no_texturize_shortcodes = '(' . implode('|', apply_filters('no_texturize_shortcodes', $default_no_texturize_shortcodes) ) . ')'; 
    106106 
     
    141141 * @param array $stack Array used as stack of opened tag elements 
    142142 * @param string $disabled_elements Tags to match against formatted as regexp sub-expression 
    143143 * @param string $opening Tag opening character, assumed to be 1 character long 
    144  * @param string $opening Tag closing  character 
    145  * @return object 
     144 * @param string $closing Tag closing character 
    146145 */ 
    147146function _wptexturize_pushpop_element($text, &$stack, $disabled_elements, $opening = '<', $closing = '>') { 
    148147        // Check if it is a closing tag -- otherwise assume opening tag 
     
    264263 * @since 3.1.0 
    265264 * @access private 
    266265 * @param array $matches preg_replace_callback matches array 
    267  * @returns string 
     266 * @return string 
    268267 */ 
    269268function _autop_newline_preservation_helper( $matches ) { 
    270269        return str_replace("\n", "<WPPreserveNewline />", $matches[0]); 
     
    10091008 * @since 2.5.1 
    10101009 * 
    10111010 * @param string $orderby Order by string to be checked. 
    1012  * @return string|false Returns the order by clause if it is a match, false otherwise. 
     1011 * @return string|bool Returns the order by clause if it is a match, false otherwise. 
    10131012 */ 
    10141013function sanitize_sql_orderby( $orderby ){ 
    10151014        preg_match('/^\s*([a-z0-9_]+(\s+(ASC|DESC))?(\s*,\s*|\s*$))+|^\s*RAND\(\s*\)\s*$/i', $orderby, $obmatches); 
     
    16231622 * @since 3.4.0 
    16241623 * @access private 
    16251624 * 
    1626  * @param string $string The string to split 
    1627  * @param    int $goal  The desired chunk length. 
     1625 * @param string $string The string to split. 
     1626 * @param int $goal The desired chunk length. 
    16281627 * @return array Numeric array of chunks. 
    16291628 */ 
    16301629function _split_str_by_whitespace( $string, $goal ) { 
     
    18391838} 
    18401839 
    18411840/** 
    1842  * Helper function to convert hex encoded chars to ascii 
     1841 * Helper function to convert hex encoded chars to ASCII 
    18431842 * 
    18441843 * @since 3.1.0 
    18451844 * @access private 
    1846  * @param array $match the preg_replace_callback matches array 
     1845 * @param array $match The preg_replace_callback matches array 
     1846 * @return array Converted chars 
    18471847 */ 
    18481848function _wp_iso_convert( $match ) { 
    18491849        return chr( hexdec( strtolower( $match[1] ) ) );