| @@ 1240-1257 (lines=18) @@ | ||
| 1237 | * @param String $post_type custom post type identifier | |
| 1238 | * @return bool | |
| 1239 | */ | |
| 1240 | 	function is_single_post_enabled( $post_type = 'post' ) { | |
| 1241 | $options = $this->get_options(); | |
| 1242 | return (bool) apply_filters( | |
| 1243 | /** | |
| 1244 | * Filters whether Likes should be enabled on single posts. | |
| 1245 | * | |
| 1246 | 			 * The dynamic part of the filter, {$post_type}, allows you to specific the post type where Likes should be enabled. | |
| 1247 | * | |
| 1248 | * @module likes | |
| 1249 | * | |
| 1250 | * @since 2.2.0 | |
| 1251 | * | |
| 1252 | * @param bool $enabled Are Post Likes enabled on single posts? | |
| 1253 | */ | |
| 1254 | 			"wpl_is_single_{$post_type}_disabled", | |
| 1255 | (bool) in_array( $post_type, $options['show'] ) | |
| 1256 | ); | |
| 1257 | } | |
| 1258 | ||
| 1259 | /** | |
| 1260 | * Are Post Likes enabled on single pages? | |
| @@ 1264-1276 (lines=13) @@ | ||
| 1261 | * | |
| 1262 | * @return bool | |
| 1263 | */ | |
| 1264 | 	function is_single_page_enabled() { | |
| 1265 | $options = $this->get_options(); | |
| 1266 | /** | |
| 1267 | * Filters whether Likes should be enabled on single pages. | |
| 1268 | * | |
| 1269 | * @module likes | |
| 1270 | * | |
| 1271 | * @since 2.2.0 | |
| 1272 | * | |
| 1273 | * @param bool $enabled Are Post Likes enabled on single pages? | |
| 1274 | */ | |
| 1275 | return (bool) apply_filters( 'wpl_is_single_page_disabled', (bool) in_array( 'page', $options['show'] ) ); | |
| 1276 | } | |
| 1277 | ||
| 1278 | /** | |
| 1279 | * Are Media Likes enabled on single pages? | |