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

git-svn-id: https://develop.svn.wordpress.org/trunk@12698 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-01-11 22:08:49 +00:00
parent 8b4fbdb503
commit a6798b1fb6

View File

@ -629,7 +629,6 @@ function delete_option( $name ) {
function delete_transient($transient) { function delete_transient($transient) {
global $_wp_using_ext_object_cache, $wpdb; global $_wp_using_ext_object_cache, $wpdb;
if( is_multisite() )
do_action( 'delete_transient_' . $transient ); do_action( 'delete_transient_' . $transient );
if ( $_wp_using_ext_object_cache ) { if ( $_wp_using_ext_object_cache ) {
@ -699,7 +698,6 @@ function get_transient($transient) {
function set_transient($transient, $value, $expiration = 0) { function set_transient($transient, $value, $expiration = 0) {
global $_wp_using_ext_object_cache, $wpdb; global $_wp_using_ext_object_cache, $wpdb;
if( is_multisite() )
$value = apply_filters( 'pre_set_transient_' . $transient, $value ); $value = apply_filters( 'pre_set_transient_' . $transient, $value );
if ( $_wp_using_ext_object_cache ) { if ( $_wp_using_ext_object_cache ) {
@ -2186,14 +2184,11 @@ function wp_upload_bits( $name, $deprecated, $bits, $time = null ) {
if ( $upload['error'] !== false ) if ( $upload['error'] !== false )
return $upload; return $upload;
if( is_multisite() ) {
/* WPMU check file before writing it */
$upload_bits_error = apply_filters( 'wp_upload_bits', array( 'name' => $name, 'bits' => $bits, 'time' => $time ) ); $upload_bits_error = apply_filters( 'wp_upload_bits', array( 'name' => $name, 'bits' => $bits, 'time' => $time ) );
if( is_array( $upload_bits_error ) == false ) { if ( !is_array( $upload_bits_error ) ) {
$upload[ 'error' ] = $upload_bits_error; $upload[ 'error' ] = $upload_bits_error;
return $upload; return $upload;
} }
}
$filename = wp_unique_filename( $upload['path'], $name ); $filename = wp_unique_filename( $upload['path'], $name );