Make WordPress Core

Changeset 11013


Ignore:
Timestamp:
04/20/2009 06:18:39 PM (15 years ago)
Author:
ryan
Message:

Trailing whitespace cleanup

Location:
trunk
Files:
30 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/async-upload.php

    r10827 r11013  
    66 * @subpackage Administration
    77 */
    8  
    9 define('WP_ADMIN', true); 
     8
     9define('WP_ADMIN', true);
    1010
    1111if ( defined('ABSPATH') )
  • trunk/wp-admin/custom-header.php

    r10925 r11013  
    233233        var ximg = jQuery('#upload').width();
    234234        var yimg = jQuery('#upload').height();
    235        
     235
    236236        //set up default values
    237237        jQuery( '#x1' ).val(0);
     
    241241        jQuery( '#width' ).val(xinit);
    242242        jQuery( '#height' ).val(yinit);
    243        
     243
    244244        if ( yimg < yinit || ximg < xinit ) {
    245245            if ( ximg / yimg > ratio ) {
  • trunk/wp-admin/gears-manifest.php

    r10939 r11013  
    77 */
    88
    9 /** 
     9/**
    1010 * Disable error reporting
    11  * 
     11 *
    1212 * Set this to error_reporting( E_ALL ) or error_reporting( E_ALL | E_STRICT ) for debugging
    1313 */
  • trunk/wp-admin/includes/class-wp-upgrader.php

    r11012 r11013  
    2020    var $skin = null;
    2121    var $result = array();
    22    
     22
    2323    function WP_Upgrader(&$skin = null) {
    2424        return __construct($skin);
     
    3131        $this->skin->set_upgrader($this);
    3232    }
    33    
     33
    3434    function generic_strings() {
    3535        $this->strings['bad_request'] = __('Invalid Data provided.');
     
    4747        $this->strings['mkdir_failed'] = __('Could not create directory.');
    4848        $this->strings['bad_package'] = __('Incompatible Archive');
    49        
     49
    5050        $this->strings['maintenance_start'] = __('Enabling Maintenance mode.');
    5151        $this->strings['maintenance_end'] = __('Disabling Maintenance mode.');
    5252    }
    53    
     53
    5454    function fs_connect( $directories = array() ) {
    5555        global $wp_filesystem;
    56    
     56
    5757        if ( false === ($credentials = $this->skin->request_filesystem_credentials()) )
    5858            return false;
    59    
     59
    6060        if ( ! WP_Filesystem($credentials) ) {
    6161            $error = true;
     
    6868        if ( ! is_object($wp_filesystem) )
    6969            return new WP_Error('fs_unavailable', $this->strings['fs_unavailable'] );
    70    
     70
    7171        if ( is_wp_error($wp_filesystem->errors) && $wp_filesystem->errors->get_error_code() )
    7272            return new WP_Error('fs_error', $this->strings['fs_error'], $wp_filesystem->errors);
     
    9595        if ( ! preg_match('!^(http|https|ftp)://!i', $package) && file_exists($package) ) //Local file or remote?
    9696            return $package; //must be a local file..
    97        
     97
    9898        if ( empty($package) )
    9999            return new WP_Error('no_package', $this->strings['no_package']);
     
    102102
    103103        $download_file = download_url($package);
    104    
     104
    105105        if ( is_wp_error($download_file) )
    106106            return new WP_Error('download_failed', $this->strings['download_failed'], $download_file->get_error_message());
    107        
     107
    108108        return $download_file;
    109109    }
    110    
     110
    111111    function unpack_package($package, $delete_package = true) {
    112112        global $wp_filesystem;
    113        
     113
    114114        $this->skin->feedback('unpack_package');
    115115
     
    141141            return $result;
    142142        }
    143        
     143
    144144        return $working_dir;
    145145    }
    146    
     146
    147147    function install_package($args = array()) {
    148148        global $wp_filesystem;
     
    158158        if ( empty($source) || empty($destination) )
    159159            return new WP_Error('bad_request', $this->strings['bad_request']);
    160        
     160
    161161        $this->skin->feedback('installing_package');
    162162
     
    168168        $remote_source = $source;
    169169        $local_destination = $destination;
    170        
     170
    171171        $source_files = array_keys( $wp_filesystem->dirlist($remote_source) );
    172172        $remote_destination = $wp_filesystem->find_folder($local_destination);
     
    178178            return new WP_Error('bad_package', $this->strings['bad_package']); //There are no files?
    179179        //else //Its only a single file, The upgrader will use the foldername of this file as the destination folder. foldername is based on zip filename.
    180                  
     180
    181181        //Hook ability to change the source file location..
    182182        $source = apply_filters('upgrader_source_selection', $source, $remote_source, $this);
    183183        if ( is_wp_error($source) )
    184184            return $source;
    185        
     185
    186186        //Has the source location changed? If so, we need a new source_files list.
    187187        if ( $source !== $remote_source )
    188188            $source_files = array_keys( $wp_filesystem->dirlist($source) );
    189        
     189
    190190        //Protection against deleting files in any important base directories.
    191191        if ( in_array( $destination, array(ABSPATH, WP_CONTENT_DIR, WP_PLUGIN_DIR, WP_CONTENT_DIR . '/themes') ) ) {
     
    213213                return new WP_Error('remove_old_failed', $this->strings['remove_old_failed']);
    214214        }
    215        
     215
    216216        //Create destination if needed
    217217        if ( !$wp_filesystem->exists($remote_destination) )
    218218            if ( !$wp_filesystem->mkdir($remote_destination, FS_CHMOD_DIR) )
    219219                return new WP_Error('mkdir_failed', $this->strings['mkdir_failed'], $remote_destination);
    220        
     220
    221221        // Copy new version of item into place.
    222222        $result = copy_dir($source, $remote_destination);
     
    226226            return $result;
    227227        }
    228        
    229         //Clear the Working folder? 
     228
     229        //Clear the Working folder?
    230230        if ( $clear_working )
    231231            $wp_filesystem->delete($remote_source, true);
    232        
     232
    233233        $destination_name = basename( str_replace($local_destination, '', $destination) );
    234234        if ( '.' == $destination_name )
     
    246246        return $this->result;
    247247    }
    248    
     248
    249249    function run($options) {
    250250
     
    278278            return $download;
    279279        }
    280        
     280
    281281        //Unzip's the file into a temporary directory
    282282        $working_dir = $this->unpack_package( $download );
     
    287287
    288288        //With the given options, this installs it to the destination directory.
    289         $result = $this->install_package( array( 
     289        $result = $this->install_package( array(
    290290                                            'source' => $working_dir,
    291291                                            'destination' => $destination,
     
    306306        return $result;
    307307    }
    308    
     308
    309309    function maintenance_mode($enable = false) {
    310310        global $wp_filesystem;
     
    321321        }
    322322    }
    323    
     323
    324324}
    325325
     
    327327
    328328    var $result;
    329    
     329
    330330    function upgrade_strings() {
    331331        $this->generic_strings();
     
    352352
    353353    function install($package) {
    354        
     354
    355355        $this->install_strings();
    356356
     
    362362                    'hook_extra' => array()
    363363                    ));
    364    
     364
    365365        // Force refresh of plugin update information
    366366        delete_transient('update_plugins');
     
    369369
    370370    function upgrade($plugin) {
    371        
     371
    372372        $this->upgrade_strings();
    373        
     373
    374374        $current = get_transient( 'update_plugins' );
    375375        if ( !isset( $current->response[ $plugin ] ) ) {
     
    381381        // Get the URL to the zip file
    382382        $r = $current->response[ $plugin ];
    383        
     383
    384384        add_filter('upgrader_pre_install', array(&$this, 'deactivate_plugin_before_upgrade'), 10, 2);
    385385        add_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin'), 10, 4);
     
    406406        delete_transient('update_plugins');
    407407    }
    408    
     408
    409409    //return plugin info.
    410410    function plugin_info() {
     
    412412            return false;
    413413        if ( empty($this->result['destination_name']) )
    414             return false; 
     414            return false;
    415415
    416416        $plugin = get_plugins('/' . $this->result['destination_name']); //Ensure to pass with leading slash
     
    420420        $pluginfiles = array_keys($plugin); //Assume the requested plugin is the first in the list
    421421
    422         return $this->result['destination_name'] . '/' . $pluginfiles[0];   
     422        return $this->result['destination_name'] . '/' . $pluginfiles[0];
    423423    }
    424424
     
    437437            //Deactivate the plugin silently, Prevent deactivation hooks from running.
    438438            deactivate_plugins($plugin, true);
    439         }   
     439        }
    440440    }
    441441
     
    443443    function delete_old_plugin($removed, $local_destination, $remote_destination, $plugin) {
    444444        global $wp_filesystem;
    445    
     445
    446446        if ( is_wp_error($removed) )
    447447            return $removed; //Pass errors through.
    448    
     448
    449449        $plugin = isset($plugin['plugin']) ? $plugin['plugin'] : '';
    450450        if ( empty($plugin) )
     
    453453        $plugins_dir = $wp_filesystem->wp_plugins_dir();
    454454        $this_plugin_dir = trailingslashit( dirname($plugins_dir . $plugin) );
    455        
     455
    456456        if ( ! $wp_filesystem->exists($this_plugin_dir) ) //If its already vanished.
    457457            return $removed;
    458    
     458
    459459        // If plugin is in its own directory, recursively delete the directory.
    460460        if ( strpos($plugin, '/') && $this_plugin_dir != $plugins_dir ) //base check on if plugin includes directory seperator AND that its not the root plugin folder
     
    465465        if ( ! $deleted )
    466466            return new WP_Error('remove_old_failed', $this->strings['remove_old_failed']);
    467        
     467
    468468        return $removed;
    469469    }
     
    498498
    499499    function install($package) {
    500        
     500
    501501        $this->install_strings();
    502502
     
    507507                        'clear_working' => true
    508508                        );
    509        
     509
    510510        $this->run($options);
    511    
     511
    512512        if ( ! $this->result || is_wp_error($this->result) )
    513513            return $this->result;
    514    
     514
    515515        // Force refresh of theme update information
    516516        delete_transient('update_themes');
    517    
     517
    518518        if ( empty($result['destination_name']) )
    519             return false; 
     519            return false;
    520520        else
    521521            return $result['destination_name'];
     
    523523
    524524    function upgrade($theme) {
    525        
     525
    526526        $this->upgrade_strings();
    527        
     527
    528528        // Is an update available?
    529529        $current = get_transient( 'update_themes' );
    530530        if ( !isset( $current->response[ $theme ] ) )
    531531            return new WP_Error('up_to_date', $this->strings['up_to_date']);
    532        
     532
    533533        $r = $current->response[ $theme ];
    534534
     
    546546                                            )
    547547                        );
    548        
     548
    549549        $this->run($options);
    550550
     
    557557        return true;
    558558    }
    559    
     559
    560560    function current_before($return, $theme) {
    561        
     561
    562562        if ( is_wp_error($return) )
    563563            return $return;
     
    593593        return $return;
    594594    }
    595    
     595
    596596    function delete_old_theme($removed, $local_destination, $remote_destination, $theme) {
    597597        global $wp_filesystem;
    598    
     598
    599599        $theme = isset($theme['theme']) ? $theme['theme'] : '';
    600    
     600
    601601        if ( is_wp_error($removed) || empty($theme) )
    602602            return $removed; //Pass errors through.
    603        
     603
    604604        $themes_dir = $wp_filesystem->wp_themes_dir();
    605605        if ( $wp_filesystem->exists( trailingslashit($themes_dir) . $theme ) )
     
    608608        return true;
    609609    }
    610    
     610
    611611    function theme_info() {
    612612        if ( empty($this->result['destination_name']) )
     
    632632        global $wp_filesystem;
    633633        $this->upgrade_strings();
    634        
    635    
     634
     635
    636636        if ( !empty($feedback) )
    637637            add_filter('update_feedback', $feedback);
    638    
     638
    639639        // Is an update available?
    640640        if ( !isset( $current->response ) || $current->response == 'latest' )
     
    644644        if ( is_wp_error($res) )
    645645            return $res;
    646        
     646
    647647        $wp_dir = trailingslashit($wp_filesystem->abspath());
    648        
     648
    649649        $download = $this->download_package( $current->package );
    650650        if ( is_wp_error($download) )
    651651            return $download;
    652        
     652
    653653        $working_dir = $this->unpack_package( $download );
    654654        if ( is_wp_error($working_dir) )
     
    661661        }
    662662        $wp_filesystem->chmod($wp_dir . 'wp-admin/includes/update-core.php', FS_CHMOD_FILE);
    663    
     663
    664664        require(ABSPATH . 'wp-admin/includes/update-core.php');
    665    
     665
    666666        return update_core($working_dir, $wp_dir);
    667667    }
     
    678678
    679679class WP_Upgrader_Skin {
    680    
     680
    681681    var $upgrader;
    682682    var $done_header = false;
    683    
     683
    684684    function WP_Upgrader_Skin($args = array()) {
    685685        return __construct($args);
     
    689689        $this->options = wp_parse_args($args, $defaults);
    690690    }
    691    
     691
    692692    function set_upgrader(&$upgrader) {
    693693        if ( is_object($upgrader) )
     
    697697        $this->result = $result;
    698698    }
    699    
     699
    700700    function request_filesystem_credentials($error = false) {
    701701        $url = $this->options['url'];
     
    704704        return request_filesystem_credentials($url, '', $error); //Possible to bring inline, Leaving as0is for now.
    705705    }
    706    
     706
    707707    function header() {
    708708        if ( $this->done_header )
     
    711711        echo '<div class="wrap">';
    712712        echo screen_icon();
    713         echo '<h2>' . $this->options['title'] . '</h2>';   
     713        echo '<h2>' . $this->options['title'] . '</h2>';
    714714    }
    715715    function footer() {
    716716        echo '</div>';
    717717    }
    718    
     718
    719719    function error($errors) {
    720720        if ( ! $this->done_header )
     
    739739            return;
    740740        show_message($string);
    741     }   
     741    }
    742742    function before() {}
    743743    function after() {}
    744    
     744
    745745}
    746746
     
    760760
    761761        $this->plugin_active = is_plugin_active($this->plugin);
    762        
     762
    763763        parent::__construct($args);
    764764    }
    765    
     765
    766766    function after() {
    767767        $this->plugin = $this->upgrader->plugin_info();
     
    797797        $defaults = array( 'type' => 'web', 'url' => '', 'plugin' => '', 'nonce' => '', 'title' => '' );
    798798        $args = wp_parse_args($args, $defaults);
    799        
     799
    800800        $this->type = $args['type'];
    801801        $this->api = isset($args['api']) ? $args['api'] : array();
    802        
     802
    803803        parent::__construct($args);
    804804    }
     
    808808            $this->upgrader->strings['process_success'] = sprintf( __('Successfully installed the plugin <strong>%s %s</strong>.'), $this->api->name, $this->api->version);
    809809    }
    810    
     810
    811811    function after() {
    812812
     
    843843        $defaults = array( 'type' => 'web', 'url' => '', 'theme' => '', 'nonce' => '', 'title' => '' );
    844844        $args = wp_parse_args($args, $defaults);
    845        
     845
    846846        $this->type = $args['type'];
    847847        $this->api = isset($args['api']) ? $args['api'] : array();
    848        
     848
    849849        parent::__construct($args);
    850850    }
     
    854854            $this->upgrader->strings['process_success'] = sprintf( __('Successfully installed the theme <strong>%s %s</strong>.'), $this->api->name, $this->api->version);
    855855    }
    856    
     856
    857857    function after() {
    858858        if ( empty($this->upgrader->result['destination_name']) )
     
    865865        $stylesheet = $this->upgrader->result['destination_name'];
    866866        $template = !empty($theme_info['Template']) ? $theme_info['Template'] : $stylesheet;
    867        
     867
    868868        $preview_link = htmlspecialchars( add_query_arg( array('preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'TB_iframe' => 'true' ), trailingslashit(clean_url(get_option('home'))) ) );
    869869        $activate_link = wp_nonce_url("themes.php?action=activate&amp;template=" . urlencode($template) . "&amp;stylesheet=" . urlencode($stylesheet), 'switch-theme_' . $template);
    870        
     870
    871871        $install_actions = array(
    872872            'preview' => '<a href="' . $preview_link . '" class="thickbox thickbox-preview" title="' . attribute_escape(sprintf(__('Preview "%s"'), $name)) . '">' . __('Preview') . '</a>',
     
    900900
    901901        $this->theme = $args['theme'];
    902        
     902
    903903        parent::__construct($args);
    904904    }
    905    
     905
    906906    function after() {
    907907
     
    915915        $stylesheet = $this->upgrader->result['destination_name'];
    916916        $template = !empty($theme_info['Template']) ? $theme_info['Template'] : $stylesheet;
    917        
     917
    918918        $preview_link = htmlspecialchars( add_query_arg( array('preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'TB_iframe' => 'true' ), trailingslashit(clean_url(get_option('home'))) ) );
    919919        $activate_link = wp_nonce_url("themes.php?action=activate&amp;template=" . urlencode($template) . "&amp;stylesheet=" . urlencode($stylesheet), 'switch-theme_' . $template);
     
    926926        if ( ( ! $this->result || is_wp_error($this->result) ) || $stylesheet == get_stylesheet() )
    927927            unset($update_actions['preview'], $update_actions['activate']);
    928    
     928
    929929        $update_actions = apply_filters('update_theme_complete_actions', $update_actions, $this->theme);
    930930        if ( ! empty($update_actions) )
     
    943943        if ( ! ( ( $uploads = wp_upload_dir() ) && false === $uploads['error'] ) )
    944944            wp_die($uploads['error']);
    945        
     945
    946946        if ( empty($_FILES[$form]['name']) && empty($_GET[$urlholder]) )
    947947            wp_die(__('Please select a file'));
    948    
     948
    949949        if ( !empty($_FILES) )
    950950            $this->filename = $_FILES[$form]['name'];
     
    956956            $this->filename = wp_unique_filename( $uploads['basedir'], $this->filename );
    957957            $this->package = $uploads['basedir'] . '/' . $this->filename;
    958    
     958
    959959            // Move the file to the uploads dir
    960960            if ( false === @ move_uploaded_file( $_FILES[$form]['tmp_name'], $this->package) )
  • trunk/wp-admin/includes/media.php

    r10943 r11013  
    15661566</span>
    15671567<?php _e('Sort Order:'); ?>
    1568 <a href="#" id="asc"><?php _e('Ascending'); ?></a> | 
    1569 <a href="#" id="desc"><?php _e('Descending'); ?></a> | 
     1568<a href="#" id="asc"><?php _e('Ascending'); ?></a> |
     1569<a href="#" id="desc"><?php _e('Descending'); ?></a> |
    15701570<a href="#" id="clear"><?php _e('Clear'); ?></a>
    15711571</div>
  • trunk/wp-admin/includes/plugin-install.php

    r11005 r11013  
    202202 * Upload from zip
    203203 * @since 2.8.0
    204  * 
     204 *
    205205 * @param string $page
    206206 */
  • trunk/wp-admin/includes/template.php

    r11007 r11013  
    15701570        while ( $find_main_page > 0 ) {
    15711571            $parent = get_page($find_main_page);
    1572            
     1572
    15731573            if ( is_null($parent) )
    15741574                break;
    1575            
     1575
    15761576            $level++;
    15771577            $find_main_page = (int)$parent->post_parent;
    1578            
     1578
    15791579            if ( !isset($parent_name) )
    15801580                $parent_name = $parent->post_title;
  • trunk/wp-admin/includes/theme-install.php

    r11005 r11013  
    404404    $rows = ceil(count($themes) / 3);
    405405    $table = array();
    406     $theme_keys = array_keys($themes); 
    407     for ( $row = 1; $row <= $rows; $row++ ) 
    408         for ( $col = 1; $col <= 3; $col++ ) 
    409             $table[$row][$col] = array_shift($theme_keys); 
     406    $theme_keys = array_keys($themes);
     407    for ( $row = 1; $row <= $rows; $row++ )
     408        for ( $col = 1; $col <= 3; $col++ )
     409            $table[$row][$col] = array_shift($theme_keys);
    410410
    411411    foreach ( $table as $row => $cols ) {
     
    422422        ?>
    423423        <td class="<?php echo join(' ', $class); ?>"><?php
    424             if ( isset($themes[$theme_index]) ) 
    425                 display_theme($themes[$theme_index]); 
     424            if ( isset($themes[$theme_index]) )
     425                display_theme($themes[$theme_index]);
    426426        ?></td>
    427427        <?php } // end foreach $cols ?>
  • trunk/wp-admin/includes/update.php

    r11005 r11013  
    178178
    179179function wp_update_theme($theme, $feedback = '') {
    180    
     180
    181181    if ( !empty($feedback) )
    182182        add_filter('update_feedback', $feedback);
     
    189189
    190190function wp_update_core($current, $feedback = '') {
    191    
     191
    192192    if ( !empty($feedback) )
    193193        add_filter('update_feedback', $feedback);
  • trunk/wp-admin/includes/user.php

    r10992 r11013  
    413413
    414414    $id = (int) $id;
    415     $user = new WP_User($id);   
     415    $user = new WP_User($id);
    416416
    417417    // allow for transaction statement
     
    449449    wp_cache_delete($user->user_email, 'useremail');
    450450    wp_cache_delete($user->user_nicename, 'userslugs');
    451    
     451
    452452    // allow for commit transaction
    453453    do_action('deleted_user', $id);
  • trunk/wp-admin/load-scripts.php

    r10939 r11013  
    11<?php
    22
    3 /** 
     3/**
    44 * Disable error reporting
    5  * 
     5 *
    66 * Set this to error_reporting( E_ALL ) or error_reporting( E_ALL | E_STRICT ) for debugging
    77 */
  • trunk/wp-admin/load-styles.php

    r10939 r11013  
    11<?php
    22
    3 /** 
     3/**
    44 * Disable error reporting
    5  * 
     5 *
    66 * Set this to error_reporting( E_ALL ) or error_reporting( E_ALL | E_STRICT ) for debugging
    77 */
  • trunk/wp-admin/plugins.php

    r11004 r11013  
    464464    if ( $total_this_page > $plugins_per_page )
    465465        $plugins = array_slice($plugins, $start, $plugins_per_page);
    466    
     466
    467467    print_plugins_table($plugins, $status);
    468468?>
  • trunk/wp-admin/press-this.php

    r11010 r11013  
    5959                $desc = isset($_REQUEST['photo_description'][$key]) ? $_REQUEST['photo_description'][$key] : '';
    6060                $upload = media_sideload_image($image, $post_ID, $desc);
    61                
     61
    6262                // Replace the POSTED content <img> with correct uploaded ones. Regex contains fix for Magic Quotes
    6363                if( !is_wp_error($upload) ) $content = preg_replace('/<img ([^>]*)src=\\\?(\"|\')'.preg_quote($image, '/').'\\\?(\2)([^>\/]*)\/*>/is', $upload, $content);
     
    451451            <!-- This div holds the photo metadata -->
    452452            <div class="photolist"></div>
    453            
     453
    454454            <div id="submitdiv" class="stuffbox">
    455455                <h3><?php _e('Publish') ?></h3>
     
    466466                </div>
    467467            </div>
    468            
     468
    469469            <div id="categorydiv" class="stuffbox">
    470470                <h3><?php _e('Categories') ?></h3>
     
    525525        <div class="postdivrich">
    526526            <ul id="actions">
    527                
     527
    528528                <li id="photo_button">
    529529                    Add: <?php if ( current_user_can('upload_files') ) { ?><a title="<?php _e('Insert an Image'); ?>" href="#">
  • trunk/wp-admin/update.php

    r11012 r11013  
    3535
    3636        include('admin-footer.php');
    37        
     37
    3838    } elseif ('activate-plugin' == $action ) {
    3939        if ( ! current_user_can('update_plugins') )
     
    6464
    6565        include_once ABSPATH . 'wp-admin/includes/plugin-install.php'; //for plugins_api..
    66    
     66
    6767        check_admin_referer('install-plugin_' . $plugin);
    6868        $api = plugins_api('plugin_information', array('slug' => $plugin, 'fields' => array('sections' => false) ) ); //Save on a bit of bandwidth.
    69    
     69
    7070        if ( is_wp_error($api) )
    7171            wp_die($api);
    72    
     72
    7373        $title = __('Plugin Install');
    7474        $parent_file = 'plugins.php';
    7575        $submenu_file = 'plugin-install.php';
    7676        require_once('admin-header.php');
    77    
     77
    7878        $title = sprintf( __('Installing Plugin: %s'), $api->name . ' ' . $api->version );
    7979        $nonce = 'install-plugin_' . $plugin;
     
    8383        $upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact('title', 'url', 'nonce', 'plugin', 'api') ) );
    8484        $upgrader->install($api->download_link);
    85        
     85
    8686        include('admin-footer.php');
    8787
     
    9999        $submenu_file = 'plugin-install.php';
    100100        require_once('admin-header.php');
    101        
     101
    102102        $title = sprintf( __('Installing Plugin from uploaded file: %s'), basename( $file_upload->filename ) );
    103103        $nonce = 'plugin-upload';
     
    131131
    132132        include('admin-footer.php');
    133    
     133
    134134    } elseif ( 'install-theme' == $action ) {
    135135
     
    138138
    139139        include_once ABSPATH . 'wp-admin/includes/theme-install.php'; //for themes_api..
    140    
     140
    141141        check_admin_referer('install-theme_' . $theme);
    142142        $api = themes_api('theme_information', array('slug' => $theme, 'fields' => array('sections' => false) ) ); //Save on a bit of bandwidth.
     
    151151        $submenu_file = 'theme-install.php';
    152152        require_once('admin-header.php');
    153    
     153
    154154        $title = sprintf( __('Installing theme: %s'), $api->name . ' ' . $api->version );
    155155        $nonce = 'install-theme_' . $theme;
    156156        $url = 'update.php?action=install-theme&theme=' . $theme;
    157157        $type = 'web'; //Install theme type, From Web or an Upload.
    158    
     158
    159159        $upgrader = new Theme_Upgrader( new Theme_Installer_Skin( compact('title', 'url', 'nonce', 'plugin', 'api') ) );
    160160        $upgrader->install($api->download_link);
    161        
     161
    162162        include('admin-footer.php');
    163        
     163
    164164    } elseif ( 'upload-theme' == $action ) {
    165165
  • trunk/wp-content/themes/default/sidebar.php

    r10945 r11013  
    5050            </li>
    5151        <?php }?>
    52         </ul> 
     52        </ul>
    5353        <ul role="navigation">
    5454            <?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?>
  • trunk/wp-includes/classes.php

    r10814 r11013  
    11851185            $css_class[] = 'current_page_parent';
    11861186        }
    1187        
    1188         $css_class = implode(' ', apply_filters('page_css_class', $css_class, $page)); 
     1187
     1188        $css_class = implode(' ', apply_filters('page_css_class', $css_class, $page));
    11891189
    11901190        $output .= $indent . '<li class="' . $css_class . '"><a href="' . get_page_link($page->ID) . '" title="' . attribute_escape(apply_filters('the_title', $page->post_title)) . '">' . $link_before . apply_filters('the_title', $page->post_title) . $link_after . '</a>';
  • trunk/wp-includes/comment-template.php

    r11011 r11013  
    909909function comments_popup_link( $zero = false, $one = false, $more = false, $css_class = '', $none = false ) {
    910910    global $id, $wpcommentspopupfile, $wpcommentsjavascript, $post;
    911    
     911
    912912    if ( false === $zero ) $zero = __( 'No Comments' );
    913913    if ( false === $one ) $one = __( '1 Comment' );
    914914    if ( false === $more ) $more = __( '% Comments' );
    915915    if ( false === $none ) $none = __( 'Comments Off' );
    916    
     916
    917917    $number = get_comments_number( $id );
    918918
     
    11161116function comment_form_title( $noreplytext = false, $replytext = false, $linktoparent = TRUE ) {
    11171117    global $comment;
    1118    
     1118
    11191119    if ( false === $noreplytext ) $noreplytext = __( 'Leave a Reply' );
    11201120    if ( false === $replytext ) $replytext = __( 'Leave a Reply to %s' );
  • trunk/wp-includes/feed-atom-comments.php

    r10984 r11013  
    4141    <id><?php bloginfo_rss('comments_atom_url'); ?></id>
    4242<?php } ?>
    43 <?php do_action('comments_atom_head'); ?> 
     43<?php do_action('comments_atom_head'); ?>
    4444<?php
    4545if ( have_comments() ) : while ( have_comments() ) : the_comment();
  • trunk/wp-includes/formatting.php

    r10989 r11013  
    4747    $static_characters = array_merge(array('---', ' -- ', '--', ' - ', 'xn&#8211;', '...', '``', '\'s', '\'\'', ' (tm)'), $cockney);
    4848    $static_replacements = array_merge(array('&#8212;', ' &#8212; ', '&#8211;', ' &#8211; ', 'xn--', '&#8230;', '&#8220;', '&#8217;s', '&#8221;', ' &#8482;'), $cockneyreplace);
    49    
     49
    5050    $dynamic_characters = array('/\'(\d\d(?:&#8217;|\')?s)/', '/(\s|\A|")\'/', '/(\d+)"/', '/(\d+)\'/', '/(\S)\'([^\'\s])/', '/(\s|\A)"(?!\s)/', '/"(\s|\S|\Z)/', '/\'([\s.]|\Z)/', '/(\d+)x(\d+)/');
    5151    $dynamic_replacements = array('&#8217;$1','$1&#8216;', '$1&#8243;', '$1&#8242;', '$1&#8217;$2', '$1&#8220;$2', '&#8221;$1', '&#8217;$1', '$1&#215;$2');
  • trunk/wp-includes/functions.php

    r10974 r11013  
    9797        $gmt = true;
    9898    }
    99    
     99
    100100    // store original value for language with untypical grammars
    101101    // see http://core.trac.wordpress.org/ticket/9396
    102102    $req_format = $dateformatstring;
    103    
     103
    104104    $datefunc = $gmt? 'gmdate' : 'date';
    105105
     
    16841684    if ( !isset( $alloptions['siteurl'] ) )
    16851685        $installed = $wpdb->get_var( "SELECT option_value FROM $wpdb->options WHERE option_name = 'siteurl'" );
    1686     else 
     1686    else
    16871687        $installed = $alloptions['siteurl'];
    16881688    $wpdb->suppress_errors( $suppress );
  • trunk/wp-includes/link-template.php

    r10983 r11013  
    935935
    936936    $date = mysql2date(get_option('date_format'), $post->post_date);
    937    
     937
    938938    $title = str_replace('%title', $post->post_title, $title);
    939939    $title = str_replace('%date', $date, $title);
     
    10511051function get_boundary_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '', $start = true) {
    10521052        $posts = get_boundary_post($in_same_cat,$excluded_categories,$start);
    1053     // Even though we limited get_posts to return only 1 item it still returns an array of objects. 
    1054     $post = $posts[0]; 
     1053    // Even though we limited get_posts to return only 1 item it still returns an array of objects.
     1054    $post = $posts[0];
    10551055
    10561056        if ( empty($post) )
     
    11051105 */
    11061106function index_rel_link() {
    1107     echo get_index_rel_link(); 
     1107    echo get_index_rel_link();
    11081108}
    11091109
  • trunk/wp-includes/post-template.php

    r10954 r11013  
    415415    } elseif ( is_page() ) {
    416416        $classes[] = 'page';
    417        
     417
    418418        $wp_query->post = $wp_query->posts[0];
    419419        setup_postdata($wp_query->post);
  • trunk/wp-includes/query.php

    r10992 r11013  
    20072007            $q['author'] = get_user_by('slug', $q['author_name']);
    20082008            if ( $q['author'] )
    2009                 $q['author'] = $q['author']->ID; 
     2009                $q['author'] = $q['author']->ID;
    20102010            $whichauthor .= " AND ($wpdb->posts.post_author = ".absint($q['author']).')';
    20112011        }
  • trunk/wp-includes/registration.php

    r10997 r11013  
    188188        $user_nicename = $alt_user_nicename;
    189189    }
    190    
     190
    191191    $data = compact( 'user_pass', 'user_email', 'user_url', 'user_nicename', 'display_name', 'user_registered' );
    192192    $data = stripslashes_deep( $data );
  • trunk/wp-includes/script-loader.php

    r11009 r11013  
    169169
    170170    $scripts->add( 'jcrop', "/wp-includes/js/jcrop/jquery.Jcrop$suffix.js", array('jquery'), '0.9.5-1');
    171    
     171
    172172    if ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ) {
    173173        $scripts->add( 'swfupload', '/wp-includes/js/swfupload/swfupload.js', false, '2.2.0-20081031');
  • trunk/wp-includes/taxonomy.php

    r10965 r11013  
    2424    $wp_taxonomies['post_tag'] = (object) array('name' => 'post_tag', 'object_type' => 'post', 'hierarchical' => false, 'update_count_callback' => '_update_post_term_count', 'label' => __('Post Tags'));
    2525    $wp_taxonomies['link_category'] = (object) array('name' => 'link_category', 'object_type' => 'link', 'hierarchical' => false);
    26    
     26
    2727}
    2828add_action( 'init', 'create_initial_taxonomies' );
     
    10791079 * The $args 'default' will only override the terms found, if there is only one
    10801080 * term found. Any other and the found terms are used.
    1081  * 
     1081 *
    10821082 * The $args 'force_default' will force the term supplied as default to be
    10831083 * assigned even if the object was not going to be termless
     
    14141414 *
    14151415 * @param int $object_id The object to relate to.
    1416  * @param array|int|string $term The slug or id of the term, will replace all existing 
     1416 * @param array|int|string $term The slug or id of the term, will replace all existing
    14171417 * related terms in this taxonomy.
    14181418 * @param array|string $taxonomy The context in which to relate the term to the object.
  • trunk/wp-includes/theme.php

    r10835 r11013  
    187187    if ( preg_match( '|Theme URI:(.*)$|mi', $theme_data, $theme_uri ) )
    188188        $theme_uri = clean_url( trim( $theme_uri[1] ) );
    189     else 
     189    else
    190190        $theme_uri = '';
    191        
     191
    192192    if ( preg_match( '|Description:(.*)$|mi', $theme_data, $description ) )
    193193        $description = wptexturize( wp_kses( trim( $description[1] ), $themes_allowed_tags ) );
    194     else 
     194    else
    195195        $description = '';
    196196
     
    375375            @ $stylesheet_dir->close();
    376376        }
    377        
     377
    378378        $template_dir = @ dir("$theme_root/$template");
    379379        if ( $template_dir ) {
     
    394394                }
    395395            }
    396             @ $template_dir->close(); 
     396            @ $template_dir->close();
    397397        }
    398398
     
    11511151    $theme_dir = str_replace('\\','/', get_theme_root()); // sanitize for Win32 installs
    11521152    $theme_dir = preg_replace('|/+|','/', $theme_dir); // remove any duplicate slash
    1153     $file = preg_replace('|^.*/themes/.*?/|','',$file); // get relative path from theme dir 
     1153    $file = preg_replace('|^.*/themes/.*?/|','',$file); // get relative path from theme dir
    11541154    return $file;
    11551155}
  • trunk/wp-includes/widgets.php

    r11009 r11013  
    3636
    3737    /** Echo the widget content.
    38      * 
     38     *
    3939     * Subclasses should over-ride this function to generate their widget code.
    4040     *
     
    4747
    4848    /** Update a particular instance.
    49      * 
     49     *
    5050     * This function should check that $new_instance is set correctly.
    5151     * The newly calculated value of $instance should be returned.
     
    6161
    6262    /** Echo the settings update form
    63      * 
     63     *
    6464     * @param array $instance Current settings
    6565     */
     
    9797
    9898    /** Constructs name attributes for use in form() fields
    99      * 
     99     *
    100100     * This function should be used in form() methods to create name attributes for fields to be saved by update()
    101      * 
     101     *
    102102     * @param string $field_name Field name
    103103     * @return string Name attribute for $field_name
     
    108108
    109109    /** Constructs id attributes for use in form() fields
    110      * 
     110     *
    111111     * This function should be used in form() methods to create id attributes for fields to be saved by update()
    112      * 
     112     *
    113113     * @param string $field_name Field name
    114114     * @return string ID attribute for $field_name
  • trunk/wp-includes/wp-db.php

    r10934 r11013  
    752752    }
    753753
    754        
     754
    755755    /**
    756756     * Update a row in the table
Note: See TracChangeset for help on using the changeset viewer.