Changeset 12698
- Timestamp:
- 01/11/2010 10:08:49 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r12697 r12698 29 29 return false; 30 30 31 if ( 'G' == $dateformatstring ) {31 if ( 'G' == $dateformatstring ) { 32 32 return strtotime( $m . ' +0000' ); 33 33 } … … 35 35 $i = strtotime( $m ); 36 36 37 if ( 'U' == $dateformatstring )37 if ( 'U' == $dateformatstring ) 38 38 return $i; 39 39 … … 201 201 $weekday = date( 'w', $day ); // The day of the week from the timestamp 202 202 $i = 86400; // One day 203 if ( !is_numeric($start_of_week) )203 if ( !is_numeric($start_of_week) ) 204 204 $start_of_week = get_option( 'start_of_week' ); 205 205 … … 330 330 if ( defined( 'WP_INSTALLING' ) && is_multisite() ) { 331 331 $notoptions = array(); 332 333 334 335 336 332 } else { 333 $notoptions = wp_cache_get( 'notoptions', 'options' ); 334 if ( isset( $notoptions[$setting] ) ) 335 return $default; 336 } 337 337 338 338 $alloptions = wp_load_alloptions(); … … 417 417 418 418 if ( !defined( 'WP_INSTALLING' ) || !is_multisite() ) 419 419 $alloptions = wp_cache_get( 'alloptions', 'options' ); 420 420 421 421 if ( !$alloptions ) { … … 427 427 foreach ( (array) $alloptions_db as $o ) 428 428 $alloptions[$o->option_name] = $o->option_value; 429 430 429 if ( !defined( 'WP_INSTALLING' ) || !is_multisite() ) 430 wp_cache_add( 'alloptions', $alloptions, 'options' ); 431 431 } 432 432 return $alloptions; … … 630 630 global $_wp_using_ext_object_cache, $wpdb; 631 631 632 if( is_multisite() ) 633 do_action( 'delete_transient_' . $transient ); 632 do_action( 'delete_transient_' . $transient ); 634 633 635 634 if ( $_wp_using_ext_object_cache ) { … … 700 699 global $_wp_using_ext_object_cache, $wpdb; 701 700 702 if( is_multisite() ) 703 $value = apply_filters( 'pre_set_transient_' . $transient, $value ); 701 $value = apply_filters( 'pre_set_transient_' . $transient, $value ); 704 702 705 703 if ( $_wp_using_ext_object_cache ) { … … 1433 1431 $wp->main( $query_vars ); 1434 1432 1435 if ( !isset($wp_the_query) )1433 if ( !isset($wp_the_query) ) 1436 1434 $wp_the_query = $wp_query; 1437 1435 } … … 2113 2111 2114 2112 // edge case: if file is named '.ext', treat as an empty name 2115 if ( $name === $ext )2113 if ( $name === $ext ) 2116 2114 $name = ''; 2117 2115 … … 2187 2185 return $upload; 2188 2186 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 } 2197 2192 2198 2193 $filename = wp_unique_filename( $upload['path'], $name ); … … 2530 2525 2531 2526 if ( !function_exists( 'did_action' ) || !did_action( 'admin_head' ) ) : 2532 if ( !headers_sent() ){2527 if ( !headers_sent() ){ 2533 2528 status_header( $r['response'] ); 2534 2529 nocache_headers(); … … 3762 3757 fclose( $fp ); 3763 3758 3764 if ( $context != '' ) {3759 if ( $context != '' ) { 3765 3760 $extra_headers = apply_filters( "extra_$context".'_headers', array() ); 3766 3761
Note: See TracChangeset
for help on using the changeset viewer.