• Resolved Spudnic

    (@spudnic072)


    Just installed JetPack Slim : (its freaking awsome!).

    Im building a custom theme that is based off of twenty twelve and thankfully infinite scroll kicked in just perfectly simply by enabling the module and adding the theme support.

    BUT, I use a custom function on my index and archive to display the pagination. In that function I use wp_is_mobile() to decide whether or not to display the pagination.

    I want to modify the function so that I can tell if the infinite scroll is enabled.

    Is there a function that returns whether or not a module is enabled? Or is there a option i can get using something like get_option() that will do the same?

    Right now I am just hiding the pagination with conditional css, but I would rather not have to render it at all if the site is mobile and Infinite scroll is enabled. Thanks.

    https://www.ads-software.com/plugins/jetpack/

Viewing 1 replies (of 1 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    Is there a function that returns whether or not a module is enabled?

    You can use Jetpack::is_module_active( 'infinite-scroll' ) to detect whether Infinite Scroll is active or not, like so:

    if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'infinite-scroll' ) )
    		echo 'something';
Viewing 1 replies (of 1 total)
  • The topic ‘Is infinite scroll active?’ is closed to new replies.