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

Update the widget settings.

Description

Parameters

$new_instance

(Required) The new instance settings.

$old_instance

(Required) The old instance settings.

Return

(array) The widget settings.

Source

File: bp-templates/bp-nouveau/includes/activity/widgets.php

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

		$instance['title'] = strip_tags( $new_instance['title'] );
		$instance['max']   = 5;
		if ( ! empty( $new_instance['max'] ) ) {
			$instance['max'] = $new_instance['max'];
		}

		$instance['type'] = maybe_serialize( array( 'activity_update' ) );
		if ( ! empty( $new_instance['type'] ) ) {
			$instance['type'] = maybe_serialize( $new_instance['type'] );
		}

		return $instance;
	}

Changelog

Changelog
Version Description
BuddyPress 3.0.0 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.