From c90cfa3b502a101bc81594805364887cdf8e1f85 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Sun, 26 Nov 2017 23:57:55 +0000 Subject: [PATCH] General: Fix some precision alignment formatting warnings. The WPCS `WordPress.WhiteSpace.PrecisionAlignment` rule throws warnings for a bunch of code that will likely cause issues for `wpcbf`. Fixing these manually beforehand gives us better auto-fixed results later. See #41057. Built from https://develop.svn.wordpress.org/trunk@42228 git-svn-id: http://core.svn.wordpress.org/trunk@42057 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/about.php | 6 +- wp-admin/edit-comments.php | 4 +- wp-admin/edit-form-advanced.php | 44 +++++----- wp-admin/edit-form-comment.php | 2 +- wp-admin/edit-tags.php | 2 +- wp-admin/edit.php | 8 +- wp-admin/includes/ajax-actions.php | 4 +- wp-admin/includes/bookmark.php | 3 +- .../includes/class-wp-filesystem-base.php | 6 +- .../includes/class-wp-filesystem-ssh2.php | 2 +- .../includes/class-wp-plugins-list-table.php | 2 +- .../includes/class-wp-posts-list-table.php | 2 +- wp-admin/includes/dashboard.php | 2 +- wp-admin/includes/image.php | 2 +- wp-admin/includes/media.php | 14 ++-- wp-admin/includes/meta-boxes.php | 8 +- wp-admin/includes/plugin-install.php | 6 +- wp-admin/includes/post.php | 3 +- wp-admin/includes/schema.php | 9 ++- wp-admin/includes/upgrade.php | 6 +- wp-admin/includes/user.php | 16 ++-- wp-admin/install.php | 2 +- wp-admin/link-manager.php | 4 +- wp-admin/network/site-new.php | 12 +-- wp-admin/network/site-users.php | 12 +-- wp-admin/network/user-new.php | 12 +-- wp-admin/options-permalink.php | 2 +- wp-admin/options.php | 16 ++-- wp-admin/post.php | 4 +- wp-admin/term.php | 4 +- wp-admin/theme-editor.php | 1 - wp-admin/upload.php | 4 +- wp-admin/users.php | 2 +- .../themes/twentyseventeen/functions.php | 2 +- .../template-parts/footer/footer-widgets.php | 2 +- wp-content/themes/twentysixteen/footer.php | 2 +- wp-content/themes/twentysixteen/header.php | 2 +- wp-content/themes/twentyten/header.php | 2 +- wp-includes/class-wp-image-editor-gd.php | 4 +- wp-includes/class-wp-post.php | 4 +- wp-includes/class-wp-query.php | 2 +- wp-includes/class-wp-rewrite.php | 2 +- wp-includes/class-wp-walker.php | 4 +- wp-includes/class-wp.php | 24 +++--- wp-includes/comment-template.php | 24 +++--- wp-includes/comment.php | 5 +- wp-includes/compat.php | 6 +- wp-includes/feed-atom.php | 26 +++--- wp-includes/formatting.php | 20 ++--- wp-includes/functions.php | 80 +++++++++---------- wp-includes/general-template.php | 4 +- wp-includes/kses.php | 2 +- wp-includes/link-template.php | 2 +- wp-includes/media.php | 10 ++- wp-includes/nav-menu.php | 2 +- wp-includes/option.php | 2 +- wp-includes/post.php | 4 +- wp-includes/revision.php | 12 +-- wp-includes/shortcodes.php | 2 +- wp-includes/theme-compat/comments.php | 4 +- wp-includes/version.php | 2 +- wp-includes/wp-db.php | 2 +- xmlrpc.php | 42 +++++----- 63 files changed, 265 insertions(+), 262 deletions(-) diff --git a/wp-admin/about.php b/wp-admin/about.php index b7aca0bed1..1f9d077ba8 100644 --- a/wp-admin/about.php +++ b/wp-admin/about.php @@ -353,15 +353,15 @@ __( 'Version %s addressed some security issues.' ); /* translators: 1: WordPress version number, 2: plural number of bugs. */ _n_noop( 'Version %1$s addressed %2$s bug.', - 'Version %1$s addressed %2$s bugs.' ); + 'Version %1$s addressed %2$s bugs.' ); /* translators: 1: WordPress version number, 2: plural number of bugs. Singular security issue. */ _n_noop( 'Version %1$s addressed a security issue and fixed %2$s bug.', - 'Version %1$s addressed a security issue and fixed %2$s bugs.' ); + 'Version %1$s addressed a security issue and fixed %2$s bugs.' ); /* translators: 1: WordPress version number, 2: plural number of bugs. More than one security issue. */ _n_noop( 'Version %1$s addressed some security issues and fixed %2$s bug.', - 'Version %1$s addressed some security issues and fixed %2$s bugs.' ); + 'Version %1$s addressed some security issues and fixed %2$s bugs.' ); /* translators: %s: Codex URL */ __( 'For more information, see the release notes.' ); diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index 47244f025e..67cb14d4dc 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -124,8 +124,8 @@ if ( $doaction ) { wp_safe_redirect( $redirect_to ); exit; } elseif ( ! empty( $_GET['_wp_http_referer'] ) ) { - wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ); - exit; + wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ); + exit; } $wp_list_table->prepare_items(); diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 738f63be72..6ee5e2d558 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -41,8 +41,8 @@ $_wp_editor_expand = $_content_editor_dfw = false; * @param string $post_type Post type. */ if ( post_type_supports( $post_type, 'editor' ) && ! wp_is_mobile() && - ! ( $is_IE && preg_match( '/MSIE [5678]/', $_SERVER['HTTP_USER_AGENT'] ) ) && - apply_filters( 'wp_editor_expand', true, $post_type ) ) { + ! ( $is_IE && preg_match( '/MSIE [5678]/', $_SERVER['HTTP_USER_AGENT'] ) ) && + apply_filters( 'wp_editor_expand', true, $post_type ) ) { wp_enqueue_script('editor-expand'); $_content_editor_dfw = true; @@ -144,31 +144,31 @@ if ( $viewable ) { $scheduled_date = date_i18n( __( 'M j, Y @ H:i' ), strtotime( $post->post_date ) ); $messages['post'] = array( - 0 => '', // Unused. Messages start at index 1. - 1 => __( 'Post updated.' ) . $view_post_link_html, - 2 => __( 'Custom field updated.' ), - 3 => __( 'Custom field deleted.' ), - 4 => __( 'Post updated.' ), + 0 => '', // Unused. Messages start at index 1. + 1 => __( 'Post updated.' ) . $view_post_link_html, + 2 => __( 'Custom field updated.' ), + 3 => __( 'Custom field deleted.' ), + 4 => __( 'Post updated.' ), /* translators: %s: date and time of the revision */ - 5 => isset($_GET['revision']) ? sprintf( __( 'Post restored to revision from %s.' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, - 6 => __( 'Post published.' ) . $view_post_link_html, - 7 => __( 'Post saved.' ), - 8 => __( 'Post submitted.' ) . $preview_post_link_html, - 9 => sprintf( __( 'Post scheduled for: %s.' ), '' . $scheduled_date . '' ) . $scheduled_post_link_html, + 5 => isset($_GET['revision']) ? sprintf( __( 'Post restored to revision from %s.' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, + 6 => __( 'Post published.' ) . $view_post_link_html, + 7 => __( 'Post saved.' ), + 8 => __( 'Post submitted.' ) . $preview_post_link_html, + 9 => sprintf( __( 'Post scheduled for: %s.' ), '' . $scheduled_date . '' ) . $scheduled_post_link_html, 10 => __( 'Post draft updated.' ) . $preview_post_link_html, ); $messages['page'] = array( - 0 => '', // Unused. Messages start at index 1. - 1 => __( 'Page updated.' ) . $view_page_link_html, - 2 => __( 'Custom field updated.' ), - 3 => __( 'Custom field deleted.' ), - 4 => __( 'Page updated.' ), + 0 => '', // Unused. Messages start at index 1. + 1 => __( 'Page updated.' ) . $view_page_link_html, + 2 => __( 'Custom field updated.' ), + 3 => __( 'Custom field deleted.' ), + 4 => __( 'Page updated.' ), /* translators: %s: date and time of the revision */ - 5 => isset($_GET['revision']) ? sprintf( __( 'Page restored to revision from %s.' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, - 6 => __( 'Page published.' ) . $view_page_link_html, - 7 => __( 'Page saved.' ), - 8 => __( 'Page submitted.' ) . $preview_page_link_html, - 9 => sprintf( __( 'Page scheduled for: %s.' ), '' . $scheduled_date . '' ) . $scheduled_page_link_html, + 5 => isset($_GET['revision']) ? sprintf( __( 'Page restored to revision from %s.' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, + 6 => __( 'Page published.' ) . $view_page_link_html, + 7 => __( 'Page saved.' ), + 8 => __( 'Page submitted.' ) . $preview_page_link_html, + 9 => sprintf( __( 'Page scheduled for: %s.' ), '' . $scheduled_date . '' ) . $scheduled_page_link_html, 10 => __( 'Page draft updated.' ) . $preview_page_link_html, ); $messages['attachment'] = array_fill( 1, 10, __( 'Media file updated.' ) ); // Hack, for now. diff --git a/wp-admin/edit-form-comment.php b/wp-admin/edit-form-comment.php index 2ae7957f72..18ab60a348 100644 --- a/wp-admin/edit-form-comment.php +++ b/wp-admin/edit-form-comment.php @@ -150,7 +150,7 @@ endif; ?> * @param string $html Output HTML to display miscellaneous action. * @param object $comment Current comment object. */ - echo apply_filters( 'edit_comment_misc_actions', '', $comment ); + echo apply_filters( 'edit_comment_misc_actions', '', $comment ); ?> diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php index d1656aec3f..5d1025e5eb 100644 --- a/wp-admin/edit-tags.php +++ b/wp-admin/edit-tags.php @@ -18,7 +18,7 @@ if ( ! $tax ) wp_die( __( 'Invalid taxonomy.' ) ); if ( ! in_array( $tax->name, get_taxonomies( array( 'show_ui' => true ) ) ) ) { - wp_die( __( 'Sorry, you are not allowed to edit terms in this taxonomy.' ) ); + wp_die( __( 'Sorry, you are not allowed to edit terms in this taxonomy.' ) ); } if ( ! current_user_can( $tax->cap->manage_terms ) ) { diff --git a/wp-admin/edit.php b/wp-admin/edit.php index d97932b11f..5cb503c109 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -173,8 +173,8 @@ if ( $doaction ) { wp_redirect($sendback); exit(); } elseif ( ! empty($_REQUEST['_wp_http_referer']) ) { - wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), wp_unslash($_SERVER['REQUEST_URI']) ) ); - exit; + wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), wp_unslash($_SERVER['REQUEST_URI']) ) ); + exit; } $wp_list_table->prepare_items(); @@ -272,7 +272,7 @@ $bulk_messages = array(); $bulk_messages['post'] = array( 'updated' => _n( '%s post updated.', '%s posts updated.', $bulk_counts['updated'] ), 'locked' => ( 1 == $bulk_counts['locked'] ) ? __( '1 post not updated, somebody is editing it.' ) : - _n( '%s post not updated, somebody is editing it.', '%s posts not updated, somebody is editing them.', $bulk_counts['locked'] ), + _n( '%s post not updated, somebody is editing it.', '%s posts not updated, somebody is editing them.', $bulk_counts['locked'] ), 'deleted' => _n( '%s post permanently deleted.', '%s posts permanently deleted.', $bulk_counts['deleted'] ), 'trashed' => _n( '%s post moved to the Trash.', '%s posts moved to the Trash.', $bulk_counts['trashed'] ), 'untrashed' => _n( '%s post restored from the Trash.', '%s posts restored from the Trash.', $bulk_counts['untrashed'] ), @@ -280,7 +280,7 @@ $bulk_messages['post'] = array( $bulk_messages['page'] = array( 'updated' => _n( '%s page updated.', '%s pages updated.', $bulk_counts['updated'] ), 'locked' => ( 1 == $bulk_counts['locked'] ) ? __( '1 page not updated, somebody is editing it.' ) : - _n( '%s page not updated, somebody is editing it.', '%s pages not updated, somebody is editing them.', $bulk_counts['locked'] ), + _n( '%s page not updated, somebody is editing it.', '%s pages not updated, somebody is editing them.', $bulk_counts['locked'] ), 'deleted' => _n( '%s page permanently deleted.', '%s pages permanently deleted.', $bulk_counts['deleted'] ), 'trashed' => _n( '%s page moved to the Trash.', '%s pages moved to the Trash.', $bulk_counts['trashed'] ), 'untrashed' => _n( '%s page restored from the Trash.', '%s pages restored from the Trash.', $bulk_counts['untrashed'] ), diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index 5985e3561a..230da6a958 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -176,10 +176,10 @@ function wp_ajax_wp_compression_test() { $force_gzip = ( defined('ENFORCE_GZIP') && ENFORCE_GZIP ); $test_str = '"wpCompressionTest Lorem ipsum dolor sit amet consectetuer mollis sapien urna ut a. Eu nonummy condimentum fringilla tempor pretium platea vel nibh netus Maecenas. Hac molestie amet justo quis pellentesque est ultrices interdum nibh Morbi. Cras mattis pretium Phasellus ante ipsum ipsum ut sociis Suspendisse Lorem. Ante et non molestie. Porta urna Vestibulum egestas id congue nibh eu risus gravida sit. Ac augue auctor Ut et non a elit massa id sodales. Elit eu Nulla at nibh adipiscing mattis lacus mauris at tempus. Netus nibh quis suscipit nec feugiat eget sed lorem et urna. Pellentesque lacus at ut massa consectetuer ligula ut auctor semper Pellentesque. Ut metus massa nibh quam Curabitur molestie nec mauris congue. Volutpat molestie elit justo facilisis neque ac risus Ut nascetur tristique. Vitae sit lorem tellus et quis Phasellus lacus tincidunt nunc Fusce. Pharetra wisi Suspendisse mus sagittis libero lacinia Integer consequat ac Phasellus. Et urna ac cursus tortor aliquam Aliquam amet tellus volutpat Vestibulum. Justo interdum condimentum In augue congue tellus sollicitudin Quisque quis nibh."'; - if ( 1 == $_GET['test'] ) { + if ( 1 == $_GET['test'] ) { echo $test_str; wp_die(); - } elseif ( 2 == $_GET['test'] ) { + } elseif ( 2 == $_GET['test'] ) { if ( !isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) wp_die( -1 ); if ( false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) { diff --git a/wp-admin/includes/bookmark.php b/wp-admin/includes/bookmark.php index cd952a7f11..0f7365ee24 100644 --- a/wp-admin/includes/bookmark.php +++ b/wp-admin/includes/bookmark.php @@ -277,8 +277,7 @@ function wp_update_link( $linkdata ) { $link = wp_slash( $link ); // Passed link category list overwrites existing category list if not empty. - if ( isset( $linkdata['link_category'] ) && is_array( $linkdata['link_category'] ) - && 0 != count( $linkdata['link_category'] ) ) + if ( isset( $linkdata['link_category'] ) && is_array( $linkdata['link_category'] ) && 0 != count( $linkdata['link_category'] ) ) $link_cats = $linkdata['link_category']; else $link_cats = $link['link_category']; diff --git a/wp-admin/includes/class-wp-filesystem-base.php b/wp-admin/includes/class-wp-filesystem-base.php index 06113053ed..31fa1ebb96 100644 --- a/wp-admin/includes/class-wp-filesystem-base.php +++ b/wp-admin/includes/class-wp-filesystem-base.php @@ -382,9 +382,9 @@ class WP_Filesystem_Base { $attarray = preg_split('//', $mode); for ( $i = 0, $c = count( $attarray ); $i < $c; $i++ ) { - if ($key = array_search($attarray[$i], $legal)) { - $realmode .= $legal[$key]; - } + if ($key = array_search($attarray[$i], $legal)) { + $realmode .= $legal[$key]; + } } $mode = str_pad($realmode, 10, '-', STR_PAD_LEFT); diff --git a/wp-admin/includes/class-wp-filesystem-ssh2.php b/wp-admin/includes/class-wp-filesystem-ssh2.php index 072fdce653..9e1a4f537e 100644 --- a/wp-admin/includes/class-wp-filesystem-ssh2.php +++ b/wp-admin/includes/class-wp-filesystem-ssh2.php @@ -408,7 +408,7 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base { if ( 'f' == $type || $this->is_file($file) ) return ssh2_sftp_unlink($this->sftp_link, $file); if ( ! $recursive ) - return ssh2_sftp_rmdir($this->sftp_link, $file); + return ssh2_sftp_rmdir($this->sftp_link, $file); $filelist = $this->dirlist($file); if ( is_array($filelist) ) { foreach ( $filelist as $filename => $fileinfo) { diff --git a/wp-admin/includes/class-wp-plugins-list-table.php b/wp-admin/includes/class-wp-plugins-list-table.php index 2cc6c77df1..cbd9eed838 100644 --- a/wp-admin/includes/class-wp-plugins-list-table.php +++ b/wp-admin/includes/class-wp-plugins-list-table.php @@ -636,7 +636,7 @@ class WP_Plugins_List_Table extends WP_List_Table { } } // end if $is_active - } // end if $screen->in_admin( 'network' ) + } // end if $screen->in_admin( 'network' ) } // end if $context diff --git a/wp-admin/includes/class-wp-posts-list-table.php b/wp-admin/includes/class-wp-posts-list-table.php index 5988c3eaca..a707d20ed1 100644 --- a/wp-admin/includes/class-wp-posts-list-table.php +++ b/wp-admin/includes/class-wp-posts-list-table.php @@ -233,7 +233,7 @@ class WP_Posts_List_Table extends WP_List_Table { $class_html = $aria_current = ''; if ( ! empty( $class ) ) { - $class_html = sprintf( + $class_html = sprintf( ' class="%s"', esc_attr( $class ) ); diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index fa1d2ffad4..a6aaa879d3 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -403,7 +403,7 @@ function wp_network_dashboard_right_now() { if ( $actions ) { echo ''; diff --git a/wp-admin/includes/image.php b/wp-admin/includes/image.php index 8282499e8f..375f523b70 100644 --- a/wp-admin/includes/image.php +++ b/wp-admin/includes/image.php @@ -417,7 +417,7 @@ function wp_read_image_metadata( $file ) { if ( ! empty( $iptc['2#025'][0] ) ) { // keywords array $meta['keywords'] = array_values( $iptc['2#025'] ); } - } + } } /** diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 0a81a1169b..e00dfb18a8 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -1509,12 +1509,12 @@ function get_media_item( $attachment_id, $args = null ) { $delete = "" . __( 'Delete Permanently' ) . ''; } elseif ( !MEDIA_TRASH ) { $delete = "" . __( 'Delete' ) . " - "; + "; } else { $delete = "" . __( 'Move to Trash' ) . " "; @@ -2671,7 +2671,7 @@ function media_upload_flash_bypass() { function media_upload_html_bypass() { ?>

