Code Duplication    Length = 13-18 lines in 2 locations

modules/likes.php 2 locations

@@ 1220-1237 (lines=18) @@
1217
	 * @param String $post_type custom post type identifier
1218
	 * @return bool
1219
	 */
1220
	function is_single_post_enabled( $post_type = 'post' ) {
1221
		$options = $this->get_options();
1222
		return (bool) apply_filters(
1223
			/**
1224
			 * Filters whether Likes should be enabled on single posts.
1225
			 *
1226
			 * The dynamic part of the filter, {$post_type}, allows you to specific the post type where Likes should be enabled.
1227
			 *
1228
			 * @module likes
1229
			 *
1230
			 * @since 2.2.0
1231
			 *
1232
			 * @param bool $enabled Are Post Likes enabled on single posts?
1233
			 */
1234
			"wpl_is_single_{$post_type}_disabled",
1235
			(bool) in_array( $post_type, $options['show'] )
1236
		);
1237
	}
1238
1239
	/**
1240
	 * Are Post Likes enabled on single pages?
@@ 1244-1256 (lines=13) @@
1241
	 *
1242
	 * @return bool
1243
	 */
1244
	function is_single_page_enabled() {
1245
		$options = $this->get_options();
1246
		/**
1247
		 * Filters whether Likes should be enabled on single pages.
1248
		 *
1249
		 * @module likes
1250
		 *
1251
		 * @since 2.2.0
1252
		 *
1253
		 * @param bool $enabled Are Post Likes enabled on single pages?
1254
		 */
1255
		return (bool) apply_filters( 'wpl_is_single_page_disabled', (bool) in_array( 'page', $options['show'] ) );
1256
	}
1257
1258
	/**
1259
	 * Are Media Likes enabled on single pages?