In populate_options(), only query the option names we are checking against. No need to load the entire table into memory. props leewillis77. fixes #24620.
git-svn-id: https://develop.svn.wordpress.org/trunk@24614 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b4b9544d35
commit
7d0019d495
@ -494,7 +494,8 @@ function populate_options() {
|
|||||||
// Set autoload to no for these options
|
// Set autoload to no for these options
|
||||||
$fat_options = array( 'moderation_keys', 'recently_edited', 'blacklist_keys', 'uninstall_plugins' );
|
$fat_options = array( 'moderation_keys', 'recently_edited', 'blacklist_keys', 'uninstall_plugins' );
|
||||||
|
|
||||||
$existing_options = $wpdb->get_col("SELECT option_name FROM $wpdb->options");
|
$keys = "'" . implode( "', '", array_keys( $options ) ) . "'";
|
||||||
|
$existing_options = $wpdb->get_col( "SELECT option_name FROM $wpdb->options WHERE option_name in ( $keys )" );
|
||||||
|
|
||||||
$insert = '';
|
$insert = '';
|
||||||
foreach ( $options as $option => $value ) {
|
foreach ( $options as $option => $value ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user