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

Sanitize widget form values as they are saved.


Description Description

See also See also


Top ↑

Parameters Parameters

$new_instance

(array) (Required) Values just sent to be saved.

$old_instance

(array) (Required) Previously saved values from database.


Top ↑

Return Return

(array) Updated safe values to be saved.


Top ↑

Source Source

File: includes/widgets/class.llms.widget.course.syllabus.php

	public function update( $new_instance, $old_instance ) {

		$instance = parent::update( $new_instance, $old_instance );

		$instance['collapse'] = ( ! empty( $new_instance['collapse'] ) ) ? 1 : 0;
		$instance['toggles']  = ( ! empty( $new_instance['toggles'] ) ) ? 1 : 0;

		return $instance;
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.