Astra_Ext_Blog_Pro_Markup::enqueue_frontend_scripts()
Frontend scripts.
Description
Return
(void.)
Source
File: addons/blog-pro/classes/class-astra-ext-blog-pro-markup.php
public function enqueue_frontend_scripts() { $blog_pagination = astra_get_option( 'blog-pagination' ); /* Directory and Extension */ $file_prefix = '.min'; $dir_name = 'minified'; if ( SCRIPT_DEBUG ) { $file_prefix = ''; $dir_name = 'unminified'; } $js_gen_path = ASTRA_EXT_BLOG_PRO_URI . 'assets/js/' . $dir_name . '/'; $css_gen_path = ASTRA_EXT_BLOG_PRO_URI . 'assets/css/' . $dir_name . '/'; if ( astra_get_option( 'ast-auto-prev-post' ) && is_singular() ) { if ( SCRIPT_DEBUG ) { wp_enqueue_script( 'astra-scrollspy', $js_gen_path . 'scrollspy' . $file_prefix . '.js', array( 'jquery' ), ASTRA_EXT_VER, true ); wp_enqueue_script( 'astra-history', $js_gen_path . 'jquery-history' . $file_prefix . '.js', array( 'jquery' ), ASTRA_EXT_VER, true ); wp_enqueue_script( 'astra-single-infinite', $js_gen_path . 'single-infinite' . $file_prefix . '.js', array( 'astra-scrollspy' ), ASTRA_EXT_VER, true ); } else { wp_enqueue_script( 'astra-single-infinite', $js_gen_path . 'single-autopost-infinite.min.js', array( 'jquery' ), ASTRA_EXT_VER, true ); } } // Load infinite js only if option is used. if ( ( is_home() || is_archive() || is_search() ) && 'infinite' === $blog_pagination ) { wp_enqueue_script( 'astra-pagination-infinite', $js_gen_path . 'pagination-infinite' . $file_prefix . '.js', array( 'jquery', 'astra-addon-js' ), ASTRA_EXT_VER, true ); } }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
1.0 | Introduced. |