diff --git a/src/wp-admin/authorize-application.php b/src/wp-admin/authorize-application.php index b9cc0c0aac..524dbedf32 100644 --- a/src/wp-admin/authorize-application.php +++ b/src/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 ) + ); + ?>