Filter hook 'application_password_is_api_request'

in WP Core File wp-includes/user.php at line 398

View Source

application_password_is_api_request

Filter Hook
Description
Filters whether this is an API request that Application Passwords can be used on. By default, Application Passwords is available for the REST API and XML-RPC.

Hook Information

File Location wp-includes/user.php View on GitHub
Hook Type Filter
Line Number 398

Hook Parameters

Type Name Description
bool $is_api_request If this is an acceptable API request.

Usage Examples

Basic Usage
<?php
// Hook into application_password_is_api_request
add_filter('application_password_is_api_request', 'my_custom_filter', 10, 1);

function my_custom_filter($is_api_request) {
    // Your custom filtering logic here
    return $is_api_request;
}

Source Code Context

wp-includes/user.php:398 - How this hook is used in WordPress core
<?php
 393  	 *
 394  	 * @since 5.6.0
 395  	 *
 396  	 * @param bool $is_api_request If this is an acceptable API request.
 397  	 */
 398  	$is_api_request = apply_filters( 'application_password_is_api_request', $is_api_request );
 399  
 400  	if ( ! $is_api_request ) {
 401  		return $input_user;
 402  	}
 403  

PHP Documentation

<?php
/**
	 * Filters whether this is an API request that Application Passwords can be used on.
	 *
	 * By default, Application Passwords is available for the REST API and XML-RPC.
	 *
	 * @since 5.6.0
	 *
	 * @param bool $is_api_request If this is an acceptable API request.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/user.php
Related Hooks

Related hooks will be displayed here in future updates.