admin_url('admin-ajax.php'), 'sticky_enable' => get_theme_mod('buzznews_header_sticky_enable', 0) ); wp_localize_script('buzznews-custom', 'BUZZNEWS', $localize); wp_enqueue_script('buzznews-custom'); //ajax load if( is_home() || is_archive() || is_search() ){ global $wp_query; $args = array( 'nonce' => wp_create_nonce( 'buzznews-load-more-nonce' ), 'url' => admin_url( 'admin-ajax.php' ), 'query' => $wp_query->query, ); if(get_theme_mod('buzznews_infinite_scrolling')){ wp_enqueue_script( 'buzznews-load-more', get_template_directory_uri(). '/assets/js/load-more.js', array( 'jquery' ), BUZZNEWS_THEME_VERSION, true ); wp_localize_script( 'buzznews-load-more', 'buzznewsLoadMore', $args ); } } /** * comments replay js */ if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } // RTL support. wp_style_add_data( 'buzznews-trl-css', 'rtl', 'replace' ); } } new BuzzNews_Enqueue_Scripts(); }