' . __( 'Note:' ) . ' ';
/* translators: %s: mod_rewrite */
Index: /trunk/src/wp-admin/includes/plugin-install.php
===================================================================
--- /trunk/src/wp-admin/includes/plugin-install.php (revision 45582)
+++ /trunk/src/wp-admin/includes/plugin-install.php (revision 45583)
@@ -161,5 +161,6 @@
$http_url = $url;
- if ( $ssl = wp_http_supports( array( 'ssl' ) ) ) {
+ $ssl = wp_http_supports( array( 'ssl' ) );
+ if ( $ssl ) {
$url = set_url_scheme( $url, 'https' );
}
@@ -239,6 +240,7 @@
*/
function install_popular_tags( $args = array() ) {
- $key = md5( serialize( $args ) );
- if ( false !== ( $tags = get_site_transient( 'poptags_' . $key ) ) ) {
+ $key = md5( serialize( $args ) );
+ $tags = get_site_transient( 'poptags_' . $key );
+ if ( false !== $tags ) {
return $tags;
}
Index: /trunk/src/wp-admin/includes/plugin.php
===================================================================
--- /trunk/src/wp-admin/includes/plugin.php (revision 45582)
+++ /trunk/src/wp-admin/includes/plugin.php (revision 45583)
@@ -153,5 +153,6 @@
// Translate fields
if ( $translate ) {
- if ( $textdomain = $plugin_data['TextDomain'] ) {
+ $textdomain = $plugin_data['TextDomain'];
+ if ( $textdomain ) {
if ( ! is_textdomain_loaded( $textdomain ) ) {
if ( $plugin_data['DomainPath'] ) {
@@ -365,5 +366,6 @@
return $wp_plugins;
}
- if ( $plugins_dir = @ opendir( WPMU_PLUGIN_DIR ) ) {
+ $plugins_dir = @opendir( WPMU_PLUGIN_DIR );
+ if ( $plugins_dir ) {
while ( ( $file = readdir( $plugins_dir ) ) !== false ) {
if ( substr( $file, -4 ) == '.php' ) {
@@ -432,5 +434,6 @@
// These exist in the wp-content directory
- if ( $plugins_dir = @ opendir( WP_CONTENT_DIR ) ) {
+ $plugins_dir = @opendir( WP_CONTENT_DIR );
+ if ( $plugins_dir ) {
while ( ( $file = readdir( $plugins_dir ) ) !== false ) {
if ( isset( $_dropins[ $file ] ) ) {
@@ -734,6 +737,7 @@
$network_current = get_site_option( 'active_sitewide_plugins', array() );
}
- $current = get_option( 'active_plugins', array() );
- $do_blog = $do_network = false;
+ $current = get_option( 'active_plugins', array() );
+ $do_blog = false;
+ $do_network = false;
foreach ( (array) $plugins as $plugin ) {
@@ -993,5 +997,6 @@
// Remove deleted plugins from the plugin updates list.
- if ( $current = get_site_transient( 'update_plugins' ) ) {
+ $current = get_site_transient( 'update_plugins' );
+ if ( $current ) {
// Don't remove the plugins that weren't deleted.
$deleted = array_diff( $plugins, $errors );
@@ -1820,5 +1825,6 @@
$hook = get_plugin_page_hook( $plugin_page, $pagenow );
- $parent = $parent1 = get_admin_page_parent();
+ $parent = get_admin_page_parent();
+ $parent1 = $parent;
if ( empty( $parent ) ) {
Index: /trunk/src/wp-admin/includes/post.php
===================================================================
--- /trunk/src/wp-admin/includes/post.php (revision 45582)
+++ /trunk/src/wp-admin/includes/post.php (revision 45583)
@@ -340,5 +340,6 @@
if ( isset( $post_data['meta'] ) && $post_data['meta'] ) {
foreach ( $post_data['meta'] as $key => $value ) {
- if ( ! $meta = get_post_meta_by_id( $key ) ) {
+ $meta = get_post_meta_by_id( $key );
+ if ( ! $meta ) {
continue;
}
@@ -358,5 +359,6 @@
if ( isset( $post_data['deletemeta'] ) && $post_data['deletemeta'] ) {
foreach ( $post_data['deletemeta'] as $key => $value ) {
- if ( ! $meta = get_post_meta_by_id( $key ) ) {
+ $meta = get_post_meta_by_id( $key );
+ if ( ! $meta ) {
continue;
}
@@ -532,5 +534,6 @@
}
- if ( isset( $post_data['post_parent'] ) && ( $parent = (int) $post_data['post_parent'] ) ) {
+ if ( isset( $post_data['post_parent'] ) && (int) $post_data['post_parent'] ) {
+ $parent = (int) $post_data['post_parent'];
$pages = $wpdb->get_results( "SELECT ID, post_parent FROM $wpdb->posts WHERE post_type = 'page'" );
$children = array();
@@ -548,5 +551,7 @@
}
- $updated = $skipped = $locked = array();
+ $updated = array();
+ $skipped = array();
+ $locked = array();
$shared_post_data = $post_data;
@@ -1282,5 +1287,6 @@
if ( isset( $_GET['edit'] ) && $_GET['edit'] == $box_id ) {
$classes = array( '' );
- } elseif ( $closed = get_user_option( 'closedpostboxes_' . $screen_id ) ) {
+ } elseif ( get_user_option( 'closedpostboxes_' . $screen_id ) ) {
+ $closed = get_user_option( 'closedpostboxes_' . $screen_id );
if ( ! is_array( $closed ) ) {
$classes = array( '' );
@@ -1557,9 +1563,11 @@
*/
function wp_check_post_lock( $post_id ) {
- if ( ! $post = get_post( $post_id ) ) {
+ $post = get_post( $post_id );
+ if ( ! $post ) {
return false;
}
- if ( ! $lock = get_post_meta( $post->ID, '_edit_lock', true ) ) {
+ $lock = get_post_meta( $post->ID, '_edit_lock', true );
+ if ( ! $lock ) {
return false;
}
@@ -1593,9 +1601,11 @@
*/
function wp_set_post_lock( $post_id ) {
- if ( ! $post = get_post( $post_id ) ) {
+ $post = get_post( $post_id );
+ if ( ! $post ) {
return false;
}
- if ( 0 == ( $user_id = get_current_user_id() ) ) {
+ $user_id = get_current_user_id();
+ if ( 0 == $user_id ) {
return false;
}
@@ -1616,10 +1626,12 @@
*/
function _admin_notice_post_locked() {
- if ( ! $post = get_post() ) {
+ $post = get_post();
+ if ( ! $post ) {
return;
}
- $user = null;
- if ( $user_id = wp_check_post_lock( $post->ID ) ) {
+ $user = null;
+ $user_id = wp_check_post_lock( $post->ID );
+ if ( $user_id ) {
$user = get_userdata( $user_id );
}
@@ -1647,6 +1659,6 @@
}
- if ( $locked && ( $sendback = wp_get_referer() ) &&
- false === strpos( $sendback, 'post.php' ) && false === strpos( $sendback, 'post-new.php' ) ) {
+ $sendback = wp_get_referer();
+ if ( $locked && $sendback && false === strpos( $sendback, 'post.php' ) && false === strpos( $sendback, 'post-new.php' ) ) {
$sendback_text = __( 'Go back' );
@@ -1794,5 +1806,6 @@
// Store one autosave per author. If there is already an autosave, overwrite it.
- if ( $old_autosave = wp_get_post_autosave( $post_id, $post_author ) ) {
+ $old_autosave = wp_get_post_autosave( $post_id, $post_author );
+ if ( $old_autosave ) {
$new_autosave = _wp_post_revision_data( $post_data, true );
$new_autosave['ID'] = $old_autosave->ID;
@@ -1845,5 +1858,6 @@
$_POST['ID'] = $post_ID;
- if ( ! $post = get_post( $post_ID ) ) {
+ $post = get_post( $post_ID );
+ if ( ! $post ) {
wp_die( __( 'Sorry, you are not allowed to edit this post.' ) );
}
@@ -1906,6 +1920,7 @@
}
- $post_id = (int) $post_data['post_id'];
- $post_data['ID'] = $post_data['post_ID'] = $post_id;
+ $post_id = (int) $post_data['post_id'];
+ $post_data['ID'] = $post_id;
+ $post_data['post_ID'] = $post_id;
if ( false === wp_verify_nonce( $post_data['_wpnonce'], 'update-post_' . $post_id ) ) {
Index: /trunk/src/wp-admin/includes/revision.php
===================================================================
--- /trunk/src/wp-admin/includes/revision.php (revision 45582)
+++ /trunk/src/wp-admin/includes/revision.php (revision 45583)
@@ -21,10 +21,12 @@
*/
function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) {
- if ( ! $post = get_post( $post ) ) {
+ $post = get_post( $post );
+ if ( ! $post ) {
return false;
}
if ( $compare_from ) {
- if ( ! $compare_from = get_post( $compare_from ) ) {
+ $compare_from = get_post( $compare_from );
+ if ( ! $compare_from ) {
return false;
}
@@ -34,5 +36,6 @@
}
- if ( ! $compare_to = get_post( $compare_to ) ) {
+ $compare_to = get_post( $compare_to );
+ if ( ! $compare_to ) {
return false;
}
Index: /trunk/src/wp-admin/includes/taxonomy.php
===================================================================
--- /trunk/src/wp-admin/includes/taxonomy.php (revision 45582)
+++ /trunk/src/wp-admin/includes/taxonomy.php (revision 45583)
@@ -54,5 +54,6 @@
*/
function wp_create_category( $cat_name, $parent = 0 ) {
- if ( $id = category_exists( $cat_name, $parent ) ) {
+ $id = category_exists( $cat_name, $parent );
+ if ( $id ) {
return $id;
}
@@ -78,8 +79,12 @@
$cat_ids = array();
foreach ( $categories as $category ) {
- if ( $id = category_exists( $category ) ) {
+ $id = category_exists( $category );
+ if ( $id ) {
$cat_ids[] = $id;
- } elseif ( $id = wp_create_category( $category ) ) {
- $cat_ids[] = $id;
+ } else {
+ $id = wp_create_category( $category );
+ if ( $id ) {
+ $cat_ids[] = $id;
+ }
}
}
@@ -301,5 +306,6 @@
*/
function wp_create_term( $tag_name, $taxonomy = 'post_tag' ) {
- if ( $id = term_exists( $tag_name, $taxonomy ) ) {
+ $id = term_exists( $tag_name, $taxonomy );
+ if ( $id ) {
return $id;
}
Index: /trunk/src/wp-admin/includes/template.php
===================================================================
--- /trunk/src/wp-admin/includes/template.php (revision 45582)
+++ /trunk/src/wp-admin/includes/template.php (revision 45583)
@@ -1213,5 +1213,6 @@
// Grab the ones the user has manually sorted. Pull them out of their previous context/priority and into the one the user chose
- if ( ! $already_sorted && $sorted = get_user_option( "meta-box-order_$page" ) ) {
+ $sorted = get_user_option( "meta-box-order_$page" );
+ if ( ! $already_sorted && $sorted ) {
foreach ( $sorted as $box_context => $ids ) {
foreach ( explode( ',', $ids ) as $id ) {
Index: /trunk/src/wp-admin/includes/theme-install.php
===================================================================
--- /trunk/src/wp-admin/includes/theme-install.php (revision 45582)
+++ /trunk/src/wp-admin/includes/theme-install.php (revision 45583)
@@ -63,5 +63,6 @@
_deprecated_function( __FUNCTION__, '3.1.0', 'get_theme_feature_list()' );
- if ( ! $cache = get_transient( 'wporg_theme_feature_list' ) ) {
+ $cache = get_transient( 'wporg_theme_feature_list' );
+ if ( ! $cache ) {
set_transient( 'wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS );
}
Index: /trunk/src/wp-admin/includes/theme.php
===================================================================
--- /trunk/src/wp-admin/includes/theme.php (revision 45582)
+++ /trunk/src/wp-admin/includes/theme.php (revision 45583)
@@ -304,5 +304,6 @@
}
- if ( ! $feature_list = get_site_transient( 'wporg_theme_feature_list' ) ) {
+ $feature_list = get_site_transient( 'wporg_theme_feature_list' );
+ if ( ! $feature_list ) {
set_site_transient( 'wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS );
}
@@ -491,5 +492,6 @@
$http_url = $url;
- if ( $ssl = wp_http_supports( array( 'ssl' ) ) ) {
+ $ssl = wp_http_supports( array( 'ssl' ) );
+ if ( $ssl ) {
$url = set_url_scheme( $url, 'https' );
}
Index: /trunk/src/wp-admin/includes/translation-install.php
===================================================================
--- /trunk/src/wp-admin/includes/translation-install.php (revision 45582)
+++ /trunk/src/wp-admin/includes/translation-install.php (revision 45583)
@@ -36,6 +36,8 @@
if ( false === $res ) {
- $url = $http_url = 'http://api.wordpress.org/translations/' . $type . '/1.0/';
- if ( $ssl = wp_http_supports( array( 'ssl' ) ) ) {
+ $url = 'http://api.wordpress.org/translations/' . $type . '/1.0/';
+ $http_url = $url;
+ $ssl = wp_http_supports( array( 'ssl' ) );
+ if ( $ssl ) {
$url = set_url_scheme( $url, 'https' );
}
@@ -118,6 +120,9 @@
*/
function wp_get_available_translations() {
- if ( ! wp_installing() && false !== ( $translations = get_site_transient( 'available_translations' ) ) ) {
- return $translations;
+ if ( ! wp_installing() ) {
+ $translations = get_site_transient( 'available_translations' );
+ if ( false !== $translations ) {
+ return $translations;
+ }
}
Index: /trunk/src/wp-admin/includes/update.php
===================================================================
--- /trunk/src/wp-admin/includes/update.php (revision 45582)
+++ /trunk/src/wp-admin/includes/update.php (revision 45583)
@@ -117,7 +117,9 @@
*/
function get_core_checksums( $version, $locale ) {
- $url = $http_url = 'http://api.wordpress.org/core/checksums/1.0/?' . http_build_query( compact( 'version', 'locale' ), null, '&' );
-
- if ( $ssl = wp_http_supports( array( 'ssl' ) ) ) {
+ $http_url = 'http://api.wordpress.org/core/checksums/1.0/?' . http_build_query( compact( 'version', 'locale' ), null, '&' );
+ $url = $http_url;
+
+ $ssl = wp_http_supports( array( 'ssl' ) );
+ if ( $ssl ) {
$url = set_url_scheme( $url, 'https' );
}
Index: /trunk/src/wp-admin/includes/upgrade.php
===================================================================
--- /trunk/src/wp-admin/includes/upgrade.php (revision 45582)
+++ /trunk/src/wp-admin/includes/upgrade.php (revision 45583)
@@ -1261,5 +1261,6 @@
// Associate terms with the same slug in a term group and make slugs unique.
- if ( $exists = $wpdb->get_results( $wpdb->prepare( "SELECT term_id, term_group FROM $wpdb->terms WHERE slug = %s", $slug ) ) ) {
+ $exists = $wpdb->get_results( $wpdb->prepare( "SELECT term_id, term_group FROM $wpdb->terms WHERE slug = %s", $slug ) );
+ if ( $exists ) {
$term_group = $exists[0]->term_group;
$id = $exists[0]->term_id;
@@ -1366,5 +1367,6 @@
// Associate terms with the same slug in a term group and make slugs unique.
- if ( $exists = $wpdb->get_results( $wpdb->prepare( "SELECT term_id, term_group FROM $wpdb->terms WHERE slug = %s", $slug ) ) ) {
+ $exists = $wpdb->get_results( $wpdb->prepare( "SELECT term_id, term_group FROM $wpdb->terms WHERE slug = %s", $slug ) );
+ if ( $exists ) {
$term_group = $exists[0]->term_group;
$term_id = $exists[0]->term_id;
@@ -1824,6 +1826,9 @@
}
- if ( $wp_current_db_version < 22422 && $term = get_term_by( 'slug', 'post-format-standard', 'post_format' ) ) {
- wp_delete_term( $term->term_id, 'post_format' );
+ if ( $wp_current_db_version < 22422 ) {
+ $term = get_term_by( 'slug', 'post-format-standard', 'post_format' );
+ if ( $term ) {
+ wp_delete_term( $term->term_id, 'post_format' );
+ }
}
}
@@ -2431,5 +2436,6 @@
global $wpdb;
$all_options = new stdClass;
- if ( $options = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options" ) ) {
+ $options = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options" );
+ if ( $options ) {
foreach ( $options as $option ) {
if ( 'siteurl' == $option->option_name || 'home' == $option->option_name || 'category_base' == $option->option_name ) {
@@ -2608,5 +2614,7 @@
// Clear the field and index arrays.
- $cfields = $indices = $indices_without_subparts = array();
+ $cfields = array();
+ $indices = array();
+ $indices_without_subparts = array();
// Get all of the field names in the query from between the parentheses.
@@ -2683,5 +2691,6 @@
// Parse the columns. Multiple columns are separated by a comma.
- $index_columns = $index_columns_without_subparts = array_map( 'trim', explode( ',', $index_matches['index_columns'] ) );
+ $index_columns = array_map( 'trim', explode( ',', $index_matches['index_columns'] ) );
+ $index_columns_without_subparts = $index_columns;
// Normalize columns.
@@ -2853,5 +2862,6 @@
// Check if the index definition exists, ignoring subparts.
- if ( ! ( ( $aindex = array_search( $index_string, $indices_without_subparts ) ) === false ) ) {
+ $aindex = array_search( $index_string, $indices_without_subparts );
+ if ( false !== $aindex ) {
// If the index already exists (even with different subparts), we don't need to create it.
unset( $indices_without_subparts[ $aindex ] );
Index: /trunk/src/wp-admin/includes/user.php
===================================================================
--- /trunk/src/wp-admin/includes/user.php (revision 45582)
+++ /trunk/src/wp-admin/includes/user.php (revision 45583)
@@ -45,5 +45,6 @@
}
- $pass1 = $pass2 = '';
+ $pass1 = '';
+ $pass2 = '';
if ( isset( $_POST['pass1'] ) ) {
$pass1 = $_POST['pass1'];
@@ -202,6 +203,9 @@
} elseif ( ! is_email( $user->user_email ) ) {
$errors->add( 'invalid_email', __( 'ERROR: The email address isn’t correct.' ), array( 'form-field' => 'email' ) );
- } elseif ( ( $owner_id = email_exists( $user->user_email ) ) && ( ! $update || ( $owner_id != $user->ID ) ) ) {
- $errors->add( 'email_exists', __( 'ERROR: This email is already registered, please choose another one.' ), array( 'form-field' => 'email' ) );
+ } else {
+ $owner_id = email_exists( $user->user_email );
+ if ( $owner_id && ( ! $update || ( $owner_id != $user->ID ) ) ) {
+ $errors->add( 'email_exists', __( 'ERROR: This email is already registered, please choose another one.' ), array( 'form-field' => 'email' ) );
+ }
}
Index: /trunk/src/wp-admin/includes/widgets.php
===================================================================
--- /trunk/src/wp-admin/includes/widgets.php (revision 45582)
+++ /trunk/src/wp-admin/includes/widgets.php (revision 45583)
@@ -300,5 +300,8 @@
-
+
';
- wp_install_language_form( $languages );
- echo '';
- break;
+ if ( wp_can_install_language_pack() && empty( $language ) ) {
+ $languages = wp_get_available_translations();
+ if ( $languages ) {
+ $scripts_to_print[] = 'language-chooser';
+ display_header( 'language-chooser' );
+ echo '
';
+ break;
+ }
}
Index: /trunk/src/wp-admin/link-manager.php
===================================================================
--- /trunk/src/wp-admin/link-manager.php (revision 45582)
+++ /trunk/src/wp-admin/link-manager.php (revision 45583)
@@ -45,6 +45,7 @@
$wp_list_table->prepare_items();
-$title = __( 'Links' );
-$this_file = $parent_file = 'link-manager.php';
+$title = __( 'Links' );
+$this_file = 'link-manager.php';
+$parent_file = $this_file;
get_current_screen()->add_help_tab(
Index: /trunk/src/wp-admin/link.php
===================================================================
--- /trunk/src/wp-admin/link.php (revision 45582)
+++ /trunk/src/wp-admin/link.php (revision 45583)
@@ -113,5 +113,6 @@
$link_id = (int) $_GET['link_id'];
- if ( ! $link = get_link_to_edit( $link_id ) ) {
+ $link = get_link_to_edit( $link_id );
+ if ( ! $link ) {
wp_die( __( 'Link not found.' ) );
}
Index: /trunk/src/wp-admin/media.php
===================================================================
--- /trunk/src/wp-admin/media.php (revision 45582)
+++ /trunk/src/wp-admin/media.php (revision 45583)
@@ -28,5 +28,6 @@
if ( empty( $errors ) ) {
$location = 'media.php';
- if ( $referer = wp_get_original_referer() ) {
+ $referer = wp_get_original_referer();
+ if ( $referer ) {
if ( false !== strpos( $referer, 'upload.php' ) || ( url_to_postid( $referer ) == $attachment_id ) ) {
$location = $referer;
Index: /trunk/src/wp-admin/menu-header.php
===================================================================
--- /trunk/src/wp-admin/menu-header.php (revision 45582)
+++ /trunk/src/wp-admin/menu-header.php (revision 45583)
@@ -109,5 +109,6 @@
$class = $class ? ' class="' . join( ' ', $class ) . '"' : '';
$id = ! empty( $item[5] ) ? ' id="' . preg_replace( '|[^a-zA-Z0-9_:.]|', '-', $item[5] ) . '"' : '';
- $img = $img_style = '';
+ $img = '';
+ $img_style = '';
$img_class = ' dashicons-before';
@@ -153,5 +154,6 @@
$menu_hook = get_plugin_page_hook( $submenu_items[0][2], $item[2] );
$menu_file = $submenu_items[0][2];
- if ( false !== ( $pos = strpos( $menu_file, '?' ) ) ) {
+ $pos = strpos( $menu_file, '?' );
+ if ( false !== $pos ) {
$menu_file = substr( $menu_file, 0, $pos );
}
@@ -165,5 +167,6 @@
$menu_hook = get_plugin_page_hook( $item[2], 'admin.php' );
$menu_file = $item[2];
- if ( false !== ( $pos = strpos( $menu_file, '?' ) ) ) {
+ $pos = strpos( $menu_file, '?' );
+ if ( false !== $pos ) {
$menu_file = substr( $menu_file, 0, $pos );
}
@@ -197,5 +200,6 @@
$menu_file = $item[2];
- if ( false !== ( $pos = strpos( $menu_file, '?' ) ) ) {
+ $pos = strpos( $menu_file, '?' );
+ if ( false !== $pos ) {
$menu_file = substr( $menu_file, 0, $pos );
}
@@ -227,5 +231,6 @@
$menu_hook = get_plugin_page_hook( $sub_item[2], $item[2] );
$sub_file = $sub_item[2];
- if ( false !== ( $pos = strpos( $sub_file, '?' ) ) ) {
+ $pos = strpos( $sub_file, '?' );
+ if ( false !== $pos ) {
$sub_file = substr( $sub_file, 0, $pos );
}
Index: /trunk/src/wp-admin/options-general.php
===================================================================
--- /trunk/src/wp-admin/options-general.php (revision 45582)
+++ /trunk/src/wp-admin/options-general.php (revision 45583)
@@ -74,5 +74,6 @@
array(
'blogname',
@@ -147,5 +147,7 @@
),
);
-$whitelist_options['misc'] = $whitelist_options['options'] = $whitelist_options['privacy'] = array();
+$whitelist_options['misc'] = array();
+$whitelist_options['options'] = array();
+$whitelist_options['privacy'] = array();
$mail_options = array( 'mailserver_url', 'mailserver_port', 'mailserver_login', 'mailserver_pass' );
Index: /trunk/src/wp-admin/plugins.php
===================================================================
--- /trunk/src/wp-admin/plugins.php (revision 45582)
+++ /trunk/src/wp-admin/plugins.php (revision 45583)
@@ -292,5 +292,6 @@
if ( '.' == $plugin_slug ) {
- if ( $data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin ) ) {
+ $data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
+ if ( $data ) {
$plugin_info[ $plugin ] = $data;
$plugin_info[ $plugin ]['is_uninstallable'] = is_uninstallable_plugin( $plugin );
@@ -301,5 +302,6 @@
} else {
// Get plugins list from that folder.
- if ( $folder_plugins = get_plugins( '/' . $plugin_slug ) ) {
+ $folder_plugins = get_plugins( '/' . $plugin_slug );
+ if ( $folder_plugins ) {
foreach ( $folder_plugins as $plugin_file => $data ) {
$plugin_info[ $plugin_file ] = _get_plugin_data_markup_translate( $plugin_file, $data );
Index: /trunk/src/wp-admin/post.php
===================================================================
--- /trunk/src/wp-admin/post.php (revision 45582)
+++ /trunk/src/wp-admin/post.php (revision 45583)
@@ -20,10 +20,11 @@
wp_die( __( 'A post ID mismatch has been detected.' ), __( 'Sorry, you are not allowed to edit this item.' ), 400 );
} elseif ( isset( $_GET['post'] ) ) {
- $post_id = $post_ID = (int) $_GET['post'];
+ $post_id = (int) $_GET['post'];
} elseif ( isset( $_POST['post_ID'] ) ) {
- $post_id = $post_ID = (int) $_POST['post_ID'];
+ $post_id = (int) $_POST['post_ID'];
} else {
- $post_id = $post_ID = 0;
-}
+ $post_id = 0;
+}
+$post_ID = $post_id;
/**
@@ -242,5 +243,6 @@
}
- if ( $user_id = wp_check_post_lock( $post_id ) ) {
+ $user_id = wp_check_post_lock( $post_id );
+ if ( $user_id ) {
$user = get_userdata( $user_id );
wp_die( sprintf( __( 'You cannot move this item to the Trash. %s is currently editing.' ), $user->display_name ) );
Index: /trunk/src/wp-admin/revision.php
===================================================================
--- /trunk/src/wp-admin/revision.php (revision 45582)
+++ /trunk/src/wp-admin/revision.php (revision 45583)
@@ -34,5 +34,6 @@
switch ( $action ) {
case 'restore':
- if ( ! $revision = wp_get_post_revision( $revision_id ) ) {
+ $revision = wp_get_post_revision( $revision_id );
+ if ( ! $revision ) {
break;
}
@@ -42,5 +43,6 @@
}
- if ( ! $post = get_post( $revision->post_parent ) ) {
+ $post = get_post( $revision->post_parent );
+ if ( ! $post ) {
break;
}
@@ -71,8 +73,11 @@
case 'edit':
default:
- if ( ! $revision = wp_get_post_revision( $revision_id ) ) {
+ $revision = wp_get_post_revision( $revision_id );
+ if ( ! $revision ) {
break;
}
- if ( ! $post = get_post( $revision->post_parent ) ) {
+
+ $post = get_post( $revision->post_parent );
+ if ( ! $post ) {
break;
}
@@ -111,8 +116,9 @@
// This is so that the correct "Edit" menu item is selected.
if ( ! empty( $post->post_type ) && 'post' != $post->post_type ) {
- $parent_file = $submenu_file = 'edit.php?post_type=' . $post->post_type;
+ $parent_file = 'edit.php?post_type=' . $post->post_type;
} else {
- $parent_file = $submenu_file = 'edit.php';
+ $parent_file = 'edit.php';
}
+$submenu_file = $parent_file;
wp_enqueue_script( 'revisions' );
Index: /trunk/src/wp-admin/setup-config.php
===================================================================
--- /trunk/src/wp-admin/setup-config.php (revision 45582)
+++ /trunk/src/wp-admin/setup-config.php (revision 45583)
@@ -127,11 +127,14 @@
switch ( $step ) {
case -1:
- if ( wp_can_install_language_pack() && empty( $language ) && ( $languages = wp_get_available_translations() ) ) {
- setup_config_display_header( 'language-chooser' );
- echo '
Select a default language
';
- echo '
';
- break;
+ if ( wp_can_install_language_pack() && empty( $language ) ) {
+ $languages = wp_get_available_translations();
+ if ( $languages ) {
+ setup_config_display_header( 'language-chooser' );
+ echo '
Select a default language
';
+ echo '
';
+ break;
+ }
}
Index: /trunk/src/wp-admin/theme-editor.php
===================================================================
--- /trunk/src/wp-admin/theme-editor.php (revision 45582)
+++ /trunk/src/wp-admin/theme-editor.php (revision 45583)
@@ -74,5 +74,6 @@
}
-$allowed_files = $style_files = array();
+$allowed_files = array();
+$style_files = array();
$has_templates = false;
Index: /trunk/src/wp-admin/themes.php
===================================================================
--- /trunk/src/wp-admin/themes.php (revision 45582)
+++ /trunk/src/wp-admin/themes.php (revision 45583)
@@ -269,5 +269,6 @@
}
- if ( false !== ( $pos = strpos( $menu_file, '?' ) ) ) {
+ $pos = strpos( $menu_file, '?' );
+ if ( false !== $pos ) {
$menu_file = substr( $menu_file, 0, $pos );
}
@@ -369,5 +370,6 @@
true ) ) ) {
+$broken_themes = wp_get_themes( array( 'errors' => true ) );
+if ( ! is_multisite() && current_user_can( 'edit_themes' ) && $broken_themes ) {
?>
Index: /trunk/src/wp-admin/update-core.php
===================================================================
--- /trunk/src/wp-admin/update-core.php (revision 45582)
+++ /trunk/src/wp-admin/update-core.php (revision 45583)
@@ -36,13 +36,15 @@
static $first_pass = true;
- $wp_version = get_bloginfo( 'version' );
+ $wp_version = get_bloginfo( 'version' );
+ $version_string = sprintf( '%s–
%s', $update->current, $update->locale );
if ( 'en_US' == $update->locale && 'en_US' == get_locale() ) {
$version_string = $update->current;
- } elseif ( 'en_US' == $update->locale && $update->packages->partial && $wp_version == $update->partial_version && ( $updates = get_core_updates() ) && 1 == count( $updates ) ) {
- // If the only available update is a partial builds, it doesn't need a language-specific version string.
- $version_string = $update->current;
- } else {
- $version_string = sprintf( '%s–
%s', $update->current, $update->locale );
+ } elseif ( 'en_US' == $update->locale && $update->packages->partial && $wp_version == $update->partial_version ) {
+ $updates = get_core_updates();
+ if ( $updates && 1 == count( $updates ) ) {
+ // If the only available update is a partial builds, it doesn't need a language-specific version string.
+ $version_string = $update->current;
+ }
}
@@ -538,5 +540,6 @@
';
return;
Index: /trunk/src/wp-admin/upload.php
===================================================================
--- /trunk/src/wp-admin/upload.php (revision 45582)
+++ /trunk/src/wp-admin/upload.php (revision 45583)
@@ -131,5 +131,6 @@
$location = 'upload.php';
- if ( $referer = wp_get_referer() ) {
+ $referer = wp_get_referer();
+ if ( $referer ) {
if ( false !== strpos( $referer, 'upload.php' ) ) {
$location = remove_query_arg( array( 'trashed', 'untrashed', 'deleted', 'message', 'ids', 'posted' ), $referer );
@@ -287,5 +288,6 @@
}
-if ( ! empty( $_GET['attached'] ) && $attached = absint( $_GET['attached'] ) ) {
+if ( ! empty( $_GET['attached'] ) && absint( $_GET['attached'] ) ) {
+ $attached = absint( $_GET['attached'] );
if ( 1 == $attached ) {
$message = __( 'Media file attached.' );
@@ -298,5 +300,6 @@
}
-if ( ! empty( $_GET['detach'] ) && $detached = absint( $_GET['detach'] ) ) {
+if ( ! empty( $_GET['detach'] ) && absint( $_GET['detach'] ) ) {
+ $detached = absint( $_GET['detach'] );
if ( 1 == $detached ) {
$message = __( 'Media file detached.' );
@@ -309,5 +312,6 @@
}
-if ( ! empty( $_GET['deleted'] ) && $deleted = absint( $_GET['deleted'] ) ) {
+if ( ! empty( $_GET['deleted'] ) && absint( $_GET['deleted'] ) ) {
+ $deleted = absint( $_GET['deleted'] );
if ( 1 == $deleted ) {
$message = __( 'Media file permanently deleted.' );
@@ -320,5 +324,6 @@
}
-if ( ! empty( $_GET['trashed'] ) && $trashed = absint( $_GET['trashed'] ) ) {
+if ( ! empty( $_GET['trashed'] ) && absint( $_GET['trashed'] ) ) {
+ $trashed = absint( $_GET['trashed'] );
if ( 1 == $trashed ) {
$message = __( 'Media file moved to the trash.' );
@@ -332,5 +337,6 @@
}
-if ( ! empty( $_GET['untrashed'] ) && $untrashed = absint( $_GET['untrashed'] ) ) {
+if ( ! empty( $_GET['untrashed'] ) && absint( $_GET['untrashed'] ) ) {
+ $untrashed = absint( $_GET['untrashed'] );
if ( 1 == $untrashed ) {
$message = __( 'Media file restored from the trash.' );
Index: /trunk/src/wp-admin/user-edit.php
===================================================================
--- /trunk/src/wp-admin/user-edit.php (revision 45582)
+++ /trunk/src/wp-admin/user-edit.php (revision 45583)
@@ -603,5 +603,6 @@
* @param WP_User $profileuser User object for the current user to edit.
*/
- if ( $show_password_fields = apply_filters( 'show_password_fields', true, $profileuser ) ) :
+ $show_password_fields = apply_filters( 'show_password_fields', true, $profileuser );
+ if ( $show_password_fields ) :
?>