Code Duplication    Length = 11-11 lines in 3 locations

modules/widgets/gallery.php 3 locations

@@ 182-192 (lines=11) @@
179
	 * @param array $instance The Widget instance to generate HTML for
180
	 * @return string String of HTML representing a rectangular gallery
181
	 */
182
	public function rectangular_widget( $args, $instance ) {
183
		if ( ! class_exists( 'Jetpack_Tiled_Gallery' )
184
			&& ! class_exists( 'Jetpack_Tiled_Gallery_Layout_Rectangular' ) ) {
185
			return;
186
		}
187
188
		Jetpack_Tiled_Gallery::default_scripts_and_styles();
189
190
		$layout = new Jetpack_Tiled_Gallery_Layout_Rectangular( $instance['attachments'], $instance['link'], false, 3 );
191
		return $layout->HTML();
192
	}
193
194
	/**
195
	 * Generate HTML for a square (grid style) Widget
@@ 201-211 (lines=11) @@
198
	 * @param array $instance The Widget instance to generate HTML for
199
	 * @return string String of HTML representing a square gallery
200
	 */
201
	public function square_widget( $args, $instance ) {
202
		if ( ! class_exists( 'Jetpack_Tiled_Gallery' )
203
			&& ! class_exists( 'Jetpack_Tiled_Gallery_Layout_Square' ) ) {
204
			return;
205
		}
206
207
		Jetpack_Tiled_Gallery::default_scripts_and_styles();
208
209
		$layout = new Jetpack_Tiled_Gallery_Layout_Square( $instance['attachments'], $instance['link'], false, 3 );
210
		return $layout->HTML();
211
	}
212
213
	/**
214
	 * Generate HTML for a circular (grid style) Widget
@@ 220-230 (lines=11) @@
217
	 * @param array $instance The Widget instance to generate HTML for
218
	 * @return string String of HTML representing a circular gallery
219
	 */
220
	public function circle_widget( $args, $instance ) {
221
		if ( ! class_exists( 'Jetpack_Tiled_Gallery' )
222
			&& ! class_exists( 'Jetpack_Tiled_Gallery_Layout_Circle' ) ) {
223
			return;
224
		}
225
226
		Jetpack_Tiled_Gallery::default_scripts_and_styles();
227
228
		$layout = new Jetpack_Tiled_Gallery_Layout_Circle( $instance['attachments'], $instance['link'], false, 3 );
229
		return $layout->HTML();
230
	}
231
232
	/**
233
	 * Generate HTML for a slideshow Widget