Skip to content

Commit 97eab6d

Browse files
Yoav Farhizinigor
authored andcommitted
shortcodes (audio/playlist/polldaddy): only enqueue jquery if archive supports infinite scroll
See Automattic#4496-wpcom See http://[private link] Merges r64889-wpcom.
1 parent 7a62c60 commit 97eab6d

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎modules/shortcodes/polldaddy.php‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,8 @@ function generate_scripts() {
334334
* If the theme uses infinite scroll, include jquery at the start
335335
*/
336336
function check_infinite() {
337-
if ( current_theme_supports( 'infinite-scroll' ) ) {
337+
if ( current_theme_supports( 'infinite-scroll' ) && class_exists( 'The_Neverending_Home_Page' ) && The_Neverending_Home_Page::archive_supports_infinity() )
338338
wp_enqueue_script( 'jquery' );
339-
}
340339
}
341340

342341
/**

0 commit comments

Comments
 (0)