Skip to content

anthonythorne/enqueues

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ENQUEUES MU PLUGIN

OVERVIEW

Enqueues MU Plugin is a modern, flexible system for automating and customizing asset loading in WordPress themes and plugins. It is designed for maintainability, performance, and extensibility—supporting both classic and block-based development.

Note: All Webpack automation features are optional. You can use only the PHP asset loading/controllers, or only the Webpack utilities, or both together. Loading and initializing controllers is also optional and context-dependent—see Quick Start for details.

FEATURES

QUICK START

  1. Install via Composer
    composer require thecodeco/enqueues:dev-main
  2. Initialize in your theme or plugin (Optional)
    \Enqueues\enqueues_initialize_controllers('theme');
    You only need to initialize controllers if you want to use the automated PHP asset loading features. You can use the Webpack utilities or other features independently.
  3. Start customizing!

HOW IT WORKS

  • Automatic Asset Loading: The plugin detects the current page type, template, or post type and loads the corresponding CSS/JS file. If no specific file is found, it falls back to main.js/main.css.
  • Block Editor Features: Easily register and manage custom blocks, block categories, and block editor plugins. Use filters to control dependencies, localization, and more.
  • Webpack Automation (Optional): Utilities help you keep your Webpack config in sync with your codebase, automatically generating entries and copying assets. You can use these utilities without using the PHP controllers.
  • Inline Asset Registration: Register critical CSS/JS for inline output in wp_head or wp_footer.
  • Extensive Filters: Fine-tune every aspect of asset loading, block registration, and build output. See the docs for a full list.

WHERE TO GO NEXT

DETAILED FILTERS & ADVANCED OPTIONS

For a full list of filters, advanced configuration, and real-world usage, see the relevant sections in each doc in the /docs/ folder.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 84.3%
  • JavaScript 15.7%