Ticket #12203: would_be_nice_to_have_a_wildcard.diff
File would_be_nice_to_have_a_wildcard.diff, 913 bytes (added by , 15 years ago) |
---|
-
wp-includes/functions.php
606 606 607 607 // Get the ID, if no ID then return 608 608 // expected_slashed ($name) 609 $option = $wpdb->get_row( "SELECT autoload FROM $wpdb->options WHERE option_name = '$name'" ); 609 $name = str_replace( '*', '%', $name ); 610 611 $option = $wpdb->get_row( "SELECT autoload FROM $wpdb->options WHERE option_name LIKE '$name'" ); 610 612 if ( is_null($option) ) 611 613 return false; 612 614 do_action( 'delete_option', $name ); 613 615 // expected_slashed ($name) 614 $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name ='$name'" );616 $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '$name'" ); 615 617 if ( ! defined( 'WP_INSTALLING' ) ) { 616 618 if ( 'yes' == $option->autoload ) { 617 619 $alloptions = wp_load_alloptions();