WordPress.org

Make WordPress Core

Changeset 2856


Ignore:
Timestamp:
09/08/2005 09:08:48 PM (15 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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) )
Note: See TracChangeset for help on using the changeset viewer.