web/wp-content/plugins/caldera-forms/classes/render/assets.php
/**
	 * Enqueue a script for Caldera Forms front-end
	 *
	 * @since 1.5.0
	 *
	 * @param string $script Script slug or URL
	 * @param array $depts Optional. Array of dependencies. Default is jQuery
	 */
Enqueue a script for Caldera Forms front-end
@since 1.5.0

@param string $script Script slug or URL
@param array $depts Optional. Array of dependencies. Default is jQuery
Enqueue a script for Caldera Forms front - end @since 1 . 5 . 0 @param string $script Script slug or URL @param array $depts Optional . Array of dependencies . Default is jQuery
public static function enqueue_script( $script, $depts = array( 'jquery' ) ){
		if( in_array( $script, array( 'validator', self::make_slug( 'validator' ) ) ) ){
			$scripts = self::get_core_scripts();
			wp_enqueue_script( self::make_slug( 'validator' ), $scripts[ 'validator' ], array(), CFCORE_VER, false );
			if( ! self::should_minify() ){
				wp_enqueue_script( self::make_slug( 'validator-aria' ) );
			}
		}
		$slug = self::make_slug( $script );
		if ( ! wp_script_is( $slug, 'enqueued' ) && wp_script_is( $slug, 'registered' ) ) {
			self::$enqueued[ 'scripts' ][] = $slug;
			if (  ! empty( $depts)  && is_array( $depts ) && ! filter_var( $script, FILTER_VALIDATE_URL )  ) {
				wp_enqueue_script( $slug );
			} else {
				wp_enqueue_script( $slug, $script, $depts, CFCORE_VER, false );
			}
		}elseif ( wp_script_is( $script, 'registered' ) ) {
			self::$enqueued[ 'scripts' ][] = $slug;
			wp_enqueue_script( $slug );
		}
		if( Caldera_Forms::settings()->get_cdn()->combine() ){
			Caldera_Forms_CDN_Init::get_cdn()->add_to_combiner( $slug );
		}
	}
public static function enqueue_script ( $ script , $ depts = array ( 'jquery' ) ) { if ( in_array ( $ script , array ( 'validator' , self :: make_slug ( 'validator' ) ) ) ) { $ scripts = self :: get_core_scripts ( ) ; wp_enqueue_script ( self :: make_slug ( 'validator' ) , $ scripts [ 'validator' ] , array ( ) , CFCORE_VER , false ) ; if ( ! self :: should_minify ( ) ) { wp_enqueue_script ( self :: make_slug ( 'validator-aria' ) ) ; } } $ slug = self :: make_slug ( $ script ) ; if ( ! wp_script_is ( $ slug , 'enqueued' ) && wp_script_is ( $ slug , 'registered' ) ) { self :: $ enqueued [ 'scripts' ] [ ] = $ slug ; if ( ! empty ( $ depts ) && is_array ( $ depts ) && ! filter_var ( $ script , FILTER_VALIDATE_URL ) ) { wp_enqueue_script ( $ slug ) ; } else { wp_enqueue_script ( $ slug , $ script , $ depts , CFCORE_VER , false ) ; } } elseif ( wp_script_is ( $ script , 'registered' ) ) { self :: $ enqueued [ 'scripts' ] [ ] = $ slug ; wp_enqueue_script ( $ slug ) ; } if ( Caldera_Forms :: settings ( ) -> get_cdn ( ) -> combine ( ) ) { Caldera_Forms_CDN_Init :: get_cdn ( ) -> add_to_combiner ( $ slug ) ; } }
Enqueue a script for Caldera Forms front-end
 @since 1.5.0
Enqueue a script for Caldera Forms front - end @since 1 . 5 . 0