Use pluggable functions only around functions which cannot be unhooked (#1480)
This commit is contained in:
parent
d6ccb97e0b
commit
8852c27641
2 changed files with 99 additions and 99 deletions
|
@ -50,16 +50,18 @@ function _s_jetpack_setup() {
|
|||
}
|
||||
add_action( 'after_setup_theme', '_s_jetpack_setup' );
|
||||
|
||||
/**
|
||||
* Custom render function for Infinite Scroll.
|
||||
*/
|
||||
function _s_infinite_scroll_render() {
|
||||
while ( have_posts() ) {
|
||||
the_post();
|
||||
if ( is_search() ) :
|
||||
get_template_part( 'template-parts/content', 'search' );
|
||||
else :
|
||||
get_template_part( 'template-parts/content', get_post_type() );
|
||||
endif;
|
||||
if ( ! function_exists( '_s_infinite_scroll_render' ) ) :
|
||||
/**
|
||||
* Custom render function for Infinite Scroll.
|
||||
*/
|
||||
function _s_infinite_scroll_render() {
|
||||
while ( have_posts() ) {
|
||||
the_post();
|
||||
if ( is_search() ) :
|
||||
get_template_part( 'template-parts/content', 'search' );
|
||||
else :
|
||||
get_template_part( 'template-parts/content', get_post_type() );
|
||||
endif;
|
||||
}
|
||||
}
|
||||
}
|
||||
endif;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue