|
@@ 481-485 (lines=5) @@
|
| 478 |
|
$global_options = $sharer->get_global_options(); |
| 479 |
|
|
| 480 |
|
$enqueue = false; |
| 481 |
|
if ( is_singular() && in_array( get_post_type(), $global_options['show'] ) ) { |
| 482 |
|
$enqueue = true; |
| 483 |
|
} elseif ( in_array( 'index', $global_options['show'] ) && ( is_home() || is_front_page() || is_archive() || is_search() || in_array( get_post_type(), $global_options['show'] ) ) ) { |
| 484 |
|
$enqueue = true; |
| 485 |
|
} |
| 486 |
|
|
| 487 |
|
/** |
| 488 |
|
* Filter to decide when sharing scripts should be enqueued. |
|
@@ 624-630 (lines=7) @@
|
| 621 |
|
$global = $sharer->get_global_options(); |
| 622 |
|
|
| 623 |
|
$show = false; |
| 624 |
|
if ( !is_feed() ) { |
| 625 |
|
if ( is_singular() && in_array( get_post_type(), $global['show'] ) ) { |
| 626 |
|
$show = true; |
| 627 |
|
} elseif ( in_array( 'index', $global['show'] ) && ( is_home() || is_front_page() || is_archive() || is_search() || in_array( get_post_type(), $global['show'] ) ) ) { |
| 628 |
|
$show = true; |
| 629 |
|
} |
| 630 |
|
} |
| 631 |
|
|
| 632 |
|
/** |
| 633 |
|
* Filter to decide if sharing buttons should be displayed. |