Inventory_Presser_Location_Address::update( array $new_instance, array $old_instance )
update
On This Page
Description Description
Saves the widget settings when a dashboard user clicks the Save button.
Parameters Parameters
- $new_instance
-
(array) (Required)
- $old_instance
-
(array) (Required)
Return Return
(array) The updated array full of settings
Source Source
File: includes/widget/class-widget-address.php
*/ public function update( $new_instance, $old_instance ) { $instance = array(); $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? wp_strip_all_tags( $new_instance['title'] ) : ''; $instance['cb_display'] = ( ! empty( $new_instance['cb_display'] ) ) ? $new_instance['cb_display'] : array(); $instance['cb_single_line'] = ( ! empty( $new_instance['cb_single_line'] ) ) ? $new_instance['cb_single_line'] : ''; return $instance;
Expand full source codeCollapse full source codeView on Github