|
@@ 637-643 (lines=7) @@
|
| 634 |
|
$global = $sharer->get_global_options(); |
| 635 |
|
|
| 636 |
|
$show = false; |
| 637 |
|
if ( !is_feed() ) { |
| 638 |
|
if ( is_singular() && in_array( get_post_type(), $global['show'] ) ) { |
| 639 |
|
$show = true; |
| 640 |
|
} elseif ( in_array( 'index', $global['show'] ) && ( is_home() || is_front_page() || is_archive() || is_search() || in_array( get_post_type(), $global['show'] ) ) ) { |
| 641 |
|
$show = true; |
| 642 |
|
} |
| 643 |
|
} |
| 644 |
|
|
| 645 |
|
/** |
| 646 |
|
* Filter to decide if sharing buttons should be displayed. |
|
@@ 490-494 (lines=5) @@
|
| 487 |
|
$global_options = $sharer->get_global_options(); |
| 488 |
|
|
| 489 |
|
$enqueue = false; |
| 490 |
|
if ( is_singular() && in_array( get_post_type(), $global_options['show'] ) ) { |
| 491 |
|
$enqueue = true; |
| 492 |
|
} elseif ( in_array( 'index', $global_options['show'] ) && ( is_home() || is_front_page() || is_archive() || is_search() || in_array( get_post_type(), $global_options['show'] ) ) ) { |
| 493 |
|
$enqueue = true; |
| 494 |
|
} |
| 495 |
|
|
| 496 |
|
/** |
| 497 |
|
* Filter to decide when sharing scripts should be enqueued. |