diff --git a/src/wp-admin/edit.php b/src/wp-admin/edit.php index 6c285d78ec..c9ef3b57cd 100644 --- a/src/wp-admin/edit.php +++ b/src/wp-admin/edit.php @@ -92,7 +92,7 @@ if ( $doaction ) { case 'trash': $trashed = $locked = 0; - foreach( (array) $post_ids as $post_id ) { + foreach ( (array) $post_ids as $post_id ) { if ( !current_user_can( 'delete_post', $post_id) ) wp_die( __('You are not allowed to move this item to the Trash.') ); @@ -111,7 +111,7 @@ if ( $doaction ) { break; case 'untrash': $untrashed = 0; - foreach( (array) $post_ids as $post_id ) { + foreach ( (array) $post_ids as $post_id ) { if ( !current_user_can( 'delete_post', $post_id) ) wp_die( __('You are not allowed to restore this item from the Trash.') ); @@ -124,7 +124,7 @@ if ( $doaction ) { break; case 'delete': $deleted = 0; - foreach( (array) $post_ids as $post_id ) { + foreach ( (array) $post_ids as $post_id ) { $post_del = get_post($post_id); if ( !current_user_can( 'delete_post', $post_id ) ) diff --git a/src/wp-admin/includes/class-wp-list-table.php b/src/wp-admin/includes/class-wp-list-table.php index 5d1edecfbc..8015e628cd 100644 --- a/src/wp-admin/includes/class-wp-list-table.php +++ b/src/wp-admin/includes/class-wp-list-table.php @@ -868,7 +868,7 @@ class WP_List_Table { // We need a primary defined so responsive views show something, // so let's fall back to the first non-checkbox column. - foreach( $columns as $col => $column_name ) { + foreach ( $columns as $col => $column_name ) { if ( 'cb' === $col ) { continue; } diff --git a/src/wp-admin/includes/class-wp-press-this.php b/src/wp-admin/includes/class-wp-press-this.php index 58ed28661a..b1b7138c41 100644 --- a/src/wp-admin/includes/class-wp-press-this.php +++ b/src/wp-admin/includes/class-wp-press-this.php @@ -984,7 +984,7 @@ class WP_Press_This { } if ( ! empty( $data['_embeds'] ) ) { - foreach( $data['_embeds'] as $src ) { + foreach ( $data['_embeds'] as $src ) { $prot_relative_src = preg_replace( '/^https?:/', '', $src ); if ( in_array( $prot_relative_src, $this->embeds ) ) { @@ -1012,7 +1012,7 @@ class WP_Press_This { $selected_images = array(); if ( ! empty( $data['_images'] ) ) { - foreach( $data['_images'] as $src ) { + foreach ( $data['_images'] as $src ) { if ( false !== strpos( $src, 'gravatar.com' ) ) { $src = preg_replace( '%http://[\d]+\.gravatar\.com/%', 'https://secure.gravatar.com/', $src ); } diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php index 49fcdd926b..9c7ac5b8ab 100644 --- a/src/wp-admin/includes/dashboard.php +++ b/src/wp-admin/includes/dashboard.php @@ -1069,7 +1069,7 @@ function wp_dashboard_primary() { * @param array $feeds Array of RSS feeds. */ function wp_dashboard_primary_output( $widget_id, $feeds ) { - foreach( $feeds as $type => $args ) { + foreach ( $feeds as $type => $args ) { $args['type'] = $type; echo '
'; if ( $type === 'plugins' ) { diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php index 2cdac29210..815a30988a 100644 --- a/src/wp-admin/includes/media.php +++ b/src/wp-admin/includes/media.php @@ -1239,7 +1239,7 @@ function get_attachment_fields_to_edit($post, $errors = null) { } // Merge default fields with their errors, so any key passed with the error (e.g. 'error', 'helps', 'value') will replace the default - // The recursive merge is easily traversed with array casting: foreach( (array) $things as $thing ) + // The recursive merge is easily traversed with array casting: foreach ( (array) $things as $thing ) $form_fields = array_merge_recursive($form_fields, (array) $errors); // This was formerly in image_attachment_fields_to_edit(). @@ -1627,7 +1627,7 @@ function get_compat_media_markup( $attachment_id, $args = null ) { } // Merge default fields with their errors, so any key passed with the error (e.g. 'error', 'helps', 'value') will replace the default - // The recursive merge is easily traversed with array casting: foreach( (array) $things as $thing ) + // The recursive merge is easily traversed with array casting: foreach ( (array) $things as $thing ) $form_fields = array_merge_recursive($form_fields, (array) $args['errors'] ); /** This filter is documented in wp-admin/includes/media.php */ diff --git a/src/wp-admin/includes/ms.php b/src/wp-admin/includes/ms.php index ffed184b21..7ea7cdfd9d 100644 --- a/src/wp-admin/includes/ms.php +++ b/src/wp-admin/includes/ms.php @@ -158,7 +158,7 @@ function wpmu_delete_blog( $blog_id, $drop = false ) { } $stack = array_reverse( $stack ); // Last added dirs are deepest - foreach( (array) $stack as $dir ) { + foreach ( (array) $stack as $dir ) { if ( $dir != $top_dir) @rmdir( $dir ); } @@ -802,7 +802,7 @@ function choose_primary_blog() { $found = false; ?> @@ -336,7 +336,7 @@ if ( ! /iPad|iPod|iPhone/.test( navigator.userAgent ) ) { $path_to_wp_config = dirname( ABSPATH ) . '/wp-config.php'; $handle = fopen( $path_to_wp_config, 'w' ); - foreach( $config_file as $line ) { + foreach ( $config_file as $line ) { fwrite( $handle, $line ); } fclose( $handle ); diff --git a/src/wp-admin/update-core.php b/src/wp-admin/update-core.php index b2f48c6693..0409c72f29 100644 --- a/src/wp-admin/update-core.php +++ b/src/wp-admin/update-core.php @@ -135,7 +135,7 @@ function dismissed_updates() { '.__('Show hidden updates').'

'; echo '