WP HOOKS
akcjaod 5.8.0

rest_after_save_widget

Args 4Plik wp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Fires after a widget is created or updated via the REST API.

Parametry

ParametrTypOpis
$idstringID of the widget being saved.
$sidebar_idstringID of the sidebar containing the widget being saved.
$request\WP_REST_RequestRequest object.
$creatingboolTrue when creating a widget, false when updating.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'rest_after_save_widget', 'twoja_funkcja', 10, 4 );

function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
	// Twój kod
}

Popularne w tej kategorii