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

Update the widget settings.


Parameters Parameters

$new_instance

(array) (Required) The new instance settings.

$old_instance

(array) (Required) The old instance settings.


Top ↑

Return Return

(array) The widget settings.


Source 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;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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