alleyinteractive / wp-asset-manager
Asset Manager is a toolkit for managing front-end assets and more tightly controlling where, when, and how they're loaded.
Package info
github.com/alleyinteractive/wp-asset-manager
Type:wordpress-plugin
pkg:composer/alleyinteractive/wp-asset-manager
Requires
- php: >=8.3
- alleyinteractive/composer-wordpress-autoloader: ^1.3
Requires (Dev)
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-production
- v2.0.0
- v1.4.4
- v1.4.3
- v1.4.2
- v1.4.1
- v1.4.0
- v1.3.7
- v1.3.6
- v1.3.5
- v1.3.4
- v1.3.3
- v1.3.2
- v1.3.1
- v1.3.0
- v1.2.0
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.0
- 0.1.3
- 0.1.2
- 0.1.1
- dev-production-built
- dev-fix/issue-76/wp-kses-hair-html-regressions
- dev-release/v1.x-built
- dev-release/v1.x
- dev-feature/doc-helpers
- dev-release/v1.3
- dev-release/v1.2
- dev-release/v1.1
- dev-composer
This package is auto-updated.
Last update: 2026-09-24 12:37:08 UTC
README
Asset Manager is a toolkit for managing front-end assets and more tightly controlling where, when, and how they're loaded.
Installation
Download a tagged release, install it into your plugins directory, and activate it on the plugins screen.
Or install with Composer:
composer require alleyinteractive/wp-asset-manager
Quick start
The am_enqueue_* functions take the same parameters as their core WordPress equivalents, plus a few of their own. Options can be passed as an array or as individual parameters.
// Load a CSS asset asynchronously. am_enqueue_style( [ 'handle' => 'site-styles', 'src' => 'css/styles.css', 'deps' => [], 'condition' => 'global', 'load_method' => 'async', // 'sync', 'inline', 'async' 'version' => '1.0.0', 'load_hook' => 'wp_head', 'media' => 'all', // 'print', 'screen', or any valid media query ] );
Documentation
Full API reference lives in the wiki:
- Enqueue Functions —
am_enqueue_script,am_enqueue_style, and the full list of enqueue options. - Conditions — control when an asset loads, and register your own conditions.
- Inline Assets — print file contents or global JavaScript variables into the document.
- Preload —
am_preloadand its options. - SVG Sprite — register, display, and manage SVG symbols in a sprite sheet.
Requirements
- WordPress: 6.3+
- PHP: 8.3+
Downloads and Versioning
You can view Asset Manager's official releases here.
The production branch is the latest stable release. The production-built branch tracks the same release with dependencies included, for sites that install the plugin directly from Git.
License
Contributing
Bug reports and pull requests are welcome. See CONTRIBUTING.md for setup, tests, and coding standards.