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

@@ 113-123 (lines=11) @@
110
		return Jetpack_Options::get_option( 'id' );
111
	}
112
113
	private function is_set_up() {
114
		$option = get_option( self::$option_name );
115
		if ( ! $option ) {
116
			return false;
117
		}
118
		$data = json_decode( $option, true );
119
		if ( isset( $data['follower_list_id'], $data['follower_list_id'] ) ) {
120
			return true;
121
		}
122
		return false;
123
	}
124
125
	private function get_site_slug() {
126
		if ( class_exists( 'Jetpack' ) && method_exists( 'Jetpack', 'build_raw_urls' ) ) {