rest_add_application_passwords_to_index() WordPress Function

The rest_add_application_passwords_to_index() function allows you to add your application passwords to the index for your site. This is useful for sites that use multiple application passwords. This function will add your application passwords to the index for your site so that you can easily find them.

rest_add_application_passwords_to_index( WP_REST_Response $response ) #

Adds Application Passwords info to the REST API index.


Parameters

$response

(WP_REST_Response)(Required)The index response object.


Top ↑

Return

(WP_REST_Response)


Top ↑

Source

File: wp-includes/rest-api.php

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


Top ↑

Changelog

Changelog
VersionDescription
5.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More