Code Duplication    Length = 15-15 lines in 2 locations

modules/widgets/image-widget.php 1 location

@@ 21-35 (lines=15) @@
18
	/**
19
	* Register widget with WordPress.
20
	*/
21
	public function __construct() {
22
		parent::__construct(
23
			'image',
24
			/** This filter is documented in modules/widgets/facebook-likebox.php */
25
			apply_filters( 'jetpack_widget_name', esc_html__( 'Image', 'jetpack' ) ),
26
			array(
27
				'classname' => 'widget_image',
28
				'description' => __( 'Display an image in your sidebar', 'jetpack' )
29
			)
30
		);
31
32
		if ( is_active_widget( false, false, $this->id_base ) || is_active_widget( false, false, 'monster' ) ) {
33
			add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_style' ) );
34
		}
35
	}
36
37
	/**
38
	* Loads file for front-end widget style.

modules/widgets/twitter-timeline.php 1 location

@@ 21-35 (lines=15) @@
18
	/**
19
	* Register widget with WordPress.
20
	*/
21
	public function __construct() {
22
		parent::__construct(
23
			'twitter_timeline',
24
			/** This filter is documented in modules/widgets/facebook-likebox.php */
25
			apply_filters( 'jetpack_widget_name', esc_html__( 'Twitter Timeline', 'jetpack' ) ),
26
			array(
27
				'classname' => 'widget_twitter_timeline',
28
				'description' => __( 'Display an official Twitter Embedded Timeline widget.', 'jetpack' )
29
			)
30
		);
31
32
		if ( is_active_widget( false, false, $this->id_base ) || is_active_widget( false, false, 'monster' ) ) {
33
			add_action( 'wp_footer', array( $this, 'library' ) );
34
		}
35
	}
36
37
	/**
38
	 * Enqueue Twitter's widget library