Make WordPress Core


Ignore:
Timestamp:
02/12/2006 07:53:23 AM (20 years ago)
Author:
ryan
Message:

Death to trailing tabs. Props Mark J. fixes #2405

File:
1 edited

Legend:

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

    r3514 r3517  
    2323    }
    2424    $i = mktime(substr($m,11,2),substr($m,14,2),substr($m,17,2),substr($m,5,2),substr($m,8,2),substr($m,0,4));
    25    
     25
    2626    if ( -1 == $i || false == $i )
    2727        $i = 0;
     
    305305function get_user_option( $option, $user = 0 ) {
    306306    global $wpdb, $current_user;
    307    
     307
    308308    if ( empty($user) )
    309309        $user = $current_user;
     
    658658        $path = '/' . $curpage->post_name . $path;
    659659    }
    660    
     660
    661661    $page->fullpath = $path;
    662662
     
    727727        }
    728728    }
    729    
     729
    730730    if (!isset($_page->fullpath)) {
    731731        $_page = set_page_path($_page);
     
    752752        $path = '/' . $curcat->category_nicename . $path;
    753753    }
    754    
     754
    755755    $cat->fullpath = $path;
    756756
     
    778778    if ( !isset($_category->fullpath) ) {
    779779        $_category = set_category_path($_category);
    780         wp_cache_replace($_category->cat_ID, $_category, 'category');   
     780        wp_cache_replace($_category->cat_ID, $_category, 'category');
    781781    }
    782782
     
    831831function get_all_category_ids() {
    832832    global $wpdb;
    833    
     833
    834834    if ( ! $cat_ids = wp_cache_get('all_category_ids', 'category') ) {
    835835        $cat_ids = $wpdb->get_col("SELECT cat_ID FROM $wpdb->categories");
    836836        wp_cache_add('all_category_ids', $cat_ids, 'category');
    837837    }
    838    
     838
    839839    return $cat_ids;
    840840}
     
    842842function get_all_page_ids() {
    843843    global $wpdb;
    844    
     844
    845845    if ( ! $page_ids = wp_cache_get('all_page_ids', 'pages') ) {
    846846        $page_ids = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE post_type = 'page'");
    847847        wp_cache_add('all_page_ids', $page_ids, 'pages');
    848848    }
    849    
     849
    850850    return $page_ids;
    851851}
     
    14171417    if ( empty($dogs) )
    14181418        return;
    1419        
     1419
    14201420    foreach ($dogs as $catt)
    14211421        $category_cache[$catt->post_id][$catt->category_id] = &get_category($catt->category_id);
     
    15241524function is_preview() {
    15251525    global $wp_query;
    1526    
     1526
    15271527    return $wp_query->is_preview;
    15281528}
     
    21762176function wp($query_vars = '') {
    21772177    global $wp;
    2178    
     2178
    21792179    $wp->main($query_vars);
    21802180}
     
    22462246        $meta_value = serialize($meta_value);
    22472247    $meta_value = trim( $meta_value );
    2248    
     2248
    22492249    if (empty($meta_value)) {
    22502250        delete_usermeta($user_id, $meta_key);
     
    22592259        $wpdb->query("UPDATE $wpdb->usermeta SET meta_value = '$meta_value' WHERE user_id = '$user_id' AND meta_key = '$meta_key'");
    22602260    } else {
    2261         return false;   
    2262     }
    2263    
     2261        return false;
     2262    }
     2263
    22642264    $user = get_userdata($user_id);
    22652265    wp_cache_delete($user_id, 'users');
    22662266    wp_cache_delete($user->user_login, 'userlogins');
    2267    
     2267
    22682268    return true;
    22692269}
     
    22832283    else
    22842284        $wpdb->query("DELETE FROM $wpdb->usermeta WHERE user_id = '$user_id' AND meta_key = '$meta_key'");
    2285        
     2285
    22862286    $user = get_userdata($user_id);
    22872287    wp_cache_delete($user_id, 'users');
    22882288    wp_cache_delete($user->user_login, 'userlogins');
    2289    
     2289
    22902290    return true;
    22912291}
Note: See TracChangeset for help on using the changeset viewer.