A WordPress-centric search engine for devs and theme authors



rest_add_application_passwords_to_index ›

Since5.6.0
Deprecatedn/a
rest_add_application_passwords_to_index ( $response )
Parameters:
  • (WP_REST_Response) $response The index response object.
    Required: Yes
Returns:
  • (WP_REST_Response)
Defined at:
Codex:

Adds Application Passwords info to the REST API index.



Source

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;
}