Utilities::automator_enqueue_global_assets()

Enqueues global JS and CSS files


Parameters Parameters

$file_name

(string) (Required)


Top ↑

Return Return

(string) $asset_url


Source Source

File: src/core/class-utilities.php

	public static function automator_enqueue_global_assets() {
		wp_enqueue_style( 'uap-admin-global', Utilities::automator_get_css( 'admin/global.css' ), array(), Utilities::automator_get_version() );
		wp_enqueue_script( 'uap-admin-global', Utilities::automator_get_js( 'admin/global.js' ), array( 'jquery' ), Utilities::automator_get_version(), true );

		wp_localize_script( 'uap-admin-global', 'UncannyAutomatorGlobal', [
			'rest' => [
				'url'   => esc_url_raw( rest_url() . AUTOMATOR_REST_API_END_POINT ),
				'nonce' => \wp_create_nonce( 'wp_rest' ),
			],
		] );
	}


Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0 Introduced.