Changeset 2856

Show
Ignore:
Timestamp:
09/08/05 21:08:48 (3 years ago)
Author:
ryan
Message:

Check the option cache before querying. Props westi. fixes #1499

Files:

Legend:

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

    r2833 r2856  
    369369// thx Alex Stapleton, http://alex.vort-x.net/blog/ 
    370370function add_option($name, $value = '', $description = '', $autoload = 'yes') { 
    371     global $wpdb; 
     371    global $wpdb, $cache_settings; 
     372 
     373    // Make sure the option doesn't already exist 
     374    if ( isset($cache_settings->$name) ) 
     375        return; 
     376 
    372377    $original = $value; 
    373378    if ( is_array($value) || is_object($value) )