Make WordPress Core

Ticket #53658: 53658.diff

File 53658.diff, 1.5 KB (added by johnbillion, 3 years ago)
  • src/wp-admin/user-edit.php

     
    733733
    734734        </table>
    735735
    736 
    737                 <?php if ( wp_is_application_passwords_available_for_user( $user_id ) ) : ?>
    738736        <div class="application-passwords hide-if-no-js" id="application-passwords-section">
    739737                <h2><?php _e( 'Application Passwords' ); ?></h2>
    740738                <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>
     739                <?php if ( false && wp_is_application_passwords_available_for_user( $user_id ) ) : ?>
    741740                        <?php
    742741                        if ( is_multisite() ) {
    743742                                $blogs       = get_blogs_of_user( $user_id, true );
     
    797796                        $application_passwords_list_table->display();
    798797                        ?>
    799798                </div>
     799                <?php else: ?>
     800                        <p><?php esc_html_e( 'The application password feature requires HTTPS, which is not enabled on this site.' ); ?></p>
     801                        <p><?php
     802                        printf(
     803                                __( 'If this is a development website you can <a href="%s" target="_blank">set the environment type accordingly</a> to enable application passwords.' ),
     804                                'https://wordpress.org/support/article/editing-wp-config-php/#wp_environment_type'
     805                        );
     806                        ?></p>
     807                <?php endif; ?>
    800808        </div>
    801 <?php endif; ?>
    802809
    803810                <?php
    804811                if ( IS_PROFILE_PAGE ) {