Make WordPress Core

Ticket #21149: 21149.patch

File 21149.patch, 4.6 KB (added by c3mdigital, 13 years 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
     145 * @return array
    146146 */
    147147function _wptexturize_pushpop_element($text, &$stack, $disabled_elements, $opening = '<', $closing = '>') {
    148148        // Check if it is a closing tag -- otherwise assume opening tag
     
    264264 * @since 3.1.0
    265265 * @access private
    266266 * @param array $matches preg_replace_callback matches array
    267  * @returns string
     267 * @return string
    268268 */
    269269function _autop_newline_preservation_helper( $matches ) {
    270270        return str_replace("\n", "<WPPreserveNewline />", $matches[0]);
     
    367367 *
    368368 * @param string $string The text which is to be encoded.
    369369 * @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.
    371371 * @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.
    373374 */
    374375function _wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {
    375376        $string = (string) $string;
     
    10091010 * @since 2.5.1
    10101011 *
    10111012 * @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.
     1013 * @return string|bool Returns the order by clause if it is a match, false otherwise.
    10131014 */
    10141015function sanitize_sql_orderby( $orderby ){
    10151016        preg_match('/^\s*([a-z0-9_]+(\s+(ASC|DESC))?(\s*,\s*|\s*$))+|^\s*RAND\(\s*\)\s*$/i', $orderby, $obmatches);
     
    16241625 * @access private
    16251626 *
    16261627 * @param string $string The string to split
    1627  * @param    int $goal   The desired chunk length.
     1628 * @param int $goal   The desired chunk length.
    16281629 * @return array Numeric array of chunks.
    16291630 */
    16301631function _split_str_by_whitespace( $string, $goal ) {
     
    18221823 * Convert to ASCII from email subjects.
    18231824 *
    18241825 * @since 1.2.0
    1825  * @usedby wp_mail() handles charsets in email subjects
    18261826 *
    18271827 * @param string $string Subject line
    18281828 * @return string Converted string to ASCII
     
    18441844 * @since 3.1.0
    18451845 * @access private
    18461846 * @param array $match the preg_replace_callback matches array
     1847 * @return array converted hex encoded chars
    18471848 */
    18481849function _wp_iso_convert( $match ) {
    18491850        return chr( hexdec( strtolower( $match[1] ) ) );
     
    20622063 *
    20632064 * @since 1.5.0
    20642065 *
    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.
    20672068 * @return string Human readable time difference.
    20682069 */
    20692070function human_time_diff( $from, $to = '' ) {
     
    29102911 * @link http://www.php.net/sprintf
    29112912 *
    29122913 * @param string $pattern The string which formatted args are inserted.
    2913  * @param mixed $args,... Arguments to be formatted into the $pattern string.
     2914 * @var mixed $args,... Arguments to be formatted into the $pattern string.
    29142915 * @return string The formatted string.
    29152916 */
    29162917function wp_sprintf( $pattern ) {