Changeset 56570 for trunk/src/wp-admin/user-edit.php
- Timestamp:
- 09/14/2023 12:52:45 AM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/user-edit.php
r56515 r56570 201 201 ?> 202 202 203 <?php if ( ! IS_PROFILE_PAGE && is_super_admin( $profile_user->ID ) && current_user_can( 'manage_network_options' ) ) : ?> 204 <div class="notice notice-info"><p><strong><?php _e( 'Important:' ); ?></strong> <?php _e( 'This user has super admin privileges.' ); ?></p></div> 205 <?php endif; ?> 206 207 <?php if ( isset( $_GET['updated'] ) ) : ?> 208 <div id="message" class="updated notice is-dismissible"> 209 <?php if ( IS_PROFILE_PAGE ) : ?> 210 <p><strong><?php _e( 'Profile updated.' ); ?></strong></p> 211 <?php else : ?> 212 <p><strong><?php _e( 'User updated.' ); ?></strong></p> 213 <?php endif; ?> 214 <?php if ( $wp_http_referer && ! str_contains( $wp_http_referer, 'user-new.php' ) && ! IS_PROFILE_PAGE ) : ?> 215 <p><a href="<?php echo esc_url( wp_validate_redirect( sanitize_url( $wp_http_referer ), self_admin_url( 'users.php' ) ) ); ?>"><?php _e( '← Go to Users' ); ?></a></p> 216 <?php endif; ?> 217 </div> 218 <?php endif; ?> 219 220 <?php if ( isset( $_GET['error'] ) ) : ?> 221 <div class="notice notice-error"> 222 <?php if ( 'new-email' === $_GET['error'] ) : ?> 223 <p><?php _e( 'Error while saving the new email address. Please try again.' ); ?></p> 224 <?php endif; ?> 225 </div> 226 <?php endif; ?> 227 228 <?php if ( isset( $errors ) && is_wp_error( $errors ) ) : ?> 203 <?php 204 if ( ! IS_PROFILE_PAGE && is_super_admin( $profile_user->ID ) && current_user_can( 'manage_network_options' ) ) : 205 $message = '<strong>' . __( 'Important:' ) . '</strong> ' . __( 'This user has super admin privileges.' ); 206 wp_admin_notice( 207 $message, 208 array( 209 'type' => 'info', 210 ) 211 ); 212 endif; 213 214 if ( isset( $_GET['updated'] ) ) : 215 if ( IS_PROFILE_PAGE ) : 216 $message = '<strong>' . __( 'Profile updated.' ) . '</strong>'; 217 else : 218 $message = '<strong>' . __( 'User updated.' ) . '</strong>'; 219 endif; 220 if ( $wp_http_referer && ! str_contains( $wp_http_referer, 'user-new.php' ) && ! IS_PROFILE_PAGE ) : 221 $message .= '<a href="' . esc_url( wp_validate_redirect( sanitize_url( $wp_http_referer ), self_admin_url( 'users.php' ) ) ) . '">' . __( '← Go to Users' ) . '</a>'; 222 endif; 223 wp_admin_notice( 224 $message, 225 array( 226 'id' => 'message', 227 'dismissible' => true, 228 'additional_classes' => array( 'updated' ), 229 ) 230 ); 231 endif; 232 233 if ( isset( $_GET['error'] ) ) : 234 $message = ''; 235 if ( 'new-email' === $_GET['error'] ) : 236 $message = __( 'Error while saving the new email address. Please try again.' ); 237 endif; 238 wp_admin_notice( 239 $message, 240 array( 241 'type' => 'error', 242 ) 243 ); 244 endif; 245 246 if ( isset( $errors ) && is_wp_error( $errors ) ) { 247 ?> 229 248 <div class="error"> 230 249 <p><?php echo implode( "</p>\n<p>", $errors->get_error_messages() ); ?></p> 231 250 </div> 232 <?php endif; ?> 251 <?php 252 } 253 ?> 233 254 234 255 <div class="wrap" id="profile-page"> … … 803 824 <button type="button" name="do_new_application_password" id="do_new_application_password" class="button button-secondary"><?php _e( 'Add New Application Password' ); ?></button> 804 825 </div> 805 <?php else : ?> 806 <div class="notice notice-error inline"> 807 <p><?php _e( 'Your website appears to use Basic Authentication, which is not currently compatible with Application Passwords.' ); ?></p> 808 </div> 809 <?php endif; ?> 826 <?php 827 else : 828 wp_admin_notice( 829 __( 'Your website appears to use Basic Authentication, which is not currently compatible with Application Passwords.' ), 830 array( 831 'type' => 'error', 832 'additional_classes' => array( 'inline' ), 833 ) 834 ); 835 endif; 836 ?> 810 837 811 838 <div class="application-passwords-list-table-wrapper">
Note: See TracChangeset
for help on using the changeset viewer.