rest_pre_insert_application_password хук-фильтрWP 5.6.0

Filters an application password before it is inserted via the REST API.

Использование

add_filter( 'rest_pre_insert_application_password', 'wp_kama_rest_pre_insert_application_password_filter', 10, 2 );

/**
 * Function for `rest_pre_insert_application_password` filter-hook.
 * 
 * @param stdClass        $prepared An object representing a single application password prepared for inserting or updating the database.
 * @param WP_REST_Request $request  Request object.
 *
 * @return stdClass
 */
function wp_kama_rest_pre_insert_application_password_filter( $prepared, $request ){

	// filter...
	return $prepared;
}
$prepared(stdClass)
An object representing a single application password prepared for inserting or updating the database.
$request(WP_REST_Request)
Request object.

Список изменений

С версии 5.6.0 Введена.

Где вызывается хук

WP_REST_Application_Passwords_Controller::prepare_item_for_database()
rest_pre_insert_application_password
wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php 594
return apply_filters( 'rest_pre_insert_application_password', $prepared, $request );

Где используется хук в WordPress

Использование не найдено.