Code Duplication    Length = 13-18 lines in 2 locations

modules/likes.php 2 locations

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