Code Duplication    Length = 11-12 lines in 2 locations

_inc/lib/core-api/class.jetpack-core-api-module-endpoints.php 1 location

@@ 1257-1268 (lines=12) @@
1254
	 *
1255
	 * @return bool Whether the widget is present in a given sidebar.
1256
	*/
1257
	static function has_business_address_widget( $sidebar ) {
1258
		$sidebars_widgets = get_option( 'sidebars_widgets', array() );
1259
		if ( ! isset( $sidebars_widgets[ $sidebar ] ) ) {
1260
			return false;
1261
		}
1262
		foreach ( $sidebars_widgets[ $sidebar ] as $widget ) {
1263
			if ( strpos( $widget, 'widget_contact_info' ) !== false ) {
1264
				return true;
1265
			}
1266
		}
1267
		return false;
1268
	}
1269
1270
	/**
1271
	 * Calls WPCOM through authenticated request to create, regenerate or delete the Post by Email address.

modules/shortcodes/email-subscribe.php 1 location

@@ 120-130 (lines=11) @@
117
		return Jetpack_Options::get_option( 'id' );
118
	}
119
120
	private function is_set_up() {
121
		$option = get_option( self::$option_name );
122
		if ( ! $option ) {
123
			return false;
124
		}
125
		$data = json_decode( $option, true );
126
		if ( isset( $data['follower_list_id'], $data['follower_list_id'] ) ) {
127
			return true;
128
		}
129
		return false;
130
	}
131
132
	private function get_site_slug() {
133
		if ( class_exists( 'Jetpack' ) && method_exists( 'Jetpack', 'build_raw_urls' ) ) {