@@ 323-340 (lines=18) @@ | ||
320 | * @param String $post_type custom post type identifier |
|
321 | * @return bool |
|
322 | */ |
|
323 | function is_single_post_enabled( $post_type = 'post' ) { |
|
324 | $options = $this->get_options(); |
|
325 | return (bool) apply_filters( |
|
326 | /** |
|
327 | * Filters whether Likes should be enabled on single posts. |
|
328 | * |
|
329 | * The dynamic part of the filter, {$post_type}, allows you to specific the post type where Likes should be enabled. |
|
330 | * |
|
331 | * @module likes |
|
332 | * |
|
333 | * @since 2.2.0 |
|
334 | * |
|
335 | * @param bool $enabled Are Post Likes enabled on single posts? |
|
336 | */ |
|
337 | "wpl_is_single_{$post_type}_disabled", |
|
338 | (bool) in_array( $post_type, $options['show'] ) |
|
339 | ); |
|
340 | } |
|
341 | ||
342 | /** |
|
343 | * Get the 'disabled_likes' option from the DB of the current blog. |
|
@@ 410-422 (lines=13) @@ | ||
407 | * |
|
408 | * @return bool |
|
409 | */ |
|
410 | function is_single_page_enabled() { |
|
411 | $options = $this->get_options(); |
|
412 | /** |
|
413 | * Filters whether Likes should be enabled on single pages. |
|
414 | * |
|
415 | * @module likes |
|
416 | * |
|
417 | * @since 2.2.0 |
|
418 | * |
|
419 | * @param bool $enabled Are Post Likes enabled on single pages? |
|
420 | */ |
|
421 | return (bool) apply_filters( 'wpl_is_single_page_disabled', (bool) in_array( 'page', $options['show'] ) ); |
|
422 | } |
|
423 | ||
424 | /** |
|
425 | * Are Media Likes enabled on single pages? |