diff --git a/wp-admin/custom-background.php b/wp-admin/custom-background.php index 91a4cd150e..52b45eb4cb 100644 --- a/wp-admin/custom-background.php +++ b/wp-admin/custom-background.php @@ -152,7 +152,7 @@ class Custom_Background { } if ( get_background_image() ) : ?> - +

diff --git a/wp-admin/import/wordpress.php b/wp-admin/import/wordpress.php index 4c12c0003c..5b6a5a1b36 100644 --- a/wp-admin/import/wordpress.php +++ b/wp-admin/import/wordpress.php @@ -188,7 +188,7 @@ class WP_Import { if ( !$user_id ) { $user_id = wp_create_user($new_author_name, wp_generate_password()); } - + if ( !is_wp_error( $user_id ) ) { $this->author_ids[$in_author_name] = $user_id; } @@ -343,16 +343,16 @@ class WP_Import { $tag_ID = wp_insert_term($tag_name, 'post_tag', $tagarr); } } - + function process_terms() { global $wpdb, $wp_taxonomies; - + $custom_taxonomies = $wp_taxonomies; // get rid of the standard taxonomies unset( $custom_taxonomies['category'] ); unset( $custom_taxonomies['post_tag'] ); unset( $custom_taxonomies['link_category'] ); - + $custom_taxonomies = array_keys( $custom_taxonomies ); $current_terms = (array) get_terms( $custom_taxonomies, array('get' => 'all') ); $taxonomies = array(); @@ -601,7 +601,7 @@ class WP_Import { $value = stripslashes($value); // add_post_meta() will escape. // get_post_meta would have done this but we read straight from the db on export so we could have a serialized string $value = maybe_unserialize($value); - + $this->process_post_meta($post_id, $key, $value); } } diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index dc03bd4fea..9f0cc32b99 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -3218,7 +3218,7 @@ function get_settings_errors( $setting = '', $sanitize = FALSE ) { function settings_errors ( $setting = '', $sanitize = FALSE, $hide_on_update = FALSE ) { if ($hide_on_update AND $_GET['updated']) return; - + $settings_errors = get_settings_errors( $setting, $sanitize ); if ( !is_array($settings_errors) ) return; diff --git a/wp-content/blogs.php b/wp-content/blogs.php index 28ad272111..a4235b1675 100644 --- a/wp-content/blogs.php +++ b/wp-content/blogs.php @@ -5,11 +5,11 @@ * @package WordPress * @subpackage Multisite */ - + define( 'SHORTINIT', true ); require_once( dirname( dirname( __FILE__) ) . '/wp-load.php' ); - + /** Load Multisite upload handler. */ require_once( ABSPATH . WPINC . '/ms-files.php' ); - + ?> diff --git a/wp-includes/pomo/mo.php b/wp-includes/pomo/mo.php index 4020642525..1870d980cf 100644 --- a/wp-includes/pomo/mo.php +++ b/wp-includes/pomo/mo.php @@ -26,7 +26,7 @@ class MO extends Gettext_Translations { return false; return $this->import_from_reader($reader); } - + function export_to_file($filename) { $fh = fopen($filename, 'wb'); if ( !$fh ) return false; @@ -43,7 +43,7 @@ class MO extends Gettext_Translations { fwrite($fh, pack('V*', $magic, $revision, $total, $originals_lenghts_addr, $translations_lenghts_addr, $size_of_hash, $hash_addr)); fseek($fh, $originals_lenghts_addr); - + // headers' msgid is an empty string fwrite($fh, pack('VV', 0, $current_addr)); $current_addr++; @@ -55,24 +55,24 @@ class MO extends Gettext_Translations { fwrite($fh, pack('VV', $length, $current_addr)); $current_addr += $length + 1; // account for the NULL byte after } - + $exported_headers = $this->export_headers(); fwrite($fh, pack('VV', strlen($exported_headers), $current_addr)); $current_addr += strlen($exported_headers) + 1; $translations_table = $exported_headers . chr(0); - + foreach($entries as $entry) { $translations_table .= $this->export_translations($entry) . chr(0); $length = strlen($this->export_translations($entry)); fwrite($fh, pack('VV', $length, $current_addr)); $current_addr += $length + 1; } - + fwrite($fh, $originals_table); fwrite($fh, $translations_table); fclose($fh); } - + function export_original($entry) { //TODO: warnings for control characters $exported = $entry->singular; @@ -80,12 +80,12 @@ class MO extends Gettext_Translations { if (!is_null($entry->context)) $exported = $entry->context . chr(4) . $exported; return $exported; } - + function export_translations($entry) { //TODO: warnings for control characters return implode(chr(0), $entry->translations); } - + function export_headers() { $exported = ''; foreach($this->headers as $header => $value) { diff --git a/wp-includes/pomo/po.php b/wp-includes/pomo/po.php index 631b703a8d..b50bfa30d9 100644 --- a/wp-includes/pomo/po.php +++ b/wp-includes/pomo/po.php @@ -18,7 +18,7 @@ ini_set('auto_detect_line_endings', 1); */ if ( !class_exists( 'PO' ) ): class PO extends Gettext_Translations { - + /** * Exports headers to a PO entry @@ -106,7 +106,7 @@ class PO extends Gettext_Translations { $po = str_replace("$newline$quote$quote", '', $po); return $po; } - + /** * Gives back the original string from a PO-formatted string * @@ -217,7 +217,7 @@ class PO extends Gettext_Translations { PO::read_line($f, 'clear'); return $res !== false; } - + function read_entry($f, $lineno = 0) { $entry = new Translation_Entry(); // where were we in the last step @@ -322,7 +322,7 @@ class PO extends Gettext_Translations { } return array('entry' => $entry, 'lineno' => $lineno); } - + function read_line($f, $action = 'read') { static $last_line = ''; static $use_last_line = false; @@ -339,7 +339,7 @@ class PO extends Gettext_Translations { $use_last_line = false; return $line; } - + function add_comment_to_entry(&$entry, $po_comment_line) { $first_two = substr($po_comment_line, 0, 2); $comment = trim(substr($po_comment_line, 2)); @@ -353,7 +353,7 @@ class PO extends Gettext_Translations { $entry->translator_comments = trim($entry->translator_comments . "\n" . $comment); } } - + function trim_quotes($s) { if ( substr($s, 0, 1) == '"') $s = substr($s, 1); if ( substr($s, -1, 1) == '"') $s = substr($s, 0, -1); diff --git a/wp-includes/pomo/streams.php b/wp-includes/pomo/streams.php index 256e22e452..8ac94c35d6 100644 --- a/wp-includes/pomo/streams.php +++ b/wp-includes/pomo/streams.php @@ -10,15 +10,15 @@ if ( !class_exists( 'POMO_Reader' ) ): class POMO_Reader { - + var $endian = 'little'; var $_post = ''; - + function POMO_Reader() { $this->is_overloaded = ((ini_get("mbstring.func_overload") & 2) != 0) && function_exists('mb_substr'); $this->_pos = 0; } - + /** * Sets the endianness of the file. * @@ -57,8 +57,8 @@ class POMO_Reader { $endian_letter = ('big' == $this->endian)? 'N' : 'V'; return unpack($endian_letter.$count, $bytes); } - - + + function substr($string, $start, $length) { if ($this->is_overloaded) { return mb_substr($string, $start, $length, 'ascii'); @@ -66,7 +66,7 @@ class POMO_Reader { return substr($string, $start, $length); } } - + function strlen($string) { if ($this->is_overloaded) { return mb_strlen($string, 'ascii'); @@ -74,7 +74,7 @@ class POMO_Reader { return strlen($string); } } - + function str_split($string, $chunk_size) { if (!function_exists('str_split')) { $length = $this->strlen($string); @@ -86,8 +86,8 @@ class POMO_Reader { return str_split( $string, $chunk_size ); } } - - + + function pos() { return $this->_pos; } @@ -95,7 +95,7 @@ class POMO_Reader { function is_resource() { return true; } - + function close() { return true; } @@ -108,11 +108,11 @@ class POMO_FileReader extends POMO_Reader { parent::POMO_Reader(); $this->_f = fopen($filename, 'r'); } - + function read($bytes) { return fread($this->_f, $bytes); } - + function seekto($pos) { if ( -1 == fseek($this->_f, $pos, SEEK_SET)) { return false; @@ -120,19 +120,19 @@ class POMO_FileReader extends POMO_Reader { $this->_pos = $pos; return true; } - + function is_resource() { return is_resource($this->_f); } - + function feof() { return feof($this->_f); } - + function close() { return fclose($this->_f); } - + function read_all() { $all = ''; while ( !$this->feof() ) @@ -148,9 +148,9 @@ if ( !class_exists( 'POMO_StringReader' ) ): * of a physical file. */ class POMO_StringReader extends POMO_Reader { - + var $_str = ''; - + function POMO_StringReader($str = '') { parent::POMO_Reader(); $this->_str = $str; @@ -178,7 +178,7 @@ class POMO_StringReader extends POMO_Reader { function read_all() { return $this->substr($this->_str, $this->_pos, $this->strlen($this->_str)); } - + } endif; diff --git a/wp-includes/pomo/translations.php b/wp-includes/pomo/translations.php index 98c3f4e0ed..f8aa175ccc 100644 --- a/wp-includes/pomo/translations.php +++ b/wp-includes/pomo/translations.php @@ -126,7 +126,7 @@ class Gettext_Translations extends Translations { } return call_user_func($this->_gettext_select_plural_form, $count); } - + function nplurals_and_expression_from_header($header) { if (preg_match('/^\s*nplurals\s*=\s*(\d+)\s*;\s+plural\s*=\s*(.+)$/', $header, $matches)) { $nplurals = (int)$matches[1]; @@ -180,7 +180,7 @@ class Gettext_Translations extends Translations { } return rtrim($res, ';'); } - + function make_headers($translation) { $headers = array(); // sometimes \ns are used instead of real new lines @@ -193,7 +193,7 @@ class Gettext_Translations extends Translations { } return $headers; } - + function set_header($header, $value) { parent::set_header($header, $value); if ('Plural-Forms' == $header) { @@ -212,7 +212,7 @@ if ( !class_exists( 'NOOP_Translations' ) ): class NOOP_Translations { var $entries = array(); var $headers = array(); - + function add_entry($entry) { return true; } diff --git a/wp-includes/post.php b/wp-includes/post.php index cbb18798e1..f6a1906aa1 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -3138,7 +3138,7 @@ function wp_insert_attachment($object, $file = false, $parent = 0) { $post_type = 'attachment'; $post_status = 'inherit'; - + // Make sure we set a valid category. if ( !isset($post_category) || 0 == count($post_category) || !is_array($post_category) ) { // 'post' requires at least one category.