WordPress.org

Make WordPress Core

Changeset 19726


Ignore:
Timestamp:
01/09/12 21:20:51 (2 years ago)
Author:
duck_
Message:

split was deprecated in PHP 5.3.0, so use explode instead. Props garyc40. Fixes #16325.

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/network/settings.php

    r19593 r19726  
    5252        update_site_option( 'admin_email', $_POST['admin_email'] ); 
    5353 
    54     $illegal_names = split( ' ', $_POST['illegal_names'] ); 
     54    $illegal_names = explode( ' ', $_POST['illegal_names'] ); 
    5555    foreach ( (array) $illegal_names as $name ) { 
    5656        $name = trim( $name ); 
    5757        if ( $name != '' ) 
    5858            $names[] = trim( $name ); 
    59         } 
     59    } 
    6060    update_site_option( 'illegal_names', $names ); 
    6161 
    6262    if ( $_POST['limited_email_domains'] != '' ) { 
    6363        $limited_email_domains = str_replace( ' ', "\n", $_POST['limited_email_domains'] ); 
    64         $limited_email_domains = split( "\n", stripslashes( $limited_email_domains ) ); 
     64        $limited_email_domains = explode( "\n", stripslashes( $limited_email_domains ) ); 
    6565        $limited_email = array(); 
    6666        foreach ( (array) $limited_email_domains as $domain ) { 
     
    7171        update_site_option( 'limited_email_domains', $limited_email ); 
    7272    } else { 
    73             update_site_option( 'limited_email_domains', '' ); 
     73        update_site_option( 'limited_email_domains', '' ); 
    7474    } 
    7575 
    7676    if ( $_POST['banned_email_domains'] != '' ) { 
    77         $banned_email_domains = split( "\n", stripslashes( $_POST['banned_email_domains'] ) ); 
     77        $banned_email_domains = explode( "\n", stripslashes( $_POST['banned_email_domains'] ) ); 
    7878        $banned = array(); 
    7979        foreach ( (array) $banned_email_domains as $domain ) { 
  • trunk/wp-admin/press-this.php

    r19671 r19726  
    352352                    $content = ''; 
    353353                    if ( preg_match("/youtube\.com\/watch/i", $url) ) { 
    354                         list($domain, $video_id) = split("v=", $url); 
     354                        list($domain, $video_id) = explode("v=", $url); 
    355355                        $video_id = esc_attr($video_id); 
    356356                        $content = '<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/' . $video_id . '"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/' . $video_id . '" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>'; 
    357357 
    358358                    } elseif ( preg_match("/vimeo\.com\/[0-9]+/i", $url) ) { 
    359                         list($domain, $video_id) = split(".com/", $url); 
     359                        list($domain, $video_id) = explode(".com/", $url); 
    360360                        $video_id = esc_attr($video_id); 
    361361                        $content = '<object width="400" height="225"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=' . $video_id . '&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" />  <embed src="http://www.vimeo.com/moogaloop.swf?clip_id=' . $video_id . '&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225"></embed></object>'; 
  • trunk/wp-includes/class-wp-xmlrpc-server.php

    r19712 r19726  
    28332833                if ($key == 'enclosure') { 
    28342834                    foreach ( (array) $val as $enc ) { 
    2835                         $encdata = split("\n", $enc); 
     2835                        $encdata = explode("\n", $enc); 
    28362836                        $enclosure['url'] = trim(htmlspecialchars($encdata[0])); 
    28372837                        $enclosure['length'] = (int) trim($encdata[1]); 
  • trunk/wp-includes/feed.php

    r19598 r19726  
    425425        if ($key == 'enclosure') { 
    426426            foreach ( (array) $val as $enc ) { 
    427                 $enclosure = split("\n", $enc); 
     427                $enclosure = explode("\n", $enc); 
    428428                echo apply_filters('atom_enclosure', '<link href="' . trim(htmlspecialchars($enclosure[0])) . '" rel="enclosure" length="' . trim($enclosure[1]) . '" type="' . trim($enclosure[2]) . '" />' . "\n"); 
    429429            } 
  • trunk/wp-includes/kses.php

    r19687 r19726  
    14021402            $found = true; 
    14031403        } else { 
    1404             $parts = split( ':', $css_item ); 
     1404            $parts = explode( ':', $css_item ); 
    14051405            if ( in_array( trim( $parts[0] ), $allowed_attr ) ) 
    14061406                $found = true; 
  • trunk/wp-includes/pluggable.php

    r19725 r19726  
    17071707    $right_string = normalize_whitespace($right_string); 
    17081708 
    1709     $left_lines  = split("\n", $left_string); 
    1710     $right_lines = split("\n", $right_string); 
     1709    $left_lines  = explode("\n", $left_string); 
     1710    $right_lines = explode("\n", $right_string); 
    17111711 
    17121712    $text_diff = new Text_Diff($left_lines, $right_lines); 
  • trunk/wp-includes/post.php

    r19712 r19726  
    30253025            continue; 
    30263026        foreach( $val as $enc ) { 
    3027             $enclosure = split( "\n", $enc ); 
     3027            $enclosure = explode( "\n", $enc ); 
    30283028            $pung[] = trim( $enclosure[ 0 ] ); 
    30293029        } 
Note: See TracChangeset for help on using the changeset viewer.