Make WordPress Core

Changeset 13316


Ignore:
Timestamp:
02/22/2010 11:12:48 PM (15 years ago)
Author:
markjaquith
Message:

Whitespace cleanup

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/custom-background.php

    r13308 r13316  
    153153
    154154if ( get_background_image() ) : ?>
    155    
     155
    156156<h2><?php _e('Change Display Options') ?></h2>
    157157<form method="post" action="<?php echo esc_attr(add_query_arg('step', 1)) ?>">
  • trunk/wp-admin/import/wordpress.php

    r12985 r13316  
    189189                    $user_id = wp_create_user($new_author_name, wp_generate_password());
    190190                }
    191                
     191
    192192                if ( !is_wp_error( $user_id ) ) {
    193193                    $this->author_ids[$in_author_name] = $user_id;
     
    344344        }
    345345    }
    346    
     346
    347347    function process_terms() {
    348348        global $wpdb, $wp_taxonomies;
    349        
     349
    350350        $custom_taxonomies = $wp_taxonomies;
    351351        // get rid of the standard taxonomies
     
    353353        unset( $custom_taxonomies['post_tag'] );
    354354        unset( $custom_taxonomies['link_category'] );
    355        
     355
    356356        $custom_taxonomies = array_keys( $custom_taxonomies );
    357357        $current_terms = (array) get_terms( $custom_taxonomies, array('get' => 'all') );
     
    602602            // get_post_meta would have done this but we read straight from the db on export so we could have a serialized string
    603603            $value = maybe_unserialize($value);
    604            
     604
    605605            $this->process_post_meta($post_id, $key, $value);
    606606
  • trunk/wp-admin/includes/template.php

    r13313 r13316  
    32193219
    32203220    if ($hide_on_update AND $_GET['updated']) return;
    3221    
     3221
    32223222    $settings_errors = get_settings_errors( $setting, $sanitize );
    32233223
  • trunk/wp-content/blogs.php

    r13255 r13316  
    66 * @subpackage Multisite
    77 */
    8  
     8
    99define( 'SHORTINIT', true );
    1010require_once( dirname( dirname( __FILE__) ) . '/wp-load.php' );
    11  
     11
    1212/** Load Multisite upload handler. */
    1313require_once( ABSPATH . WPINC . '/ms-files.php' );
    14  
     14
    1515?>
  • trunk/wp-includes/pomo/mo.php

    r13228 r13316  
    2727        return $this->import_from_reader($reader);
    2828    }
    29    
     29
    3030    function export_to_file($filename) {
    3131        $fh = fopen($filename, 'wb');
     
    4444            $translations_lenghts_addr, $size_of_hash, $hash_addr));
    4545        fseek($fh, $originals_lenghts_addr);
    46        
     46
    4747        // headers' msgid is an empty string
    4848        fwrite($fh, pack('VV', 0, $current_addr));
     
    5656            $current_addr += $length + 1; // account for the NULL byte after
    5757        }
    58        
     58
    5959        $exported_headers = $this->export_headers();
    6060        fwrite($fh, pack('VV', strlen($exported_headers), $current_addr));
    6161        $current_addr += strlen($exported_headers) + 1;
    6262        $translations_table = $exported_headers . chr(0);
    63        
     63
    6464        foreach($entries as $entry) {
    6565            $translations_table .= $this->export_translations($entry) . chr(0);
     
    6868            $current_addr += $length + 1;
    6969        }
    70        
     70
    7171        fwrite($fh, $originals_table);
    7272        fwrite($fh, $translations_table);
    7373        fclose($fh);
    7474    }
    75    
     75
    7676    function export_original($entry) {
    7777        //TODO: warnings for control characters
     
    8181        return $exported;
    8282    }
    83    
     83
    8484    function export_translations($entry) {
    8585        //TODO: warnings for control characters
    8686        return implode(chr(0), $entry->translations);
    8787    }
    88    
     88
    8989    function export_headers() {
    9090        $exported = '';
  • trunk/wp-includes/pomo/po.php

    r13228 r13316  
    1919if ( !class_exists( 'PO' ) ):
    2020class PO extends Gettext_Translations {
    21    
     21
    2222
    2323    /**
     
    107107        return $po;
    108108    }
    109    
     109
    110110    /**
    111111     * Gives back the original string from a PO-formatted string
     
    218218        return $res !== false;
    219219    }
    220    
     220
    221221    function read_entry($f, $lineno = 0) {
    222222        $entry = new Translation_Entry();
     
    323323        return array('entry' => $entry, 'lineno' => $lineno);
    324324    }
    325    
     325
    326326    function read_line($f, $action = 'read') {
    327327        static $last_line = '';
     
    340340        return $line;
    341341    }
    342    
     342
    343343    function add_comment_to_entry(&$entry, $po_comment_line) {
    344344        $first_two = substr($po_comment_line, 0, 2);
     
    354354        }
    355355    }
    356    
     356
    357357    function trim_quotes($s) {
    358358        if ( substr($s, 0, 1) == '"') $s = substr($s, 1);
  • trunk/wp-includes/pomo/streams.php

    r13228 r13316  
    1111if ( !class_exists( 'POMO_Reader' ) ):
    1212class POMO_Reader {
    13    
     13
    1414    var $endian = 'little';
    1515    var $_post = '';
    16    
     16
    1717    function POMO_Reader() {
    1818        $this->is_overloaded = ((ini_get("mbstring.func_overload") & 2) != 0) && function_exists('mb_substr');
    1919        $this->_pos = 0;
    2020    }
    21    
     21
    2222    /**
    2323     * Sets the endianness of the file.
     
    5858        return unpack($endian_letter.$count, $bytes);
    5959    }
    60    
    61    
     60
     61
    6262    function substr($string, $start, $length) {
    6363        if ($this->is_overloaded) {
     
    6767        }
    6868    }
    69    
     69
    7070    function strlen($string) {
    7171        if ($this->is_overloaded) {
     
    7575        }
    7676    }
    77    
     77
    7878    function str_split($string, $chunk_size) {
    7979        if (!function_exists('str_split')) {
     
    8787        }
    8888    }
    89    
    90        
     89
     90
    9191    function pos() {
    9292        return $this->_pos;
     
    9696        return true;
    9797    }
    98    
     98
    9999    function close() {
    100100        return true;
     
    109109        $this->_f = fopen($filename, 'r');
    110110    }
    111    
     111
    112112    function read($bytes) {
    113113        return fread($this->_f, $bytes);
    114114    }
    115    
     115
    116116    function seekto($pos) {
    117117        if ( -1 == fseek($this->_f, $pos, SEEK_SET)) {
     
    121121        return true;
    122122    }
    123    
     123
    124124    function is_resource() {
    125125        return is_resource($this->_f);
    126126    }
    127    
     127
    128128    function feof() {
    129129        return feof($this->_f);
    130130    }
    131    
     131
    132132    function close() {
    133133        return fclose($this->_f);
    134134    }
    135    
     135
    136136    function read_all() {
    137137        $all = '';
     
    149149 */
    150150class POMO_StringReader extends POMO_Reader {
    151    
     151
    152152    var $_str = '';
    153    
     153
    154154    function POMO_StringReader($str = '') {
    155155        parent::POMO_Reader();
     
    179179        return $this->substr($this->_str, $this->_pos, $this->strlen($this->_str));
    180180    }
    181    
     181
    182182}
    183183endif;
  • trunk/wp-includes/pomo/translations.php

    r13228 r13316  
    127127        return call_user_func($this->_gettext_select_plural_form, $count);
    128128    }
    129    
     129
    130130    function nplurals_and_expression_from_header($header) {
    131131        if (preg_match('/^\s*nplurals\s*=\s*(\d+)\s*;\s+plural\s*=\s*(.+)$/', $header, $matches)) {
     
    181181        return rtrim($res, ';');
    182182    }
    183    
     183
    184184    function make_headers($translation) {
    185185        $headers = array();
     
    194194        return $headers;
    195195    }
    196    
     196
    197197    function set_header($header, $value) {
    198198        parent::set_header($header, $value);
     
    213213    var $entries = array();
    214214    var $headers = array();
    215    
     215
    216216    function add_entry($entry) {
    217217        return true;
  • trunk/wp-includes/post.php

    r13291 r13316  
    31393139    $post_type = 'attachment';
    31403140    $post_status = 'inherit';
    3141    
     3141
    31423142    // Make sure we set a valid category.
    31433143    if ( !isset($post_category) || 0 == count($post_category) || !is_array($post_category) ) {
Note: See TracChangeset for help on using the changeset viewer.