BP_Core_Friends_Widget::update( array $new_instance, array $old_instance )
Process a widget save.
Description
Parameters
- $new_instance
-
(Required) The parameters saved by the user.
- $old_instance
-
(Required) The parameters as previously saved to the database.
Return
(array) $instance The processed settings to save.
Source
File: bp-friends/classes/class-bp-core-friends-widget.php
function update( $new_instance, $old_instance ) { $instance = $old_instance; $instance['max_friends'] = absint( $new_instance['max_friends'] ); $instance['friend_default'] = sanitize_text_field( $new_instance['friend_default'] ); $instance['link_title'] = (bool) $new_instance['link_title']; return $instance; }
Changelog
Version | Description |
---|---|
BuddyPress 1.9.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.