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

git-svn-id: https://develop.svn.wordpress.org/trunk@19726 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jon Cave 2012-01-09 21:20:51 +00:00
parent 55d6e7e261
commit 156048ca52
7 changed files with 13 additions and 13 deletions

View File

@ -51,17 +51,17 @@ if ( $_POST ) {
if ( is_email( $_POST['admin_email'] ) )
update_site_option( 'admin_email', $_POST['admin_email'] );
$illegal_names = split( ' ', $_POST['illegal_names'] );
$illegal_names = explode( ' ', $_POST['illegal_names'] );
foreach ( (array) $illegal_names as $name ) {
$name = trim( $name );
if ( $name != '' )
$names[] = trim( $name );
}
}
update_site_option( 'illegal_names', $names );
if ( $_POST['limited_email_domains'] != '' ) {
$limited_email_domains = str_replace( ' ', "\n", $_POST['limited_email_domains'] );
$limited_email_domains = split( "\n", stripslashes( $limited_email_domains ) );
$limited_email_domains = explode( "\n", stripslashes( $limited_email_domains ) );
$limited_email = array();
foreach ( (array) $limited_email_domains as $domain ) {
$domain = trim( $domain );
@ -70,11 +70,11 @@ if ( $_POST ) {
}
update_site_option( 'limited_email_domains', $limited_email );
} else {
update_site_option( 'limited_email_domains', '' );
update_site_option( 'limited_email_domains', '' );
}
if ( $_POST['banned_email_domains'] != '' ) {
$banned_email_domains = split( "\n", stripslashes( $_POST['banned_email_domains'] ) );
$banned_email_domains = explode( "\n", stripslashes( $_POST['banned_email_domains'] ) );
$banned = array();
foreach ( (array) $banned_email_domains as $domain ) {
$domain = trim( $domain );

View File

@ -351,12 +351,12 @@ var photostorage = false;
<?php
$content = '';
if ( preg_match("/youtube\.com\/watch/i", $url) ) {
list($domain, $video_id) = split("v=", $url);
list($domain, $video_id) = explode("v=", $url);
$video_id = esc_attr($video_id);
$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>';
} elseif ( preg_match("/vimeo\.com\/[0-9]+/i", $url) ) {
list($domain, $video_id) = split(".com/", $url);
list($domain, $video_id) = explode(".com/", $url);
$video_id = esc_attr($video_id);
$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>';

View File

@ -2832,7 +2832,7 @@ class wp_xmlrpc_server extends IXR_Server {
foreach ( (array) get_post_custom($post_ID) as $key => $val) {
if ($key == 'enclosure') {
foreach ( (array) $val as $enc ) {
$encdata = split("\n", $enc);
$encdata = explode("\n", $enc);
$enclosure['url'] = trim(htmlspecialchars($encdata[0]));
$enclosure['length'] = (int) trim($encdata[1]);
$enclosure['type'] = trim($encdata[2]);

View File

@ -424,7 +424,7 @@ function atom_enclosure() {
foreach ( (array) get_post_custom() as $key => $val ) {
if ($key == 'enclosure') {
foreach ( (array) $val as $enc ) {
$enclosure = split("\n", $enc);
$enclosure = explode("\n", $enc);
echo apply_filters('atom_enclosure', '<link href="' . trim(htmlspecialchars($enclosure[0])) . '" rel="enclosure" length="' . trim($enclosure[1]) . '" type="' . trim($enclosure[2]) . '" />' . "\n");
}
}

View File

@ -1401,7 +1401,7 @@ function safecss_filter_attr( $css, $deprecated = '' ) {
if ( strpos( $css_item, ':' ) === false ) {
$found = true;
} else {
$parts = split( ':', $css_item );
$parts = explode( ':', $css_item );
if ( in_array( trim( $parts[0] ), $allowed_attr ) )
$found = true;
}

View File

@ -1706,8 +1706,8 @@ function wp_text_diff( $left_string, $right_string, $args = null ) {
$left_string = normalize_whitespace($left_string);
$right_string = normalize_whitespace($right_string);
$left_lines = split("\n", $left_string);
$right_lines = split("\n", $right_string);
$left_lines = explode("\n", $left_string);
$right_lines = explode("\n", $right_string);
$text_diff = new Text_Diff($left_lines, $right_lines);
$renderer = new WP_Text_Diff_Renderer_Table();

View File

@ -3024,7 +3024,7 @@ function get_enclosed($post_id) {
if ( 'enclosure' != $key || !is_array( $val ) )
continue;
foreach( $val as $enc ) {
$enclosure = split( "\n", $enc );
$enclosure = explode( "\n", $enc );
$pung[] = trim( $enclosure[ 0 ] );
}
}