Make WordPress Core

Changeset 7445


Ignore:
Timestamp:
03/21/2008 08:56:29 AM (16 years ago)
Author:
westi
Message:

Add sanitization of option values to add_option. Fixes #5209 props johnbillion.

File:
1 edited

Legend:

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

    r7441 r7445  
    345345    wp_protect_special_option( $name );
    346346    $safe_name = $wpdb->escape( $name );
     347    $value = sanitize_option( $name, $value );
    347348
    348349    // Make sure the option doesn't already exist. We can check the 'notoptions' cache before we ask for a db query
     
    372373    $wpdb->query( $wpdb->prepare( "INSERT INTO $wpdb->options (option_name, option_value, autoload) VALUES (%s, %s, %s)", $name, $value, $autoload ) );
    373374
     375    do_action( "add_option_{$name}", $name, $value );
    374376    return;
    375377}
Note: See TracChangeset for help on using the changeset viewer.