Code Duplication    Length = 15-15 lines in 3 locations

widgets/widget-woothemes-sensei-category-courses.php 1 location

@@ 90-104 (lines=15) @@
87
	 * @param  array $old_instance Previous settings.
88
	 * @return array               Updated settings.
89
	 */
90
	public function update ( $new_instance, $old_instance ) {
91
		$instance = $old_instance;
92
93
		/* Strip tags for title and name to remove HTML (important for text inputs). */
94
		$instance['title'] = strip_tags( $new_instance['title'] );
95
96
		/* The select box is returning a text value, so we escape it. */
97
		$instance['course_category'] = esc_attr( $new_instance['course_category'] );
98
99
		/* Strip tags for limit to remove HTML (important for text inputs). */
100
		$instance['limit'] = strip_tags( $new_instance['limit'] );
101
102
103
		return $instance;
104
	} // End update()
105
106
	/**
107
	 * The form on the widget control in the widget administration area.

widgets/widget-woothemes-sensei-lesson-component.php 1 location

@@ 97-111 (lines=15) @@
94
	 * @param  array $old_instance Previous settings.
95
	 * @return array               Updated settings.
96
	 */
97
	public function update ( $new_instance, $old_instance ) {
98
		$instance = $old_instance;
99
100
		/* Strip tags for title and name to remove HTML (important for text inputs). */
101
		$instance['title'] = strip_tags( $new_instance['title'] );
102
103
		/* The select box is returning a text value, so we escape it. */
104
		$instance['component'] = esc_attr( $new_instance['component'] );
105
106
		/* The select box is returning a text value, so we escape it. */
107
		$instance['limit'] = esc_attr( $new_instance['limit'] );
108
109
110
		return $instance;
111
	} // End update()
112
113
	/**
114
	 * The form on the widget control in the widget administration area.

widgets/widget-woothemes-sensei-course-component.php 1 location

@@ 112-126 (lines=15) @@
109
	 * @param  array $old_instance Previous settings.
110
	 * @return array               Updated settings.
111
	 */
112
	public function update ( $new_instance, $old_instance ) {
113
		$instance = $old_instance;
114
115
		/* Strip tags for title and name to remove HTML (important for text inputs). */
116
		$instance['title'] = strip_tags( $new_instance['title'] );
117
118
		/* The select box is returning a text value, so we escape it. */
119
		$instance['component'] = esc_attr( $new_instance['component'] );
120
121
		/* The select box is returning a text value, so we escape it. */
122
		$instance['limit'] = esc_attr( $new_instance['limit'] );
123
124
125
		return $instance;
126
	} // End update()
127
128
	/**
129
	 * The form on the widget control in the widget administration area.