BP_Core_Members_Widget::update( array $new_instance, array $old_instance )

Update the Members widget options.


Parameters Parameters

$new_instance

(array) (Required) The new instance options.

$old_instance

(array) (Required) The old instance options.


Top ↑

Return Return

(array) $instance The parsed options to be saved.


Source Source

File: bp-members/classes/class-bp-core-members-widget.php

	public function update( $new_instance, $old_instance ) {
		$instance = $old_instance;

		$max_limit = bp_get_widget_max_count_limit( __CLASS__ );

		$instance['title']          = strip_tags( $new_instance['title'] );
		$instance['max_members']    = $new_instance['max_members'] > $max_limit ? $max_limit : intval( $new_instance['max_members'] );
		$instance['member_default'] = strip_tags( $new_instance['member_default'] );
		$instance['link_title']	    = ! empty( $new_instance['link_title'] );

		return $instance;
	}


Top ↑

Changelog Changelog

Changelog
Version Description
1.0.3 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.