web/wp-content/plugins/caldera-forms/classes/admin/assets.php
/**
	 * Enqueue scripts and styles used in main admin and in form editor
	 *
	 * @since 1.5.0
	 */
Enqueue scripts and styles used in main admin and in form editor
@since 1.5.0
Enqueue scripts and styles used in main admin and in form editor @since 1 . 5 . 0
public static function admin_common(){
		self::maybe_register_all_admin();
		Caldera_Forms_Render_Assets::maybe_register();
		Caldera_Forms_Render_Assets::enqueue_script( 'validator' );
		$locale = get_locale();
		if( $locale !== 'en_US' ){
			Caldera_Forms_Render_Assets::enqueue_validator_i18n();
		}
		Caldera_Forms_Render_Assets::enqueue_style( 'grid' );
		self::enqueue_style( 'admin' );
		$data = array(
			'adminAjax' => esc_url_raw( admin_url( 'admin-ajax.php' ) ),
			'rest' => array(
				'root' => esc_url_raw( Caldera_Forms_API_Util::url() ),
				'nonce' => Caldera_Forms_API_Util::get_core_nonce()
			)
		);
		if( Caldera_Forms_Admin::is_edit( ) ){
			$form_id = trim( $_GET[ Caldera_Forms_Admin::EDIT_KEY ] );
			$data[ 'rest' ][ 'form' ] = esc_url_raw( Caldera_Forms_API_Util::url( 'forms/' . $form_id, true ) );
			$data[ 'rest' ][ 'revisions' ] = esc_url_raw( Caldera_Forms_API_Util::url( 'forms/' . $form_id . '/revisions', true ) );
		}
		wp_localize_script( self::slug( 'admin' ), 'CF_ADMIN', $data  );
		self::enqueue_style( 'modal' );
		self::enqueue_script( 'admin' );
		Caldera_Forms_Render_Assets::enqueue_style( 'field' );
		self::enqueue_script( 'baldrick' );
	}
public static function admin_common ( ) { self :: maybe_register_all_admin ( ) ; Caldera_Forms_Render_Assets :: maybe_register ( ) ; Caldera_Forms_Render_Assets :: enqueue_script ( 'validator' ) ; $ locale = get_locale ( ) ; if ( $ locale !== 'en_US' ) { Caldera_Forms_Render_Assets :: enqueue_validator_i18n ( ) ; } Caldera_Forms_Render_Assets :: enqueue_style ( 'grid' ) ; self :: enqueue_style ( 'admin' ) ; $ data = array ( 'adminAjax' => esc_url_raw ( admin_url ( 'admin-ajax.php' ) ) , 'rest' => array ( 'root' => esc_url_raw ( Caldera_Forms_API_Util :: url ( ) ) , 'nonce' => Caldera_Forms_API_Util :: get_core_nonce ( ) ) ) ; if ( Caldera_Forms_Admin :: is_edit ( ) ) { $ form_id = trim ( $ _GET [ Caldera_Forms_Admin :: EDIT_KEY ] ) ; $ data [ 'rest' ] [ 'form' ] = esc_url_raw ( Caldera_Forms_API_Util :: url ( 'forms/' . $ form_id , true ) ) ; $ data [ 'rest' ] [ 'revisions' ] = esc_url_raw ( Caldera_Forms_API_Util :: url ( 'forms/' . $ form_id . '/revisions' , true ) ) ; } wp_localize_script ( self :: slug ( 'admin' ) , 'CF_ADMIN' , $ data ) ; self :: enqueue_style ( 'modal' ) ; self :: enqueue_script ( 'admin' ) ; Caldera_Forms_Render_Assets :: enqueue_style ( 'field' ) ; self :: enqueue_script ( 'baldrick' ) ; }
Enqueue scripts and styles used in main admin and in form editor
 @since 1.5.0
Enqueue scripts and styles used in main admin and in form editor @since 1 . 5 . 0