mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
Remove debug. see #8757
git-svn-id: http://svn.automattic.com/wordpress/trunk@10287 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8b349590bb
commit
0e8d3701eb
@ -529,7 +529,6 @@ function update_option( $option_name, $newvalue ) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
error_log(var_export($newvalue, true));
|
|
||||||
$notoptions = wp_cache_get( 'notoptions', 'options' );
|
$notoptions = wp_cache_get( 'notoptions', 'options' );
|
||||||
if ( is_array( $notoptions ) && isset( $notoptions[$option_name] ) ) {
|
if ( is_array( $notoptions ) && isset( $notoptions[$option_name] ) ) {
|
||||||
unset( $notoptions[$option_name] );
|
unset( $notoptions[$option_name] );
|
||||||
@ -538,8 +537,7 @@ error_log(var_export($newvalue, true));
|
|||||||
|
|
||||||
$_newvalue = $newvalue;
|
$_newvalue = $newvalue;
|
||||||
$newvalue = maybe_serialize( $newvalue );
|
$newvalue = maybe_serialize( $newvalue );
|
||||||
error_log(var_export($newvalue, true));
|
|
||||||
|
|
||||||
$alloptions = wp_load_alloptions();
|
$alloptions = wp_load_alloptions();
|
||||||
if ( isset( $alloptions[$option_name] ) ) {
|
if ( isset( $alloptions[$option_name] ) ) {
|
||||||
$alloptions[$option_name] = $newvalue;
|
$alloptions[$option_name] = $newvalue;
|
||||||
@ -547,8 +545,6 @@ error_log(var_export($newvalue, true));
|
|||||||
} else {
|
} else {
|
||||||
wp_cache_set( $option_name, $newvalue, 'options' );
|
wp_cache_set( $option_name, $newvalue, 'options' );
|
||||||
}
|
}
|
||||||
$prep = $wpdb->prepare( "UPDATE $wpdb->options SET option_value = %s WHERE option_name = %s", $newvalue, $option_name );
|
|
||||||
error_log(var_export($prep, true));
|
|
||||||
|
|
||||||
$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->options SET option_value = %s WHERE option_name = %s", $newvalue, $option_name ) );
|
$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->options SET option_value = %s WHERE option_name = %s", $newvalue, $option_name ) );
|
||||||
if ( $wpdb->rows_affected == 1 ) {
|
if ( $wpdb->rows_affected == 1 ) {
|
||||||
@ -591,7 +587,6 @@ function add_option( $name, $value = '', $deprecated = '', $autoload = 'yes' ) {
|
|||||||
|
|
||||||
wp_protect_special_option( $name );
|
wp_protect_special_option( $name );
|
||||||
$safe_name = $wpdb->escape( $name );
|
$safe_name = $wpdb->escape( $name );
|
||||||
error_log('Incoming ' . var_export($value, true));
|
|
||||||
$value = sanitize_option( $name, $value );
|
$value = sanitize_option( $name, $value );
|
||||||
|
|
||||||
// Make sure the option doesn't already exist. We can check the 'notoptions' cache before we ask for a db query
|
// Make sure the option doesn't already exist. We can check the 'notoptions' cache before we ask for a db query
|
||||||
@ -602,7 +597,7 @@ function add_option( $name, $value = '', $deprecated = '', $autoload = 'yes' ) {
|
|||||||
|
|
||||||
$value = maybe_serialize( $value );
|
$value = maybe_serialize( $value );
|
||||||
$autoload = ( 'no' === $autoload ) ? 'no' : 'yes';
|
$autoload = ( 'no' === $autoload ) ? 'no' : 'yes';
|
||||||
error_log('Serialize ' . var_export($value, true));
|
|
||||||
if ( 'yes' == $autoload ) {
|
if ( 'yes' == $autoload ) {
|
||||||
$alloptions = wp_load_alloptions();
|
$alloptions = wp_load_alloptions();
|
||||||
$alloptions[$name] = $value;
|
$alloptions[$name] = $value;
|
||||||
@ -617,8 +612,7 @@ error_log('Serialize ' . var_export($value, true));
|
|||||||
unset( $notoptions[$name] );
|
unset( $notoptions[$name] );
|
||||||
wp_cache_set( 'notoptions', $notoptions, 'options' );
|
wp_cache_set( 'notoptions', $notoptions, 'options' );
|
||||||
}
|
}
|
||||||
$prep = $wpdb->prepare( "INSERT INTO $wpdb->options (option_name, option_value, autoload) VALUES (%s, %s, %s)", $name, $value, $autoload );
|
|
||||||
error_log('Prepare ' . var_export($prep, true));
|
|
||||||
$wpdb->query( $wpdb->prepare( "INSERT INTO $wpdb->options (option_name, option_value, autoload) VALUES (%s, %s, %s)", $name, $value, $autoload ) );
|
$wpdb->query( $wpdb->prepare( "INSERT INTO $wpdb->options (option_name, option_value, autoload) VALUES (%s, %s, %s)", $name, $value, $autoload ) );
|
||||||
|
|
||||||
do_action( "add_option_{$name}", $name, $value );
|
do_action( "add_option_{$name}", $name, $value );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user