SilentComics /
Strip
| 1 | <?php |
||||||||||||
| 2 | /** |
||||||||||||
| 3 | * Jetpack Compatibility File |
||||||||||||
| 4 | * See: http://jetpack.me/ |
||||||||||||
| 5 | * |
||||||||||||
| 6 | * @package WordPress |
||||||||||||
| 7 | * @subpackage Strip |
||||||||||||
| 8 | */ |
||||||||||||
| 9 | |||||||||||||
| 10 | /** |
||||||||||||
| 11 | * Add theme support for Infinite Scroll. |
||||||||||||
| 12 | * See: http://jetpack.me/support/infinite-scroll/ |
||||||||||||
| 13 | */ |
||||||||||||
| 14 | function strip_infinite_scroll_setup() { |
||||||||||||
| 15 | add_theme_support('infinite-scroll', array( |
||||||||||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||||||||||
| 16 | 'container' => 'content', |
||||||||||||
| 17 | 'footer' => 'page', |
||||||||||||
| 18 | 'type' => 'scroll', |
||||||||||||
| 19 | 'footer_widgets' => false, |
||||||||||||
| 20 | 'container' => 'content', |
||||||||||||
| 21 | 'wrapper' => true, |
||||||||||||
| 22 | 'render' => false, |
||||||||||||
| 23 | 'posts_per_page' => false, |
||||||||||||
| 24 | )); |
||||||||||||
| 25 | } |
||||||||||||
| 26 | add_action( 'after_setup_theme', 'strip_infinite_scroll_setup' ); |
||||||||||||
|
0 ignored issues
–
show
The function
add_action was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||||||||
| 27 | |||||||||||||
| 28 | /** |
||||||||||||
| 29 | * Enables Jetpack's Infinite Scroll for home (blog), disables it in WooCommerce product archives |
||||||||||||
| 30 | * |
||||||||||||
| 31 | * @return bool |
||||||||||||
| 32 | * https://wordpress.org/support/topic/suppress-infinite-blog-with-woocommerce |
||||||||||||
| 33 | */ |
||||||||||||
| 34 | function strip_jetpack_infinite_scroll_supported() { |
||||||||||||
| 35 | return current_theme_supports( 'infinite-scroll' ) && ( is_admin() || is_home() || is_search() && ! is_post_type_archive( 'comic' ) ); |
||||||||||||
|
0 ignored issues
–
show
The function
current_theme_supports was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
The function
is_home was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
The function
is_post_type_archive was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
The function
is_admin was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
The function
is_search was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||||||||
| 36 | } |
||||||||||||
| 37 | add_filter( 'infinite_scroll_archive_supported', 'strip_jetpack_infinite_scroll_supported' ); |
||||||||||||
|
0 ignored issues
–
show
The function
add_filter was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||||||||
| 38 |