On this page
rest_add_application_passwords_to_index( WP_REST_Response $response ): WP_REST_Response
Adds Application Passwords info to the REST API index.
Parameters
$responseWP_REST_Response Required-
The index response object.
Return
Source
File: wp-includes/rest-api.php. View all references
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;
}
Related
Uses
| Uses | Description |
|---|---|
| wp_is_application_passwords_available() wp-includes/user.php | Checks if Application Passwords is globally available. |
| admin_url() wp-includes/link-template.php | Retrieves the URL to the admin area for the current site. |
Changelog
| Version | Description |
|---|---|
| 5.6.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/rest_add_application_passwords_to_index