Ticket #21149: 21149.patch
File 21149.patch, 4.6 KB (added by , 13 years ago) |
---|
-
wp-includes/formatting.php
100 100 } 101 101 102 102 // Transform into regexp sub-expression used in _wptexturize_pushpop_element 103 // Must do this every time in case plugins use these filters in a context sensitive manner103 // Must do this every time in case plugins use these filters in a context sensitive manner 104 104 $no_texturize_tags = '(' . implode('|', apply_filters('no_texturize_tags', $default_no_texturize_tags) ) . ')'; 105 105 $no_texturize_shortcodes = '(' . implode('|', apply_filters('no_texturize_shortcodes', $default_no_texturize_shortcodes) ) . ')'; 106 106 … … 141 141 * @param array $stack Array used as stack of opened tag elements 142 142 * @param string $disabled_elements Tags to match against formatted as regexp sub-expression 143 143 * @param string $opening Tag opening character, assumed to be 1 character long 144 * @param string $ opening Tag closing character145 * @return object144 * @param string $closing Tag closing character 145 * @return array 146 146 */ 147 147 function _wptexturize_pushpop_element($text, &$stack, $disabled_elements, $opening = '<', $closing = '>') { 148 148 // Check if it is a closing tag -- otherwise assume opening tag … … 264 264 * @since 3.1.0 265 265 * @access private 266 266 * @param array $matches preg_replace_callback matches array 267 * @return sstring267 * @return string 268 268 */ 269 269 function _autop_newline_preservation_helper( $matches ) { 270 270 return str_replace("\n", "<WPPreserveNewline />", $matches[0]); … … 367 367 * 368 368 * @param string $string The text which is to be encoded. 369 369 * @param mixed $quote_style Optional. Converts double quotes if set to ENT_COMPAT, both single and double if set to ENT_QUOTES or none if set to ENT_NOQUOTES. Also compatible with old values; converting single quotes if set to 'single', double if set to 'double' or both if otherwise set. Default is ENT_NOQUOTES. 370 * @param string$charset Optional. The character encoding of the string. Default is false.370 * @param boolean $charset Optional. The character encoding of the string. Default is false. 371 371 * @param boolean $double_encode Optional. Whether to encode existing html entities. Default is false. 372 * @return string The encoded text with HTML entities. 372 * 373 * @return string The encoded text with HTML entities. 373 374 */ 374 375 function _wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) { 375 376 $string = (string) $string; … … 1009 1010 * @since 2.5.1 1010 1011 * 1011 1012 * @param string $orderby Order by string to be checked. 1012 * @return string| falseReturns the order by clause if it is a match, false otherwise.1013 * @return string|bool Returns the order by clause if it is a match, false otherwise. 1013 1014 */ 1014 1015 function sanitize_sql_orderby( $orderby ){ 1015 1016 preg_match('/^\s*([a-z0-9_]+(\s+(ASC|DESC))?(\s*,\s*|\s*$))+|^\s*RAND\(\s*\)\s*$/i', $orderby, $obmatches); … … 1624 1625 * @access private 1625 1626 * 1626 1627 * @param string $string The string to split 1627 * @param 1628 * @param int $goal The desired chunk length. 1628 1629 * @return array Numeric array of chunks. 1629 1630 */ 1630 1631 function _split_str_by_whitespace( $string, $goal ) { … … 1822 1823 * Convert to ASCII from email subjects. 1823 1824 * 1824 1825 * @since 1.2.0 1825 * @usedby wp_mail() handles charsets in email subjects1826 1826 * 1827 1827 * @param string $string Subject line 1828 1828 * @return string Converted string to ASCII … … 1844 1844 * @since 3.1.0 1845 1845 * @access private 1846 1846 * @param array $match the preg_replace_callback matches array 1847 * @return array converted hex encoded chars 1847 1848 */ 1848 1849 function _wp_iso_convert( $match ) { 1849 1850 return chr( hexdec( strtolower( $match[1] ) ) ); … … 2062 2063 * 2063 2064 * @since 1.5.0 2064 2065 * 2065 * @param int$from Unix timestamp from which the difference begins.2066 * @param int$to Optional. Unix timestamp to end the time difference. Default becomes time() if not set.2066 * @param string $from Unix timestamp from which the difference begins. 2067 * @param string $to Optional. Unix timestamp to end the time difference. Default becomes time() if not set. 2067 2068 * @return string Human readable time difference. 2068 2069 */ 2069 2070 function human_time_diff( $from, $to = '' ) { … … 2910 2911 * @link http://www.php.net/sprintf 2911 2912 * 2912 2913 * @param string $pattern The string which formatted args are inserted. 2913 * @ parammixed $args,... Arguments to be formatted into the $pattern string.2914 * @var mixed $args,... Arguments to be formatted into the $pattern string. 2914 2915 * @return string The formatted string. 2915 2916 */ 2916 2917 function wp_sprintf( $pattern ) {