WP_Widget_RSS::form() WordPress Method

The WP_Widget_RSS::form() method is used to display the RSS widget options form in the Wordpress admin. This form allows the user to specify the RSS feed URL and other options for the widget.

WP_Widget_RSS::form( array $instance ) #

Outputs the settings form for the RSS widget.


Parameters

$instance

(array)(Required)Current settings.


Top ↑

Source

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

	public function form( $instance ) {
		if ( empty( $instance ) ) {
			$instance = array(
				'title'        => '',
				'url'          => '',
				'items'        => 10,
				'error'        => false,
				'show_summary' => 0,
				'show_author'  => 0,
				'show_date'    => 0,
			);
		}
		$instance['number'] = $this->number;

		wp_widget_rss_form( $instance );
	}


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.