Changeset 49109 for trunk/src/wp-admin/user-edit.php
- Timestamp:
- 10/08/2020 10:12:02 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/user-edit.php
r47808 r49109 27 27 28 28 wp_enqueue_script( 'user-profile' ); 29 30 if ( wp_is_application_passwords_available_for_user( $user_id ) ) { 31 wp_enqueue_script( 'application-passwords' ); 32 } 29 33 30 34 if ( IS_PROFILE_PAGE ) { … … 703 707 </table> 704 708 709 710 <?php if ( wp_is_application_passwords_available_for_user( $user_id ) ) : ?> 711 <div class="application-passwords hide-if-no-js" id="application-passwords-section"> 712 <h2><?php _e( 'Application Passwords' ); ?></h2> 713 <p><?php _e( 'Application passwords allow authentication via non-interactive systems, such as XML-RPC or the REST API, without providing your actual password. Application passwords can be easily revoked. They cannot be used for traditional logins to your website.' ); ?></p> 714 <div class="create-application-password"> 715 <label for="new_application_password_name" class="screen-reader-text"><?php _e( 'New Application Password Name' ); ?></label> 716 <input type="text" size="30" id="new_application_password_name" name="new_application_password_name" placeholder="<?php esc_attr_e( 'New Application Password Name' ); ?>" class="input" /> 717 718 <?php 719 /** 720 * Fires in the create Application Passwords form. 721 * 722 * @since 5.6.0 723 * 724 * @param WP_User $profileuser The current WP_User object. 725 */ 726 do_action( 'wp_create_application_password_form', $profileuser ); 727 ?> 728 729 <?php submit_button( __( 'Add New' ), 'secondary', 'do_new_application_password', false ); ?> 730 </div> 731 732 <div class="application-passwords-list-table-wrapper"> 733 <?php 734 $application_passwords_list_table = _get_list_table( 'WP_Application_Passwords_List_Table', array( 'screen' => 'application-passwords-user' ) ); 735 $application_passwords_list_table->prepare_items(); 736 $application_passwords_list_table->display(); 737 ?> 738 </div> 739 </div> 740 <?php endif; ?> 741 705 742 <?php 706 743 if ( IS_PROFILE_PAGE ) { … … 788 825 } 789 826 </script> 827 828 <?php if ( isset( $application_passwords_list_table ) ) : ?> 829 <script type="text/html" id="tmpl-new-application-password"> 830 <div class="notice notice-success is-dismissible new-application-password-notice" role="alert" tabindex="0"> 831 <p> 832 <?php 833 printf( 834 /* translators: 1: Application name, 2: Generated password. */ 835 esc_html__( 'Your new password for %1$s is: %2$s' ), 836 '<strong>{{ data.name }}</strong>', 837 '<kbd>{{ data.password }}</kbd>' 838 ); 839 ?> 840 </p> 841 <p><?php esc_attr_e( 'Be sure to save this in a safe location. You will not be able to retrieve it.' ); ?></p> 842 <button type="button" class="notice-dismiss"> 843 <span class="screen-reader-text"><?php __( 'Dismiss this notice.' ); ?></span> 844 </button> 845 </div> 846 </script> 847 848 <script type="text/html" id="tmpl-application-password-row"> 849 <?php $application_passwords_list_table->print_js_template_row(); ?> 850 </script> 851 <?php endif; ?> 790 852 <?php 791 853 require_once ABSPATH . 'wp-admin/admin-footer.php';
Note: See TracChangeset
for help on using the changeset viewer.