?AlkantarClanX12

Your IP : 216.73.217.134


Current Path : /home/rankinh/villavanille/wp-content/themes/villa-vanille/inc/justified-gallery/
Upload File :
Current File : /home/rankinh/villavanille/wp-content/themes/villa-vanille/inc/justified-gallery/helper.php

<?php

if ( ! function_exists( 'drew_register_justified_gallery_scripts' ) ) {
	/**
	 * Function that register module 3rd party scripts
	 */
	function drew_register_justified_gallery_scripts() {
		wp_register_script( 'jquery-justified-gallery', DREW_INC_ROOT . '/justified-gallery/assets/js/plugins/jquery.justifiedGallery.min.js', array( 'jquery' ), true );
	}

	add_action( 'drew_action_before_main_js', 'drew_register_justified_gallery_scripts' );
}

if ( ! function_exists( 'drew_include_justified_gallery_scripts' ) ) {
	/**
	 * Function that enqueue modules 3rd party scripts
	 *
	 * @param array $atts
	 */
	function drew_include_justified_gallery_scripts( $atts ) {

		if ( isset( $atts['behavior'] ) && 'justified-gallery' === $atts['behavior'] ) {
			wp_enqueue_script( 'jquery-justified-gallery' );
		}
	}

	add_action( 'drew_core_action_list_shortcodes_load_assets', 'drew_include_justified_gallery_scripts' );
}

if ( ! function_exists( 'drew_register_justified_gallery_scripts_for_list_shortcodes' ) ) {
	/**
	 * Function that set module 3rd party scripts for list shortcodes
	 *
	 * @param array $scripts
	 *
	 * @return array
	 */
	function drew_register_justified_gallery_scripts_for_list_shortcodes( $scripts ) {

		$scripts['jquery-justified-gallery'] = array(
			'registered' => true,
		);

		return $scripts;
	}

	add_filter( 'drew_core_filter_register_list_shortcode_scripts', 'drew_register_justified_gallery_scripts_for_list_shortcodes' );
}