WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/11/2010 10:50:36 PM (9 years ago)
Author:
nacin
Message:

Remove more create_function calls. props huichen, see #14424.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/kses.php

    r15383 r16313  
    547547    $pass_allowed_html = $allowed_html;
    548548    $pass_allowed_protocols = $allowed_protocols;
    549     return preg_replace_callback('%((<!--.*?(-->|$))|(<[^>]*(>|$)|>))%',
    550         create_function('$match', 'global $pass_allowed_html, $pass_allowed_protocols; return wp_kses_split2($match[1], $pass_allowed_html, $pass_allowed_protocols);'), $string);
     549    return preg_replace_callback( '%((<!--.*?(-->|$))|(<[^>]*(>|$)|>))%', '_wp_kses_split_callback', $string );
     550}
     551
     552/**
     553 * Callback for wp_kses_split.
     554 *
     555 * @since 3.1.0
     556 * @access private
     557 */
     558function _wp_kses_split_callback( $match ) {
     559    global $pass_allowed_html, $pass_allowed_protocols;
     560    return wp_kses_split2( $match[1], $pass_allowed_html, $pass_allowed_protocols );
    551561}
    552562
Note: See TracChangeset for help on using the changeset viewer.