is_tablet(); } else if ( class_exists( 'Jetpack_User_Agent_Info' ) ) { $is_tablet = Jetpack_User_Agent_Info::is_tablet(); } else { $is_tablet = false; } if ( $is_tablet ) { // don't show the infinite scroll footer on tablet devices (infinite scroll will still work) $footer = false; } add_theme_support( 'infinite-scroll', array( 'container' => 'content', 'footer' => $footer, ) ); } add_action( 'after_setup_theme', 'breathe_infinite_scroll_setup' ); /** * Switch to 'click' method if is_mobile and sidebar-1 is active */ if ( function_exists( 'jetpack_is_mobile' ) ) { function breathe_has_footer_widgets() { if ( jetpack_is_mobile( '', true ) && is_active_sidebar( 'sidebar-1' ) ) return true; return false; } add_filter( 'infinite_scroll_has_footer_widgets', 'breathe_has_footer_widgets' ); } /** * Add theme support for o2. */ function breathe_o2_setup() { add_theme_support( 'o2', array( 'o2_enabled' => true, ) ); } add_action( 'after_setup_theme', 'breathe_o2_setup' );