diff --git src/wp-admin/install.php src/wp-admin/install.php
index 088b88ef14..d5669871ab 100644
|
|
switch ( $step ) { |
386 | 386 | $error = true; |
387 | 387 | } |
388 | 388 | |
389 | | if ( $error === false ) { |
| 389 | if ( false === $error ) { |
390 | 390 | $wpdb->show_errors(); |
391 | 391 | $result = wp_install( $weblog_title, $user_name, $admin_email, $public, '', wp_slash( $admin_password ), $loaded_language ); |
392 | 392 | ?> |
diff --git src/wp-admin/media-upload.php src/wp-admin/media-upload.php
index f009bc162a..7035f28b88 100644
|
|
$ID = isset( $ID ) ? (int) $ID : 0; |
33 | 33 | $post_id = isset( $post_id ) ? (int) $post_id : 0; |
34 | 34 | |
35 | 35 | // Require an ID for the edit screen. |
36 | | if ( isset( $action ) && $action == 'edit' && ! $ID ) { |
| 36 | if ( isset( $action ) && 'edit' == $action && ! $ID ) { |
37 | 37 | wp_die( |
38 | 38 | '<h1>' . __( 'Something went wrong.' ) . '</h1>' . |
39 | 39 | '<p>' . __( 'Invalid item ID.' ) . '</p>', |
… |
… |
if ( isset( $_GET['tab'] ) ) { |
81 | 81 | $body_id = 'media-upload'; |
82 | 82 | |
83 | 83 | // Let the action code decide how to handle the request. |
84 | | if ( $tab == 'type' || $tab == 'type_url' || ! array_key_exists( $tab, media_upload_tabs() ) ) { |
| 84 | if ( 'type' == $tab || 'type_url' == $tab || ! array_key_exists( $tab, media_upload_tabs() ) ) { |
85 | 85 | /** |
86 | 86 | * Fires inside specific upload-type views in the legacy (pre-3.5.0) |
87 | 87 | * media popup based on the current tab. |
diff --git src/wp-admin/media.php src/wp-admin/media.php
index 5f0752d1ac..83b35e9448 100644
|
|
switch ( $action ) { |
69 | 69 | if ( 'attachment' !== $att->post_type ) { |
70 | 70 | wp_die( __( 'You attempted to edit an item that isn’t an attachment. Please go back and try again.' ) ); |
71 | 71 | } |
72 | | if ( $att->post_status == 'trash' ) { |
| 72 | if ( 'trash' == $att->post_status ) { |
73 | 73 | wp_die( __( 'You can’t edit this attachment because it is in the Trash. Please move it out of the Trash and try again.' ) ); |
74 | 74 | } |
75 | 75 | |
diff --git src/wp-admin/ms-delete-site.php src/wp-admin/ms-delete-site.php
index 3332f50e29..28868384c2 100644
|
|
if ( ! current_user_can( 'delete_site' ) ) { |
17 | 17 | wp_die( __( 'Sorry, you are not allowed to delete this site.' ) ); |
18 | 18 | } |
19 | 19 | |
20 | | if ( isset( $_GET['h'] ) && $_GET['h'] != '' && get_option( 'delete_blog_hash' ) != false ) { |
| 20 | if ( isset( $_GET['h'] ) && '' != $_GET['h'] && false != get_option( 'delete_blog_hash' ) ) { |
21 | 21 | if ( hash_equals( get_option( 'delete_blog_hash' ), $_GET['h'] ) ) { |
22 | 22 | wpmu_delete_blog( get_current_blog_id() ); |
23 | 23 | wp_die( |
… |
… |
require_once ABSPATH . 'wp-admin/admin-header.php'; |
42 | 42 | echo '<div class="wrap">'; |
43 | 43 | echo '<h1>' . esc_html( $title ) . '</h1>'; |
44 | 44 | |
45 | | if ( isset( $_POST['action'] ) && $_POST['action'] == 'deleteblog' && isset( $_POST['confirmdelete'] ) && $_POST['confirmdelete'] == '1' ) { |
| 45 | if ( isset( $_POST['action'] ) && 'deleteblog' == $_POST['action'] && isset( $_POST['confirmdelete'] ) && '1' == $_POST['confirmdelete'] ) { |
46 | 46 | check_admin_referer( 'delete-blog' ); |
47 | 47 | |
48 | 48 | $hash = wp_generate_password( 20, false ); |
diff --git src/wp-admin/options.php src/wp-admin/options.php
index 0672e944d4..5b3efc5fc2 100644
|
|
$options = $wpdb->get_results( "SELECT * FROM $wpdb->options ORDER BY option_nam |
335 | 335 | |
336 | 336 | foreach ( (array) $options as $option ) : |
337 | 337 | $disabled = false; |
338 | | if ( $option->option_name == '' ) { |
| 338 | if ( '' == $option->option_name ) { |
339 | 339 | continue; |
340 | 340 | } |
341 | 341 | if ( is_serialized( $option->option_value ) ) { |
diff --git src/wp-admin/post.php src/wp-admin/post.php
index d32e52b9b9..9c0da36be9 100644
|
|
if ( isset( $_POST['deletepost'] ) ) { |
55 | 55 | |
56 | 56 | $sendback = wp_get_referer(); |
57 | 57 | if ( ! $sendback || |
58 | | strpos( $sendback, 'post.php' ) !== false || |
59 | | strpos( $sendback, 'post-new.php' ) !== false ) { |
| 58 | false !== strpos( $sendback, 'post.php' ) || |
| 59 | false !== strpos( $sendback, 'post-new.php' ) ) { |
60 | 60 | if ( 'attachment' == $post_type ) { |
61 | 61 | $sendback = admin_url( 'upload.php' ); |
62 | 62 | } else { |
… |
… |
switch ( $action ) { |
160 | 160 | $submenu_file = 'upload.php'; |
161 | 161 | $post_new_file = 'media-new.php'; |
162 | 162 | } else { |
163 | | if ( isset( $post_type_object ) && $post_type_object->show_in_menu && $post_type_object->show_in_menu !== true ) { |
| 163 | if ( isset( $post_type_object ) && $post_type_object->show_in_menu && true !== $post_type_object->show_in_menu ) { |
164 | 164 | $parent_file = $post_type_object->show_in_menu; |
165 | 165 | } else { |
166 | 166 | $parent_file = "edit.php?post_type=$post_type"; |
… |
… |
switch ( $action ) { |
179 | 179 | * @param bool $replace Whether to replace the editor. Default false. |
180 | 180 | * @param WP_Post $post Post object. |
181 | 181 | */ |
182 | | if ( apply_filters( 'replace_editor', false, $post ) === true ) { |
| 182 | if ( true === apply_filters( 'replace_editor', false, $post ) ) { |
183 | 183 | break; |
184 | 184 | } |
185 | 185 | |
diff --git src/wp-admin/update-core.php src/wp-admin/update-core.php
index 394aebadbf..d8f47bab20 100644
|
|
function list_core_update( $update ) { |
163 | 163 | echo '</p>'; |
164 | 164 | if ( 'en_US' != $update->locale && ( ! isset( $wp_local_package ) || $wp_local_package != $update->locale ) ) { |
165 | 165 | echo '<p class="hint">' . __( 'This localized version contains both the translation and various other localization fixes.' ) . '</p>'; |
166 | | } elseif ( 'en_US' == $update->locale && get_locale() != 'en_US' && ( ! $update->packages->partial && $wp_version == $update->partial_version ) ) { |
| 166 | } elseif ( 'en_US' == $update->locale && 'en_US' != get_locale() && ( ! $update->packages->partial && $wp_version == $update->partial_version ) ) { |
167 | 167 | // Partial builds don't need language-specific warnings. |
168 | 168 | echo '<p class="hint">' . sprintf( |
169 | 169 | /* translators: %s: WordPress version. */ |
170 | 170 | __( 'You are about to install WordPress %s <strong>in English (US).</strong> There is a chance this update will break your translation. You may prefer to wait for the localized version to be released.' ), |
171 | | $update->response != 'development' ? $update->current : '' |
| 171 | 'development' != $update->response ? $update->current : '' |
172 | 172 | ) . '</p>'; |
173 | 173 | } |
174 | 174 | echo '</form>'; |
… |
… |
function core_upgrade_preamble() { |
256 | 256 | echo '</h2>'; |
257 | 257 | } |
258 | 258 | |
259 | | if ( isset( $updates[0] ) && $updates[0]->response == 'development' ) { |
| 259 | if ( isset( $updates[0] ) && 'development' == $updates[0]->response ) { |
260 | 260 | require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; |
261 | 261 | $upgrader = new WP_Automatic_Updater; |
262 | 262 | if ( wp_http_supports( 'ssl' ) && $upgrader->should_update( 'core', $updates[0], ABSPATH ) ) { |
… |
… |
function core_upgrade_preamble() { |
274 | 274 | } |
275 | 275 | echo '</ul>'; |
276 | 276 | // Don't show the maintenance mode notice when we are only showing a single re-install option. |
277 | | if ( $updates && ( count( $updates ) > 1 || $updates[0]->response != 'latest' ) ) { |
| 277 | if ( $updates && ( count( $updates ) > 1 || 'latest' != $updates[0]->response ) ) { |
278 | 278 | echo '<p>' . __( 'While your site is being updated, it will be in maintenance mode. As soon as your updates are complete, your site will return to normal.' ) . '</p>'; |
279 | 279 | } elseif ( ! $updates ) { |
280 | 280 | list( $normalized_version ) = explode( '-', $wp_version ); |
… |
… |
$action = isset( $_GET['action'] ) ? $_GET['action'] : 'upgrade-core'; |
692 | 692 | $upgrade_error = false; |
693 | 693 | if ( ( 'do-theme-upgrade' == $action || ( 'do-plugin-upgrade' == $action && ! isset( $_GET['plugins'] ) ) ) |
694 | 694 | && ! isset( $_POST['checked'] ) ) { |
695 | | $upgrade_error = $action == 'do-theme-upgrade' ? 'themes' : 'plugins'; |
| 695 | $upgrade_error = 'do-theme-upgrade' == $action ? 'themes' : 'plugins'; |
696 | 696 | $action = 'upgrade-core'; |
697 | 697 | } |
698 | 698 | |
… |
… |
if ( 'upgrade-core' == $action ) { |
743 | 743 | <?php |
744 | 744 | if ( $upgrade_error ) { |
745 | 745 | echo '<div class="error"><p>'; |
746 | | if ( $upgrade_error == 'themes' ) { |
| 746 | if ( 'themes' == $upgrade_error ) { |
747 | 747 | _e( 'Please select one or more themes to update.' ); |
748 | 748 | } else { |
749 | 749 | _e( 'Please select one or more plugins to update.' ); |
diff --git src/wp-admin/user-new.php src/wp-admin/user-new.php
index dff49fecf0..be4b5083bc 100644
|
|
if ( isset( $_REQUEST['action'] ) && 'adduser' == $_REQUEST['action'] ) { |
63 | 63 | $redirect = 'user-new.php'; |
64 | 64 | $username = $user_details->user_login; |
65 | 65 | $user_id = $user_details->ID; |
66 | | if ( $username != null && array_key_exists( $blog_id, get_blogs_of_user( $user_id ) ) ) { |
| 66 | if ( null != $username && array_key_exists( $blog_id, get_blogs_of_user( $user_id ) ) ) { |
67 | 67 | $redirect = add_query_arg( array( 'update' => 'addexisting' ), 'user-new.php' ); |
68 | 68 | } else { |
69 | 69 | if ( isset( $_POST['noconfirmation'] ) && current_user_can( 'manage_network_users' ) ) { |