WP_Widget_Recent_Comments::form

Advertisement

Summery Summery

Outputs the settings form for the Recent Comments widget.

Syntax Syntax

WP_Widget_Recent_Comments::form( array $instance )

Parameters Parameters

$instance

(Required) Current settings.

Source Source

File: wp-includes/widgets/class-wp-widget-recent-comments.php

	 * @return array Updated settings to save.
	 */
	public function update( $new_instance, $old_instance ) {
		$instance           = $old_instance;
		$instance['title']  = sanitize_text_field( $new_instance['title'] );
		$instance['number'] = absint( $new_instance['number'] );
		return $instance;
	}

	/**
	 * Outputs the settings form for the Recent Comments widget.

Advertisement

Changelog Changelog

Changelog
Version Description
2.8.0 Introduced.

Advertisement

Leave a Reply