BP_Blogs_Recent_Posts_Widget::update( array $new_instance, array $old_instance )
Update the networkwide posts 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-blogs/classes/class-bp-blogs-recent-posts-widget.php
public function update( $new_instance, $old_instance ) { $instance = $old_instance; $instance['title'] = strip_tags( $new_instance['title'] ); $instance['max_posts'] = strip_tags( $new_instance['max_posts'] ); $instance['link_title'] = (bool) $new_instance['link_title']; return $instance; }
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.