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

Extends our update method.

Description

Parameters

$new_instance

(Required) New instance data.

$old_instance

(Required) Original instance data.

Return

(array)

Source

File: bp-groups/classes/class-bp-groups-widget.php

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

		$instance['title']         = strip_tags( $new_instance['title'] );
		$instance['max_groups']    = strip_tags( $new_instance['max_groups'] );
		$instance['group_default'] = strip_tags( $new_instance['group_default'] );
		$instance['link_title']    = (bool) $new_instance['link_title'];

		return $instance;
	}

Changelog

Changelog
Version Description
BuddyPress 1.0.3 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.