Make WordPress Core


Ignore:
Timestamp:
01/11/2010 10:08:49 PM (17 years ago)
Author:
ryan
Message:

Mainstream things that don't need to be multisite only. Formatting cleanups. see #11644

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r12697 r12698  
    2929                return false;
    3030
    31         if( 'G' == $dateformatstring ) {
     31        if ( 'G' == $dateformatstring ) {
    3232                return strtotime( $m . ' +0000' );
    3333        }
     
    3535        $i = strtotime( $m );
    3636
    37         if( 'U' == $dateformatstring )
     37        if ( 'U' == $dateformatstring )
    3838                return $i;
    3939
     
    201201        $weekday = date( 'w', $day ); // The day of the week from the timestamp
    202202        $i = 86400; // One day
    203         if( !is_numeric($start_of_week) )
     203        if ( !is_numeric($start_of_week) )
    204204                $start_of_week = get_option( 'start_of_week' );
    205205
     
    330330        if ( defined( 'WP_INSTALLING' ) && is_multisite() ) {
    331331                $notoptions = array();
    332         } else {
    333                 $notoptions = wp_cache_get( 'notoptions', 'options' );
    334                 if ( isset( $notoptions[$setting] ) )
    335                         return $default;
    336         }
     332        } else {
     333                $notoptions = wp_cache_get( 'notoptions', 'options' );
     334                if ( isset( $notoptions[$setting] ) )
     335                        return $default;
     336        }
    337337
    338338        $alloptions = wp_load_alloptions();
     
    417417
    418418        if ( !defined( 'WP_INSTALLING' ) || !is_multisite() )
    419                 $alloptions = wp_cache_get( 'alloptions', 'options' );
     419                $alloptions = wp_cache_get( 'alloptions', 'options' );
    420420
    421421        if ( !$alloptions ) {
     
    427427                foreach ( (array) $alloptions_db as $o )
    428428                        $alloptions[$o->option_name] = $o->option_value;
    429                 if ( !defined( 'WP_INSTALLING' ) || !is_multisite() )
    430                         wp_cache_add( 'alloptions', $alloptions, 'options' );
     429                        if ( !defined( 'WP_INSTALLING' ) || !is_multisite() )
     430                                wp_cache_add( 'alloptions', $alloptions, 'options' );
    431431        }
    432432        return $alloptions;
     
    630630        global $_wp_using_ext_object_cache, $wpdb;
    631631
    632         if( is_multisite() )
    633                 do_action( 'delete_transient_' . $transient );
     632    do_action( 'delete_transient_' . $transient );
    634633
    635634        if ( $_wp_using_ext_object_cache ) {
     
    700699        global $_wp_using_ext_object_cache, $wpdb;
    701700
    702         if( is_multisite() )
    703                 $value = apply_filters( 'pre_set_transient_' . $transient, $value );
     701    $value = apply_filters( 'pre_set_transient_' . $transient, $value );
    704702
    705703        if ( $_wp_using_ext_object_cache ) {
     
    14331431        $wp->main( $query_vars );
    14341432
    1435         if( !isset($wp_the_query) )
     1433        if ( !isset($wp_the_query) )
    14361434                $wp_the_query = $wp_query;
    14371435}
     
    21132111
    21142112        // edge case: if file is named '.ext', treat as an empty name
    2115         if( $name === $ext )
     2113        if ( $name === $ext )
    21162114                $name = '';
    21172115
     
    21872185                return $upload;
    21882186
    2189         if( is_multisite() ) {
    2190                 /* WPMU check file before writing it */
    2191                 $upload_bits_error = apply_filters( 'wp_upload_bits', array( 'name' => $name, 'bits' => $bits, 'time' => $time ) );
    2192                 if( is_array( $upload_bits_error ) == false ) {
    2193                         $upload[ 'error' ] = $upload_bits_error;
    2194                         return $upload;
    2195                 }
    2196         }
     2187        $upload_bits_error = apply_filters( 'wp_upload_bits', array( 'name' => $name, 'bits' => $bits, 'time' => $time ) );
     2188        if ( !is_array( $upload_bits_error ) ) {
     2189                $upload[ 'error' ] = $upload_bits_error;
     2190                return $upload;
     2191        }
    21972192
    21982193        $filename = wp_unique_filename( $upload['path'], $name );
     
    25302525
    25312526        if ( !function_exists( 'did_action' ) || !did_action( 'admin_head' ) ) :
    2532         if( !headers_sent() ){
     2527        if ( !headers_sent() ){
    25332528                status_header( $r['response'] );
    25342529                nocache_headers();
     
    37623757        fclose( $fp );
    37633758
    3764         if( $context != '' ) {
     3759        if ( $context != '' ) {
    37653760                $extra_headers = apply_filters( "extra_$context".'_headers', array() );
    37663761
Note: See TracChangeset for help on using the changeset viewer.