WC_Widget_Brand_Nav::update()
Update function.
Method of the class: WC_Widget_Brand_Nav{}
No Hooks.
Return
Array
.
Usage
$WC_Widget_Brand_Nav = new WC_Widget_Brand_Nav(); $WC_Widget_Brand_Nav->update( $new_instance, $old_instance );
- $new_instance(array) (required)
- The new settings for the particular instance of the widget.
- $old_instance(array) (required)
- The old settings for the particular instance of the widget.
Notes
- See: WP_Widget->update
WC_Widget_Brand_Nav::update() WC Widget Brand Nav::update code WC 9.5.1
public function update( $new_instance, $old_instance ) { global $woocommerce; if ( empty( $new_instance['title'] ) ) { $new_instance['title'] = __( 'Brands', 'woocommerce' ); } $instance['title'] = wp_strip_all_tags( stripslashes( $new_instance['title'] ) ); $instance['display_type'] = stripslashes( $new_instance['display_type'] ); return $instance; }