BP_Blogs_Recent_Posts_Widget::update( array $new_instance, array $old_instance )
Update the networkwide posts widget options.
Description Description
Parameters Parameters
- $new_instance
-
(Required) The new instance options.
- $old_instance
-
(Required) The old instance options.
Return Return
(array) $instance The parsed options to be saved.
Source Source
File: bp-blogs/classes/class-bp-blogs-recent-posts-widget.php
public function update( $new_instance, $old_instance ) { $instance = $old_instance; $max_limit = bp_get_widget_max_count_limit( __CLASS__ ); $instance['title'] = strip_tags( $new_instance['title'] ); $instance['max_posts'] = $new_instance['max_posts'] > $max_limit ? $max_limit : intval( $new_instance['max_posts'] ); $instance['link_title'] = ! empty( $new_instance['link_title'] ); return $instance; }