2013-02-03 07:03:40 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2015-07-01 15:21:44 +00:00
|
|
|
* Jetpack Compatibility File.
|
|
|
|
*
|
|
|
|
* @link https://jetpack.me/
|
2013-02-03 07:03:40 +00:00
|
|
|
*
|
2013-02-25 07:15:14 +00:00
|
|
|
* @package _s
|
2013-02-03 07:03:40 +00:00
|
|
|
*/
|
|
|
|
|
2013-05-20 11:02:30 +00:00
|
|
|
function _s_jetpack_setup() {
|
2015-10-13 10:39:42 +00:00
|
|
|
/**
|
|
|
|
* Add theme support for Infinite Scroll.
|
|
|
|
* See: https://jetpack.me/support/infinite-scroll/
|
|
|
|
*/
|
2013-02-03 07:03:40 +00:00
|
|
|
add_theme_support( 'infinite-scroll', array(
|
2013-07-30 19:12:45 +00:00
|
|
|
'container' => 'main',
|
2015-04-29 01:42:12 +00:00
|
|
|
'render' => '_s_infinite_scroll_render',
|
2013-02-03 07:03:40 +00:00
|
|
|
'footer' => 'page',
|
|
|
|
) );
|
2015-10-13 10:39:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Add theme support for Responsive Videos.
|
|
|
|
* See: https://jetpack.me/support/responsive-videos/
|
|
|
|
*/
|
|
|
|
add_theme_support( 'jetpack-responsive-videos' );
|
2015-04-29 01:42:12 +00:00
|
|
|
} // end function _s_jetpack_setup
|
2013-05-20 11:02:30 +00:00
|
|
|
add_action( 'after_setup_theme', '_s_jetpack_setup' );
|
2015-04-29 01:42:12 +00:00
|
|
|
|
2015-05-27 17:49:01 +00:00
|
|
|
/**
|
|
|
|
* Custom render function for Infinite Scroll.
|
|
|
|
*/
|
2015-04-29 01:42:12 +00:00
|
|
|
function _s_infinite_scroll_render() {
|
|
|
|
while ( have_posts() ) {
|
|
|
|
the_post();
|
|
|
|
get_template_part( 'template-parts/content', get_post_format() );
|
|
|
|
}
|
2015-05-27 17:49:01 +00:00
|
|
|
} // end function _s_infinite_scroll_render
|