WP_Widget::form() WordPress Method

The WP_Widget::form() method is used to display a form for a widget. The form is used to configure the widget settings.

WP_Widget::form( array $instance ) #

Outputs the settings update form.


Parameters

$instance

(array)(Required)Current settings.


Top ↑

Return

(string) Default return is 'noform'.


Top ↑

Source

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

	public function form( $instance ) {
		echo '<p class="no-options-widget">' . __( 'There are no options for this widget.' ) . '</p>';
		return 'noform';
	}


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.