Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-includes.
See #47632. Built from https://develop.svn.wordpress.org/trunk@45590 git-svn-id: http://core.svn.wordpress.org/trunk@45401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -198,8 +198,9 @@ function wp_load_alloptions() {
|
||||
}
|
||||
|
||||
if ( ! $alloptions ) {
|
||||
$suppress = $wpdb->suppress_errors();
|
||||
if ( ! $alloptions_db = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options WHERE autoload = 'yes'" ) ) {
|
||||
$suppress = $wpdb->suppress_errors();
|
||||
$alloptions_db = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options WHERE autoload = 'yes'" );
|
||||
if ( ! $alloptions_db ) {
|
||||
$alloptions_db = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options" );
|
||||
}
|
||||
$wpdb->suppress_errors( $suppress );
|
||||
@@ -913,7 +914,8 @@ function wp_user_settings() {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! $user_id = get_current_user_id() ) {
|
||||
$user_id = get_current_user_id();
|
||||
if ( ! $user_id ) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1035,7 +1037,8 @@ function delete_user_setting( $names ) {
|
||||
function get_all_user_settings() {
|
||||
global $_updated_user_settings;
|
||||
|
||||
if ( ! $user_id = get_current_user_id() ) {
|
||||
$user_id = get_current_user_id();
|
||||
if ( ! $user_id ) {
|
||||
return array();
|
||||
}
|
||||
|
||||
@@ -1078,7 +1081,8 @@ function get_all_user_settings() {
|
||||
function wp_set_all_user_settings( $user_settings ) {
|
||||
global $_updated_user_settings;
|
||||
|
||||
if ( ! $user_id = get_current_user_id() ) {
|
||||
$user_id = get_current_user_id();
|
||||
if ( ! $user_id ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1111,7 +1115,8 @@ function wp_set_all_user_settings( $user_settings ) {
|
||||
* @since 2.7.0
|
||||
*/
|
||||
function delete_all_user_settings() {
|
||||
if ( ! $user_id = get_current_user_id() ) {
|
||||
$user_id = get_current_user_id();
|
||||
if ( ! $user_id ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user