Astra_Ext_Sticky_Header_Markup::add_scripts()
Add Scripts Callback
Description
Source
File: addons/sticky-header/classes/class-astra-ext-sticky-header-markup.php
public function add_scripts() { /*** Start Path Logic */ /* Define Variables */ $uri = ASTRA_EXT_STICKY_HEADER_URI . 'assets/js/'; $path = ASTRA_EXT_STICKY_HEADER_DIR . 'assets/js/'; /* Directory and Extension */ $file_prefix = '.min'; $dir_name = 'minified'; if ( SCRIPT_DEBUG ) { $file_prefix = ''; $dir_name = 'unminified'; } $js_uri = $uri . $dir_name . '/'; $js_dir = $path . $dir_name . '/'; if ( defined( 'ASTRA_THEME_HTTP2' ) && ASTRA_THEME_HTTP2 ) { $gen_path = $js_uri; } else { $gen_path = $js_dir; } /*** End Path Logic */ Astra_Minify::add_dependent_js( 'jquery' ); if ( version_compare( '1.0.17', ASTRA_THEME_VERSION ) > -1 ) { Astra_Minify::add_js( $gen_path . 'sticky-header-compatibility' . $file_prefix . '.js' ); } Astra_Minify::add_js( $gen_path . 'sticky-header' . $file_prefix . '.js' ); }
Expand full source code Collapse full source code View on Trac