Code Duplication    Length = 13-18 lines in 2 locations

modules/likes/jetpack-likes-settings.php 2 locations

@@ 349-366 (lines=18) @@
346
	 * @param String $post_type custom post type identifier
347
	 * @return bool
348
	 */
349
	function is_single_post_enabled( $post_type = 'post' ) {
350
		$options = $this->get_options();
351
		return (bool) apply_filters(
352
		/**
353
		 * Filters whether Likes should be enabled on single posts.
354
		 *
355
		 * The dynamic part of the filter, {$post_type}, allows you to specific the post type where Likes should be enabled.
356
		 *
357
		 * @module likes
358
		 *
359
		 * @since 2.2.0
360
		 *
361
		 * @param bool $enabled Are Post Likes enabled on single posts?
362
		 */
363
			"wpl_is_single_{$post_type}_disabled",
364
			(bool) in_array( $post_type, $options['show'] )
365
		);
366
	}
367
368
	/**
369
	 * Get the 'disabled_likes' option from the DB of the current blog.
@@ 436-448 (lines=13) @@
433
	 *
434
	 * @return bool
435
	 */
436
	function is_single_page_enabled() {
437
		$options = $this->get_options();
438
		/**
439
		 * Filters whether Likes should be enabled on single pages.
440
		 *
441
		 * @module likes
442
		 *
443
		 * @since 2.2.0
444
		 *
445
		 * @param bool $enabled Are Post Likes enabled on single pages?
446
		 */
447
		return (bool) apply_filters( 'wpl_is_single_page_disabled', (bool) in_array( 'page', $options['show'] ) );
448
	}
449
450
	/**
451
	 * Are Media Likes enabled on single pages?