wp/wp-admin/authorize-application.php
changeset 19 3d72ae0968f4
parent 18 be944660c56a
child 21 48c4eec2b7e6
--- a/wp/wp-admin/authorize-application.php	Wed Sep 21 18:19:35 2022 +0200
+++ b/wp/wp-admin/authorize-application.php	Tue Sep 27 16:37:53 2022 +0200
@@ -62,6 +62,7 @@
 	}
 }
 
+// Used in the HTML title tag.
 $title = __( 'Authorize Application' );
 
 $app_name    = ! empty( $_REQUEST['app_name'] ) ? $_REQUEST['app_name'] : '';
@@ -90,7 +91,7 @@
 
 if ( wp_is_site_protected_by_basic_auth( 'front' ) ) {
 	wp_die(
-		__( 'Your website appears to use Basic Authentication, which is not currently compatible with Application Passwords.' ),
+		__( 'Your website appears to use Basic Authentication, which is not currently compatible with application passwords.' ),
 		__( 'Cannot Authorize Application' ),
 		array(
 			'response'  => 501,
@@ -147,30 +148,42 @@
 				<?php
 				printf(
 					/* translators: %s: Application name. */
-					__( 'Would you like to give the application identifying itself as %s access to your account? You should only do this if you trust the app in question.' ),
+					__( 'Would you like to give the application identifying itself as %s access to your account? You should only do this if you trust the application in question.' ),
 					'<strong>' . esc_html( $app_name ) . '</strong>'
 				);
 				?>
 			</p>
 		<?php else : ?>
-			<p><?php _e( 'Would you like to give this application access to your account? You should only do this if you trust the app in question.' ); ?></p>
+			<p><?php _e( 'Would you like to give this application access to your account? You should only do this if you trust the application in question.' ); ?></p>
 		<?php endif; ?>
 
 		<?php
 		if ( is_multisite() ) {
 			$blogs       = get_blogs_of_user( $user->ID, true );
 			$blogs_count = count( $blogs );
+
 			if ( $blogs_count > 1 ) {
 				?>
 				<p>
 					<?php
-					printf(
+					/* translators: 1: URL to my-sites.php, 2: Number of sites the user has. */
+					$message = _n(
+						'This will grant access to <a href="%1$s">the %2$s site in this installation that you have permissions on</a>.',
+						'This will grant access to <a href="%1$s">all %2$s sites in this installation that you have permissions on</a>.',
+						$blogs_count
+					);
+
+					if ( is_super_admin() ) {
 						/* translators: 1: URL to my-sites.php, 2: Number of sites the user has. */
-						_n(
-							'This will grant access to <a href="%1$s">the %2$s site in this installation that you have permissions on</a>.',
-							'This will grant access to <a href="%1$s">all %2$s sites in this installation that you have permissions on</a>.',
+						$message = _n(
+							'This will grant access to <a href="%1$s">the %2$s site on the network as you have Super Admin rights</a>.',
+							'This will grant access to <a href="%1$s">all %2$s sites on the network as you have Super Admin rights</a>.',
 							$blogs_count
-						),
+						);
+					}
+
+					printf(
+						$message,
 						admin_url( 'my-sites.php' ),
 						number_format_i18n( $blogs_count )
 					);
@@ -224,7 +237,7 @@
 
 				<div class="form-field">
 					<label for="app_name"><?php _e( 'New Application Password Name' ); ?></label>
-					<input type="text" id="app_name" name="app_name" value="<?php echo esc_attr( $app_name ); ?>" placeholder="<?php esc_attr_e( 'WordPress App on My Phone' ); ?>" required />
+					<input type="text" id="app_name" name="app_name" value="<?php echo esc_attr( $app_name ); ?>" required />
 				</div>
 
 				<?php
@@ -247,7 +260,7 @@
 
 				<?php
 				submit_button(
-					__( 'Yes, I approve of this connection.' ),
+					__( 'Yes, I approve of this connection' ),
 					'primary',
 					'approve',
 					false,
@@ -262,7 +275,7 @@
 						printf(
 							/* translators: %s: The URL the user is being redirected to. */
 							__( 'You will be sent to %s' ),
-							'<strong><kbd>' . esc_html(
+							'<strong><code>' . esc_html(
 								add_query_arg(
 									array(
 										'site_url'   => site_url(),
@@ -271,7 +284,7 @@
 									),
 									$success_url
 								)
-							) . '</kbd></strong>'
+							) . '</code></strong>'
 						);
 					} else {
 						_e( 'You will be given a password to manually enter into the application in question.' );
@@ -281,7 +294,7 @@
 
 				<?php
 				submit_button(
-					__( 'No, I do not approve of this connection.' ),
+					__( 'No, I do not approve of this connection' ),
 					'secondary',
 					'reject',
 					false,
@@ -296,7 +309,7 @@
 						printf(
 							/* translators: %s: The URL the user is being redirected to. */
 							__( 'You will be sent to %s' ),
-							'<strong><kbd>' . esc_html( $reject_url ) . '</kbd></strong>'
+							'<strong><code>' . esc_html( $reject_url ) . '</code></strong>'
 						);
 					} else {
 						_e( 'You will be returned to the WordPress Dashboard, and no changes will be made.' );