Code Duplication    Length = 13-18 lines in 2 locations

modules/likes.php 2 locations

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