rest_add_application_passwords_to_index

The timeline below displays how wordpress function rest_add_application_passwords_to_index has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.6

/**
 * Adds Application Passwords info to the REST API index.
 *
 * @since 5.6.0
 *
 * @param WP_REST_Response $response The index response object.
 * @return WP_REST_Response
 */
function rest_add_application_passwords_to_index($response)
{
    if (!wp_is_application_passwords_available()) {
        return $response;
    }
    $response->data['authentication']['application-passwords'] = array('endpoints' => array('authorization' => admin_url('authorize-application.php')));
    return $response;
}