WP HOOKS
akcjareferencjaod 2.8.0

in_widget_form

Args 1Plik wp-includes/class-wp-widget.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Fires at the end of the widget control form.

Use this hook to add extra fields to the widget form. The hook is only fired if the value passed to the 'widget_form_callback' hook is not false. Note: If the widget has no form, the text echoed from the default form method can be hidden using CSS.

Parametry

ParametrTypOpis
$widget\WP_WidgetThe widget instance (passed by reference).
$returnnullReturn null if new fields are added.
$instancearrayAn array of the widget's settings.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_action( 'in_widget_form', 'twoja_funkcja' );

function twoja_funkcja($param_1) {
	// Twój kod
}

Popularne w tej kategorii