Reference › Hooks do_action_ref_array( 'in_widget_form' , WP_Widget $widget , null $return , array $instance )
Since 2.8.0 Description Parameters Fired at Source History Fires at the end of the widget control form.
Description 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.
Parameters
$widgetWP_Widget The widget instance (passed by reference).
$returnnull Return null if new fields are added.
$instancearray An array of the widget's settings. Fired at · 2 wp-includes/class-wp-widget.php:553WP_Widget::form_callback() wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php:581WP_REST_Widget_Types_Controller::get_widget_form() Source View on Trac ↗ View on GitHub ↗
547 <?php 548 * @since 2.8.0 549 * 550 * @param WP_Widget $widget The widget instance (passed by reference). 551 * @param null $return Return null if new fields are added. 552 * @param array $instance An array of the widget's settings. 553 */ 554 do_action_ref_array( 'in_widget_form', array( &$this, &$return, $instance ) ); 555 } 556 557 return $return; 558 } 559 560 /** History Introduced in 2.8.0 . One change between 6.7.7 and 7.1.0.
6.7.7 6.8.8 6.9.7 7.0.4 7.1.0 Signature, return type and hooks compared across 5 parsed releases.
7.0.4
Parameter $return retyped from null to null|string.verified against source
2.8.0
Introduced.from the docblock
About this page Parsed data Generated from the wordpress-develop 6.7.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. Corrections Something wrong on this page? Report it and it gets fixed in the next regeneration.