ClassesBigCommerceAssetsAdminScripts

Scripts

Handles the enqueueing and registration of admin scripts and Gutenberg-specific scripts.

  • Full name: \BigCommerce\Assets\Admin\Scripts

Methods

__construct

Constructor.

public __construct(string $asset_directory, string $version, \BigCommerce\Assets\Admin\JS_Config $config, \BigCommerce\Assets\Admin\JS_Localization $localization): mixed

Parameters:

ParameterTypeDescription
$asset_directorystringPath to the plugin assets directory.
$versionstringAsset build version.
$config\BigCommerce\Assets\Admin\JS_ConfigConfiguration object for JavaScript.
$localization\BigCommerce\Assets\Admin\JS_LocalizationLocalization object for JavaScript.

enqueue_scripts

Enqueue admin and Gutenberg scripts.

public enqueue_scripts(): mixed

Registers and enqueues required scripts, and localizes them with configuration and localization data. Delays certain script outputs until after the admin footer scripts.


Print footer scripts.

public print_footer_scripts(): mixed

Enqueues the admin scripts and reprocesses the script queue to ensure correct execution timing.



Automatically generated on 2025-01-21