filtrod 5.8.0
rest_prepare_widget_type
Args 3Plik wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.phpDokumentacja WP ↗
Opis — z kodu źródłowego
Filters the REST API response for a widget type.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$response | \WP_REST_Response | The response object. |
$widget_type | array | The array of widget data. |
$request | \WP_REST_Request | The request object. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'rest_prepare_widget_type', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'rest_prepare_widget_type', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii