WordPress.org

Make WordPress Core

Changeset 3485


Ignore:
Timestamp:
01/25/2006 06:46:21 AM (16 years ago)
Author:
ryan
Message:

update_option_* actions. fixes #2332

File:
1 edited

Legend:

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

    r3474 r3485  
    373373    $option_name = $wpdb->escape($option_name);
    374374    $wpdb->query("UPDATE $wpdb->options SET option_value = '$newvalue' WHERE option_name = '$option_name'");
    375     return true;
     375    if ( $wpdb->rows_affected == 1 ) {
     376        do_action('update_option_{$option_name}', $oldvalue, $newvalue);
     377        return true;
     378    }
     379    return false;
    376380}
    377381
Note: See TracChangeset for help on using the changeset viewer.