the_widget хук-событиеWP 3.0.0

Fires before rendering the requested widget.

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

add_action( 'the_widget', 'wp_kama_the_widget_action', 10, 3 );

/**
 * Function for `the_widget` action-hook.
 * 
 * @param string $widget   The widget's class name.
 * @param array  $instance The current widget instance's settings.
 * @param array  $args     An array of the widget's sidebar arguments.
 *
 * @return void
 */
function wp_kama_the_widget_action( $widget, $instance, $args ){

	// action...
}
$widget(строка)
The widget's class name.
$instance(массив)
The current widget instance's settings.
$args(массив)
An array of the widget's sidebar arguments.

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

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

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

the_widget()
the_widget
wp-includes/widgets.php 1258
do_action( 'the_widget', $widget, $instance, $args );

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

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