filtrod 5.6.0
rest_post_format_search_query
Args 2Plik wp-includes/rest-api/search/class-wp-rest-post-format-search-handler.phpDokumentacja WP ↗
Opis — z kodu źródłowego
Filters the query arguments for a REST API post format search request.
Enables adding extra arguments or setting defaults for a post format search request.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$query_args | array | Key value array of query var to query value. |
$request | \WP_REST_Request | The request used. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'rest_post_format_search_query', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'rest_post_format_search_query', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii