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

Update the Members widget options.

Description

Parameters

$new_instance

(Required) The new instance options.

$old_instance

(Required) The old instance options.

Return

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

Source

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

221
222
223
224
225
226
227
228
229
230
public function update( $new_instance, $old_instance ) {
    $instance = $old_instance;
 
    $instance['title']          = strip_tags( $new_instance['title'] );
    $instance['max_members']    = strip_tags( $new_instance['max_members'] );
    $instance['member_default'] = strip_tags( $new_instance['member_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.