Changeset 56570 for trunk/src/wp-admin/authorize-application.php
- Timestamp:
- 09/14/2023 12:52:45 AM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/authorize-application.php
r53827 r56570 138 138 <h1><?php echo esc_html( $title ); ?></h1> 139 139 140 <?php if ( is_wp_error( $error ) ) : ?> 141 <div class="notice notice-error"><p><?php echo $error->get_error_message(); ?></p></div> 142 <?php endif; ?> 140 <?php 141 if ( is_wp_error( $error ) ) { 142 wp_admin_notice( 143 $error->get_error_message(), 144 array( 145 'type' => 'error', 146 ) 147 ); 148 } 149 ?> 143 150 144 151 <div class="card auth-app-card"> … … 195 202 ?> 196 203 197 <?php if ( $new_password ) : ?> 198 <div class="notice notice-success notice-alt below-h2"> 199 <p class="application-password-display"> 200 <label for="new-application-password-value"> 201 <?php 202 printf( 203 /* translators: %s: Application name. */ 204 esc_html__( 'Your new password for %s is:' ), 205 '<strong>' . esc_html( $app_name ) . '</strong>' 206 ); 207 ?> 208 </label> 209 <input id="new-application-password-value" type="text" class="code" readonly="readonly" value="<?php esc_attr( WP_Application_Passwords::chunk_password( $new_password ) ); ?>" /> 210 </p> 211 <p><?php _e( 'Be sure to save this in a safe location. You will not be able to retrieve it.' ); ?></p> 212 </div> 213 214 <?php 204 <?php 205 if ( $new_password ) : 206 $message = '<p class="application-password-display"> 207 <label for="new-application-password-value">' . sprintf( 208 /* translators: %s: Application name. */ 209 esc_html__( 'Your new password for %s is:' ), 210 '<strong>' . esc_html( $app_name ) . '</strong>' 211 ) . ' 212 </label> 213 <input id="new-application-password-value" type="text" class="code" readonly="readonly" value="' . esc_attr( WP_Application_Passwords::chunk_password( $new_password ) ) . '" /> 214 </p> 215 <p>' . __( 'Be sure to save this in a safe location. You will not be able to retrieve it.' ) . '</p>'; 216 $args = array( 217 'type' => 'success', 218 'additional_classes' => array( 'notice-alt', 'below-h2' ), 219 'paragraph_wrap' => false, 220 ); 221 wp_admin_notice( $message, $args ); 222 215 223 /** 216 224 * Fires in the Authorize Application Password new password section in the no-JS version. … … 227 235 */ 228 236 do_action( 'wp_authorize_application_password_form_approved_no_js', $new_password, $request, $user ); 237 else : 229 238 ?> 230 <?php else : ?>231 239 <form action="<?php echo esc_url( admin_url( 'authorize-application.php' ) ); ?>" method="post" class="form-wrap"> 232 240 <?php wp_nonce_field( 'authorize_application_password' ); ?>
Note: See TracChangeset
for help on using the changeset viewer.