Ticket #5209: 5209.2.diff
| File 5209.2.diff, 813 bytes (added by johnbillion, 5 years ago) |
|---|
-
wp-includes/functions.php
337 337 wp_protect_special_option( $name ); 338 338 $safe_name = $wpdb->escape( $name ); 339 339 340 $value = sanitize_option( $name, $value ); 341 340 342 // Make sure the option doesn't already exist. We can check the 'notoptions' cache before we ask for a db query 341 343 $notoptions = wp_cache_get( 'notoptions', 'options' ); 342 344 if ( !is_array( $notoptions ) || !isset( $notoptions[$name] ) ) … … 363 365 364 366 $wpdb->query( $wpdb->prepare( "INSERT INTO $wpdb->options (option_name, option_value, autoload) VALUES (%s, %s, %s)", $name, $value, $autoload ) ); 365 367 368 do_action( "add_option_$name", $value ); 366 369 return; 367 370 } 368 371
