AP_Questions_Widget::update( array $new_instance, array $old_instance )
Description #
Update widget form.
Parameters #
- $new_instancearray (Required) New data.
- $old_instancearray (Required) Old data.
Source #
File: widgets/questions.php
162 163 164 165 166 167 168 169 170 171 172 | public function update( $new_instance , $old_instance ) { $instance = array (); $instance [ 'title' ] = ( ! empty ( $new_instance [ 'title' ] ) ) ? wp_strip_all_tags( $new_instance [ 'title' ] ) : '' ; $instance [ 'avatar' ] = ( ! empty ( $new_instance [ 'avatar' ] ) ) ? wp_strip_all_tags( $new_instance [ 'avatar' ] ) : '' ; $instance [ 'order_by' ] = ( ! empty ( $new_instance [ 'order_by' ] ) ) ? wp_strip_all_tags( $new_instance [ 'order_by' ] ) : '' ; $instance [ 'limit' ] = ( ! empty ( $new_instance [ 'limit' ] ) ) ? wp_strip_all_tags( $new_instance [ 'limit' ] ) : 5; $instance [ 'category_ids' ] = ( ! empty ( $new_instance [ 'category_ids' ] ) ) ? wp_strip_all_tags( $new_instance [ 'category_ids' ] ) : '' ; return $instance ; } |
Expand full source code Collapse full source code View on GitHub: widgets/questions.php:162
Add your comment