From 298cd04a63c9802e08136681a2d4ee0008cd7b5c Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 23 Oct 2020 01:19:06 +0000 Subject: [PATCH] Coding Standards: Update some alignment in `wp-admin/authorize-application.php` for consistency. Save blogs count to a variable for reusing. Follow-up to [49270]. See #51489. Built from https://develop.svn.wordpress.org/trunk@49282 git-svn-id: http://core.svn.wordpress.org/trunk@49042 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/authorize-application.php | 26 +++++++++++++++----------- wp-admin/user-edit.php | 29 +++++++++++++++-------------- wp-includes/version.php | 2 +- 3 files changed, 31 insertions(+), 26 deletions(-) diff --git a/wp-admin/authorize-application.php b/wp-admin/authorize-application.php index b9cc0c0aac..524dbedf32 100644 --- a/wp-admin/authorize-application.php +++ b/wp-admin/authorize-application.php @@ -128,10 +128,13 @@ require_once ABSPATH . 'wp-admin/admin-header.php';

- ' . esc_html( $app_name ) . '' ); - ?> + ' . esc_html( $app_name ) . '' + ); + ?>

@@ -139,22 +142,23 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; ID, true ); - if ( count( $blogs ) > 1 ) { + $blogs = get_blogs_of_user( $user->ID, true ); + $blogs_count = count( $blogs ); + if ( $blogs_count > 1 ) { ?>

- the %2$s blog in this installation that you have permissions on.', 'This will grant access to all %2$s blogs in this installation that you have permissions on.', - count( $blogs ) + $blogs_count ), admin_url( 'my-sites.php' ), - number_format_i18n( count( $blogs ) ) + number_format_i18n( $blogs_count ) ); - ?> + ?>

1 ) { + $blogs = get_blogs_of_user( $user_id, true ); + $blogs_count = count( $blogs ); + if ( $blogs_count > 1 ) { ?>

- the %2$s blog in this installation that you have permissions on.', - 'Application passwords grant access to all %2$s blogs in this installation that you have permissions on.', - count( $blogs ) - ), - admin_url( 'my-sites.php' ), - number_format_i18n( count( $blogs ) ) - ); - ?> + the %2$s blog in this installation that you have permissions on.', + 'Application passwords grant access to all %2$s blogs in this installation that you have permissions on.', + $blogs_count + ), + admin_url( 'my-sites.php' ), + number_format_i18n( $blogs_count ) + ); + ?>