- Switch to the multi-file uploader.'); ?> + Switch to the multi-file uploader.'); ?>

post_status ) { post_status, 'draft' ); ?> value='draft'> - - + + @@ -180,8 +180,8 @@ echo esc_html( $visibility_trans ); ?> />

- - + +

diff --git a/wp-admin/includes/plugin-install.php b/wp-admin/includes/plugin-install.php index 1714acda71..3c414d609f 100644 --- a/wp-admin/includes/plugin-install.php +++ b/wp-admin/includes/plugin-install.php @@ -628,8 +628,10 @@ function install_plugin_information() { ) ); ?>
- + + + diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index adb0dd9cd6..71d04f0bac 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -64,7 +64,8 @@ function _wp_translate_postdata( $update = false, $post_data = null ) { } if ( isset( $post_data['user_ID'] ) && ( $post_data['post_author'] != $post_data['user_ID'] ) - && ! current_user_can( $ptype->cap->edit_others_posts ) ) { + && ! current_user_can( $ptype->cap->edit_others_posts ) ) { + if ( $update ) { if ( 'page' == $post_data['post_type'] ) return new WP_Error( 'edit_others_pages', __( 'Sorry, you are not allowed to edit pages as this user.' ) ); diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php index 374e9d465c..5a6e7c19a2 100644 --- a/wp-admin/includes/schema.php +++ b/wp-admin/includes/schema.php @@ -380,10 +380,11 @@ function populate_options() { $timezone_string = ''; $gmt_offset = 0; - /* translators: default GMT offset or timezone string. Must be either a valid offset (-12 to 14) - or a valid timezone string (America/New_York). See https://secure.php.net/manual/en/timezones.php - for all timezone strings supported by PHP. - */ + /* + * translators: default GMT offset or timezone string. Must be either a valid offset (-12 to 14) + * or a valid timezone string (America/New_York). See https://secure.php.net/manual/en/timezones.php + * for all timezone strings supported by PHP. + */ $offset_or_tz = _x( '0', 'default GMT offset or timezone string' ); if ( is_numeric( $offset_or_tz ) ) $gmt_offset = $offset_or_tz; diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index ae76e54055..b83f64c5c2 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -884,7 +884,7 @@ function upgrade_160() { $wpdb->update( $wpdb->posts, array( 'post_status' => 'attachment', 'post_mime_type' => $object->post_type, 'post_type' => ''), - array( 'ID' => $object->ID ) ); + array( 'ID' => $object->ID ) ); $meta = get_post_meta($object->ID, 'imagedata', true); if ( ! empty($meta['file']) ) @@ -2249,7 +2249,7 @@ function dbDelta( $queries = '', $execute = true ) { // Extract type, name and columns from the definition. preg_match( - '/^' + '/^' . '(?P' // 1) Type of the index. . 'PRIMARY\s+KEY|(?:UNIQUE|FULLTEXT|SPATIAL)\s+(?:KEY|INDEX)|KEY|INDEX' . ')' @@ -2288,7 +2288,7 @@ function dbDelta( $queries = '', $execute = true ) { foreach ( $index_columns as $id => &$index_column ) { // Extract column name and number of indexed characters (sub_part). preg_match( - '/' + '/' . '`?' // Name can be escaped with a backtick. . '(?P' // 1) Name of the column. . '(?:[0-9a-zA-Z$_-]|[\xC2-\xDF][\x80-\xBF])+' diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php index b9c83abc3f..dfd0369d4c 100644 --- a/wp-admin/includes/user.php +++ b/wp-admin/includes/user.php @@ -200,14 +200,14 @@ function edit_user( $user_id = 0 ) { $notify = isset( $_POST['send_user_notification'] ) ? 'both' : 'admin'; /** - * Fires after a new user has been created. - * - * @since 4.4.0 - * - * @param int $user_id ID of the newly created user. - * @param string $notify Type of notification that should happen. See wp_send_new_user_notifications() - * for more information on possible values. - */ + * Fires after a new user has been created. + * + * @since 4.4.0 + * + * @param int $user_id ID of the newly created user. + * @param string $notify Type of notification that should happen. See wp_send_new_user_notifications() + * for more information on possible values. + */ do_action( 'edit_user_created_user', $user_id, $notify ); } return $user_id; diff --git a/wp-admin/install.php b/wp-admin/install.php index 0021421007..59740ba6e7 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -195,7 +195,7 @@ function display_setup_form( $error = null ) { + } else { ?>

diff --git a/wp-admin/link-manager.php b/wp-admin/link-manager.php index 4ba77d3e29..402da73b10 100644 --- a/wp-admin/link-manager.php +++ b/wp-admin/link-manager.php @@ -37,8 +37,8 @@ if ( $doaction && isset( $_REQUEST['linkcheck'] ) ) { wp_redirect( $redirect_to ); exit; } elseif ( ! empty( $_GET['_wp_http_referer'] ) ) { - wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ); - exit; + wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ); + exit; } $wp_list_table->prepare_items(); diff --git a/wp-admin/network/site-new.php b/wp-admin/network/site-new.php index 0b404ea7c4..1e59a13142 100644 --- a/wp-admin/network/site-new.php +++ b/wp-admin/network/site-new.php @@ -119,12 +119,12 @@ if ( isset($_REQUEST['action']) && 'add-site' == $_REQUEST['action'] ) { } /** - * Fires after a new user has been created via the network site-new.php page. - * - * @since 4.4.0 - * - * @param int $user_id ID of the newly created user. - */ + * Fires after a new user has been created via the network site-new.php page. + * + * @since 4.4.0 + * + * @param int $user_id ID of the newly created user. + */ do_action( 'network_site_new_created_user', $user_id ); } diff --git a/wp-admin/network/site-users.php b/wp-admin/network/site-users.php index 95db765751..94cb07718d 100644 --- a/wp-admin/network/site-users.php +++ b/wp-admin/network/site-users.php @@ -73,12 +73,12 @@ if ( $action ) { } else { $update = 'newuser'; /** - * Fires after a user has been created via the network site-users.php page. - * - * @since 4.4.0 - * - * @param int $user_id ID of the newly created user. - */ + * Fires after a user has been created via the network site-users.php page. + * + * @since 4.4.0 + * + * @param int $user_id ID of the newly created user. + */ do_action( 'network_site_users_created_user', $user_id ); } } diff --git a/wp-admin/network/user-new.php b/wp-admin/network/user-new.php index 52941e2920..3d9bb67b2d 100644 --- a/wp-admin/network/user-new.php +++ b/wp-admin/network/user-new.php @@ -49,12 +49,12 @@ if ( isset($_REQUEST['action']) && 'add-user' == $_REQUEST['action'] ) { $add_user_errors = new WP_Error( 'add_user_fail', __( 'Cannot add user.' ) ); } else { /** - * Fires after a new user has been created via the network user-new.php page. - * - * @since 4.4.0 - * - * @param int $user_id ID of the newly created user. - */ + * Fires after a new user has been created via the network user-new.php page. + * + * @since 4.4.0 + * + * @param int $user_id ID of the newly created user. + */ do_action( 'network_user_new_created_user', $user_id ); wp_redirect( add_query_arg( array('update' => 'added', 'user_id' => $user_id ), 'user-new.php' ) ); exit; diff --git a/wp-admin/options-permalink.php b/wp-admin/options-permalink.php index 68ddfbe361..4b55a796fb 100644 --- a/wp-admin/options-permalink.php +++ b/wp-admin/options-permalink.php @@ -297,7 +297,7 @@ printf( __( 'If you like, you may enter custom structures for your category and - +
-

-
- - - - +

+ + + + +
get_results( "SELECT * FROM $wpdb->options ORDER BY option_name" ); @@ -287,13 +287,13 @@ foreach ( (array) $options as $option ) : -
+ -
+
name; $title = $tax->labels->edit_item; if ( ! in_array( $taxonomy, get_taxonomies( array( 'show_ui' => true ) ) ) || - ! current_user_can( 'edit_term', $tag->term_id ) -) { + ! current_user_can( 'edit_term', $tag->term_id ) ) { + wp_die( '

' . __( 'Cheatin’ uh?' ) . '

' . '

' . __( 'Sorry, you are not allowed to edit this item.' ) . '

', diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php index 22c201e01e..c6443cb8a1 100644 --- a/wp-admin/theme-editor.php +++ b/wp-admin/theme-editor.php @@ -327,7 +327,6 @@ if ( ! in_array( 'theme_editor_notice', $dismissed_pointers, true ) ) : ?>

-

diff --git a/wp-admin/upload.php b/wp-admin/upload.php index 5a53dc5857..9c4057bf7a 100644 --- a/wp-admin/upload.php +++ b/wp-admin/upload.php @@ -173,8 +173,8 @@ if ( $doaction ) { wp_redirect( $location ); exit; } elseif ( ! empty( $_GET['_wp_http_referer'] ) ) { - wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ); - exit; + wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ); + exit; } $wp_list_table->prepare_items(); diff --git a/wp-admin/users.php b/wp-admin/users.php index 93d91c83cc..ffee1db008 100644 --- a/wp-admin/users.php +++ b/wp-admin/users.php @@ -30,7 +30,7 @@ get_current_screen()->add_help_tab( array( 'id' => 'overview', 'title' => __('Overview'), 'content' => '

' . __('This screen lists all the existing users for your site. Each user has one of five defined roles as set by the site admin: Site Administrator, Editor, Author, Contributor, or Subscriber. Users with roles other than Administrator will see fewer options in the dashboard navigation when they are logged in, based on their role.') . '

' . - '

' . __('To add a new user for your site, click the Add New button at the top of the screen or Add New in the Users menu section.') . '

' + '

' . __('To add a new user for your site, click the Add New button at the top of the screen or Add New in the Users menu section.') . '

' ) ) ; get_current_screen()->add_help_tab( array( diff --git a/wp-content/themes/twentyseventeen/functions.php b/wp-content/themes/twentyseventeen/functions.php index eb4b901334..9cc891e3ff 100644 --- a/wp-content/themes/twentyseventeen/functions.php +++ b/wp-content/themes/twentyseventeen/functions.php @@ -484,7 +484,7 @@ function twentyseventeen_content_image_sizes_attr( $sizes, $size ) { if ( is_active_sidebar( 'sidebar-1' ) || is_archive() || is_search() || is_home() || is_page() ) { if ( ! ( is_page() && 'one-column' === get_theme_mod( 'page_options' ) ) && 767 <= $width ) { - $sizes = '(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px'; + $sizes = '(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px'; } } diff --git a/wp-content/themes/twentyseventeen/template-parts/footer/footer-widgets.php b/wp-content/themes/twentyseventeen/template-parts/footer/footer-widgets.php index 1a4c288331..28f9232d2b 100644 --- a/wp-content/themes/twentyseventeen/template-parts/footer/footer-widgets.php +++ b/wp-content/themes/twentyseventeen/template-parts/footer/footer-widgets.php @@ -12,7 +12,7 @@