Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Enqueue Theme JS Files
- */
- add_action( 'wp_enqueue_scripts', 'arts_enqueue_js', 50 );
- function arts_enqueue_js() {
- // GSAP libraries
- $gsap_libraries_version = '3.12.2';
- $vendor_scripts_path = ARTS_THEME_URL . '/js/vendor/';
- wp_enqueue_script( 'gsap', $vendor_scripts_path . 'gsap.min.js', array(), $gsap_libraries_version, true );
- wp_enqueue_script( 'drawsvg-plugin', $vendor_scripts_path . 'DrawSVGPlugin.min.js', array( 'gsap' ), $gsap_libraries_version, true );
- wp_enqueue_script( 'morphsvg-plugin', $vendor_scripts_path . 'MorphSVGPlugin.min.js', array( 'gsap' ), $gsap_libraries_version, true );
- wp_enqueue_script( 'scroll-to-plugin', $vendor_scripts_path . 'ScrollToPlugin.min.js', array( 'gsap' ), $gsap_libraries_version, true );
- wp_enqueue_script( 'split-text', $vendor_scripts_path . 'SplitText.min.js', array( 'gsap' ), $gsap_libraries_version, true );
- wp_enqueue_script( 'scrolltrigger', $vendor_scripts_path . 'ScrollTrigger.min.js', array( 'gsap' ), $gsap_libraries_version, true );
- wp_enqueue_script( 'deepmerge', $vendor_scripts_path . 'deepmerge.min.js', array(), ARTS_THEME_VERSION, true );
- wp_enqueue_script( 'distribute-by-position', $vendor_scripts_path . 'distributeByPosition.js', array(), ARTS_THEME_VERSION, true );
- wp_enqueue_script( 'lazy-load', $vendor_scripts_path . 'lazyload.min.js', array(), ARTS_THEME_VERSION, true );
- wp_enqueue_script(
- 'asli-framework',
- ARTS_THEME_URL . '/js/framework.js',
- array(
- 'gsap',
- 'drawsvg-plugin',
- 'morphsvg-plugin',
- 'scroll-to-plugin',
- 'split-text',
- 'scrolltrigger',
- 'deepmerge',
- 'distribute-by-position',
- 'lazy-load',
- ),
- ARTS_THEME_VERSION,
- true
- );
- wp_enqueue_script( 'asli-app', ARTS_THEME_URL . '/js/app.js', array( 'asli-framework' ), ARTS_THEME_VERSION, true );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement