Make WordPress Core

Changeset 51463


Ignore:
Timestamp:
07/19/2021 09:13:36 PM (6 months ago)
Author:
johnbillion
Message:

Application Passwords: Improve various user-facing and developer-facing terminology.

Fixes #53503, #53691

Location:
trunk
Files:
5 edited

Legend:

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

    r50932 r51463  
    9191if ( wp_is_site_protected_by_basic_auth( 'front' ) ) {
    9292    wp_die(
    93         __( 'Your website appears to use Basic Authentication, which is not currently compatible with Application Passwords.' ),
     93        __( 'Your website appears to use Basic Authentication, which is not currently compatible with application passwords.' ),
    9494        __( 'Cannot Authorize Application' ),
    9595        array(
     
    148148                printf(
    149149                    /* translators: %s: Application name. */
    150                     __( '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.' ),
     150                    __( '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.' ),
    151151                    '<strong>' . esc_html( $app_name ) . '</strong>'
    152152                );
     
    154154            </p>
    155155        <?php else : ?>
    156             <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>
     156            <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>
    157157        <?php endif; ?>
    158158
     
    248248                <?php
    249249                submit_button(
    250                     __( 'Yes, I approve of this connection.' ),
     250                    __( 'Yes, I approve of this connection' ),
    251251                    'primary',
    252252                    'approve',
     
    263263                            /* translators: %s: The URL the user is being redirected to. */
    264264                            __( 'You will be sent to %s' ),
    265                             '<strong><kbd>' . esc_html(
     265                            '<strong><code>' . esc_html(
    266266                                add_query_arg(
    267267                                    array(
     
    272272                                    $success_url
    273273                                )
    274                             ) . '</kbd></strong>'
     274                            ) . '</code></strong>'
    275275                        );
    276276                    } else {
     
    282282                <?php
    283283                submit_button(
    284                     __( 'No, I do not approve of this connection.' ),
     284                    __( 'No, I do not approve of this connection' ),
    285285                    'secondary',
    286286                    'reject',
     
    297297                            /* translators: %s: The URL the user is being redirected to. */
    298298                            __( 'You will be sent to %s' ),
    299                             '<strong><kbd>' . esc_html( $reject_url ) . '</kbd></strong>'
     299                            '<strong><code>' . esc_html( $reject_url ) . '</code></strong>'
    300300                        );
    301301                    } else {
  • trunk/src/wp-admin/includes/user.php

    r50981 r51463  
    605605 *
    606606 *     @type string $app_name    The suggested name of the application.
    607  *     @type string $app_id      A uuid provided by the application to uniquely identify it.
    608  *     @type string $success_url The url the user will be redirected to after approving the application.
    609  *     @type string $reject_url  The url the user will be redirected to after rejecting the application.
     607 *     @type string $app_id      A UUID provided by the application to uniquely identify it.
     608 *     @type string $success_url The URL the user will be redirected to after approving the application.
     609 *     @type string $reject_url  The URL the user will be redirected to after rejecting the application.
    610610 * }
    611611 * @param WP_User $user The user authorizing the application.
     
    621621            $error->add(
    622622                'invalid_redirect_scheme',
    623                 __( 'The success url must be served over a secure connection.' )
     623                __( 'The success URL must be served over a secure connection.' )
    624624            );
    625625        }
     
    632632            $error->add(
    633633                'invalid_redirect_scheme',
    634                 __( 'The rejection url must be served over a secure connection.' )
     634                __( 'The rejection URL must be served over a secure connection.' )
    635635            );
    636636        }
     
    640640        $error->add(
    641641            'invalid_app_id',
    642             __( 'The app id must be a uuid.' )
     642            __( 'The application ID must be a UUID.' )
    643643        );
    644644    }
  • trunk/src/wp-includes/class-wp-application-passwords.php

    r50057 r51463  
    152152
    153153    /**
    154      * Gets a user's application password with the given uuid.
    155      *
    156      * @since 5.6.0
    157      *
    158      * @param int    $user_id User ID.
    159      * @param string $uuid    The password's uuid.
     154     * Gets a user's application password with the given UUID.
     155     *
     156     * @since 5.6.0
     157     *
     158     * @param int    $user_id User ID.
     159     * @param string $uuid    The password's UUID.
    160160     * @return array|null The application password if found, null otherwise.
    161161     */
     
    199199     *
    200200     * @param int    $user_id User ID.
    201      * @param string $uuid    The password's uuid.
     201     * @param string $uuid    The password's UUID.
    202202     * @param array  $update  Information about the application password to update.
    203203     * @return true|WP_Error True if successful, otherwise a WP_Error instance is returned on error.
     
    253253     *
    254254     * @param int    $user_id User ID.
    255      * @param string $uuid    The password's uuid.
     255     * @param string $uuid    The password's UUID.
    256256     * @return true|WP_Error True if the usage was recorded, a WP_Error if an error occurs.
    257257     */
     
    291291     *
    292292     * @param int    $user_id User ID.
    293      * @param string $uuid    The password's uuid.
     293     * @param string $uuid    The password's UUID.
    294294     * @return true|WP_Error Whether the password was successfully found and deleted, a WP_Error otherwise.
    295295     */
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php

    r51000 r51463  
    492492            return new WP_Error(
    493493                'rest_cannot_introspect_app_password_for_non_authenticated_user',
    494                 __( 'The authenticated Application Password can only be introspected for the current user.' ),
     494                __( 'The authenticated application password can only be introspected for the current user.' ),
    495495                array( 'status' => rest_authorization_required_code() )
    496496            );
     
    520520            return new WP_Error(
    521521                'rest_no_authenticated_app_password',
    522                 __( 'Cannot introspect Application Password.' ),
     522                __( 'Cannot introspect application password.' ),
    523523                array( 'status' => 404 )
    524524            );
     
    789789                ),
    790790                'app_id'    => array(
    791                     'description' => __( 'A uuid provided by the application to uniquely identify it. It is recommended to use an UUID v5 with the URL or DNS namespace.' ),
     791                    'description' => __( 'A UUID provided by the application to uniquely identify it. It is recommended to use an UUID v5 with the URL or DNS namespace.' ),
    792792                    'type'        => 'string',
    793793                    'format'      => 'uuid',
  • trunk/tests/qunit/fixtures/wp-api-generated.js

    r51351 r51463  
    57815781                    "args": {
    57825782                        "app_id": {
    5783                             "description": "A uuid provided by the application to uniquely identify it. It is recommended to use an UUID v5 with the URL or DNS namespace.",
     5783                            "description": "A UUID provided by the application to uniquely identify it. It is recommended to use an UUID v5 with the URL or DNS namespace.",
    57845784                            "type": "string",
    57855785                            "format": "uuid",
     
    58655865                    "args": {
    58665866                        "app_id": {
    5867                             "description": "A uuid provided by the application to uniquely identify it. It is recommended to use an UUID v5 with the URL or DNS namespace.",
     5867                            "description": "A UUID provided by the application to uniquely identify it. It is recommended to use an UUID v5 with the URL or DNS namespace.",
    58685868                            "type": "string",
    58695869                            "format": "uuid",
Note: See TracChangeset for help on using the changeset viewer.