wp_is_application_passwords_supported example

<?php                                             /* translators: %s: User's display name. */
                                            printf( __( 'Log %s out of all locations.' )$profile_user->display_name );
                                            ?> </p> </td> </tr> <?php endif; ?> </table> <?php if ( wp_is_application_passwords_available_for_user( $user_id ) || ! wp_is_application_passwords_supported() ) : ?> <div class="application-passwords hide-if-no-js" id="application-passwords-section"> <h2><?php _e( 'Application Passwords' ); ?></h2> <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> <?php if ( wp_is_application_passwords_available_for_user( $user_id ) ) : ?> <?php                                 if ( is_multisite() ) :
                                    $blogs       = get_blogs_of_user( $user_id, true );
                                    $blogs_count = count( $blogs );

                                    if ( $blogs_count > 1 ) :
                                        ?>

function wp_is_application_passwords_available() {
    /** * Filters whether Application Passwords is available. * * @since 5.6.0 * * @param bool $available True if available, false otherwise. */
    return apply_filters( 'wp_is_application_passwords_available', wp_is_application_passwords_supported() );
}

/** * Checks if Application Passwords is available for a specific user. * * By default all users can use Application Passwords. Use {@see 'wp_is_application_passwords_available_for_user'} * to restrict availability to certain users. * * @since 5.6.0 * * @param int|WP_User $user The user to check. * @return bool */
Home | Imprint | This part of the site doesn't use cookies.