Inventory_Presser_Location_Hours::update( array $new_instance, array $old_instance )

update

Description Description

Saves the widget settings when a dashboard user clicks the Save button.


Top ↑

Parameters Parameters

$new_instance

(array) (Required)

$old_instance

(array) (Required)


Top ↑

Return Return

(array) The updated array full of settings


Top ↑

Source Source

File: includes/widget/class-widget-hours.php

	public function update( $new_instance, $old_instance ) {
		$instance                  = array();
		$instance['title']         = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';
		$instance['cb_display']    = ( ! empty( $new_instance['cb_display'] ) ) ? $new_instance['cb_display'] : array();
		$instance['cb_title']      = ( ! empty( $new_instance['cb_title'] ) ) ? $new_instance['cb_title'] : array();
		$instance['cb_showclosed'] = ( ! empty( $new_instance['cb_showclosed'] ) ) ? $new_instance['cb_showclosed'] : '';
		return $instance;
	}