Make WordPress Core


Ignore:
Timestamp:
04/07/2022 11:14:52 PM (5 years ago)
Author:
audrasjb
Message:

Application Passwords: Use a more appropriate helper text message for super-admins.

Previously, the helper text of the application password section was misleading for a Super Admin because an application password for a Super Admin grants access to all sites on the network, not just ones that they are a member of. This changeset provides a slightly different message for Super admin role.

Props johnbillion, rsiddharth, audrasjb.
Fixes #53234

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/authorize-application.php

    r51878 r53101  
    166166                                <p>
    167167                                        <?php
     168                                        /* translators: 1: URL to my-sites.php, 2: Number of sites the user has. */
     169                                        $msg_fmt  = _n(
     170                                                'This will grant access to <a href="%1$s">the %2$s site in this installation that you have permissions on</a>.',
     171                                                'This will grant access to <a href="%1$s">all %2$s sites in this installation that you have permissions on</a>.',
     172                                                $blogs_count
     173                                        );
     174                                        if ( is_super_admin() ) {
     175                                                $msg_fmt  = _n(
     176                                                        'This will grant access to <a href="%1$s">the %2$s site on the network as you have Super Admin rights</a>.',
     177                                                        'This will grant access to <a href="%1$s">all %2$s sites on the network as you have Super Admin rights</a>.',
     178                                                        $blogs_count
     179                                                );
     180                                        }
    168181                                        printf(
    169                                                 /* translators: 1: URL to my-sites.php, 2: Number of sites the user has. */
    170                                                 _n(
    171                                                         'This will grant access to <a href="%1$s">the %2$s site in this installation that you have permissions on</a>.',
    172                                                         'This will grant access to <a href="%1$s">all %2$s sites in this installation that you have permissions on</a>.',
    173                                                         $blogs_count
    174                                                 ),
     182                                                $msg_fmt,
    175183                                                admin_url( 'my-sites.php' ),
    176184                                                number_format_i18n( $blogs_count )
Note: See TracChangeset for help on using the changeset viewer.