in_widget_form WordPress Action Hook

The in_widget_form hook is used to add extra fields to a widget form. This hook is fired when the widget is displayed in the admin interface.

do_action_ref_array( 'in_widget_form', WP_Widget $widget, null $return, array $instance ) #

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.


Top ↑

Parameters

$widget

(WP_Widget)The widget instance (passed by reference).

$return

(null)Return null if new fields are added.

$instance

(array)An array of the widget's settings.


Top ↑

Source

File: wp-includes/class-wp-widget.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.