PHPackages                             themeplate/enqueue - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. themeplate/enqueue

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

themeplate/enqueue
==================

Helper for registered dependencies

v2.9.0(11mo ago)0341↑328.6%1GPL-3.0-onlyPHPPHP ^7.4|^8.2

Since Sep 26Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/ThemePlate/Enqueue)[ Packagist](https://packagist.org/packages/themeplate/enqueue)[ RSS](/packages/themeplate-enqueue/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependencies (1)Versions (16)Used By (1)

ThemePlate Enqueue
==================

[](#themeplate-enqueue)

Usage
-----

[](#usage)

```
use ThemePlate\Enqueue;

function theme_scripts() {
	wp_enqueue_script( 'main-script', 'PATH_TO_MAIN_JS' );
	wp_script_add_data( 'main-script', 'async', true );
	wp_enqueue_script( 'extra-script', 'PATH_TO_EXTRA_JS' );
	wp_script_add_data( 'extra-script', 'defer', true );

	wp_enqueue_script( 'jquery-slim', 'https://code.jquery.com/jquery-3.5.1.slim.min.js', array(), '3.5.1', true );
	wp_script_add_data( 'jquery-slim', 'integrity', 'sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj' );
	wp_script_add_data( 'jquery-slim', 'crossorigin', 'anonymous' );
	wp_enqueue_style( 'bootstrap', 'https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css', array(), '4.5.2' );
	wp_style_add_data( 'bootstrap', 'integrity', 'sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z' );
	wp_style_add_data( 'bootstrap', 'crossorigin', 'anonymous' );

	wp_register_style( 'slick-carousel', 'https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.css', array(), '1.9.0', 'all' );
	wp_register_script( 'slick-carousel', 'https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.js', array(), '1.9.0', true );
}
add_action( 'wp_enqueue_scripts', 'theme_scripts' );

add_action( 'init', array( Enqueue::class, 'init' ) );

// Set to the wanted insert position; default is 10
Enqueue::$priority = 20;

// In templates before calling the get_header()
Enqueue::script( 'slick-carousel' );
Enqueue::style( 'slick-carousel' );
Enqueue::script(
	'popper',
	'https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js',
	array(
		'integrity' => 'sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN',
		'crossorigin' => 'anonymous',
	)
);
```

### Enqueue::script( $handle, $src, $data )

[](#enqueuescript-handle-src-data-)

### Enqueue::style( $handle, $src, $data )

[](#enqueuestyle-handle-src-data-)

- **$handle** *(string)(Required)* Registered handle or unique name if *$src* is provided
- **$src** *(string)(Optional)* Full URL or path relative to the WordPress root directory
- **$data** *(array)(Optional)* Custom metadata to be added to the registered asset

###  Health Score

40

—

FairBetter than 87% of packages

Maintenance50

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~120 days

Total

15

Last Release

359d ago

Major Versions

v1.x-dev → v2.0.02022-05-02

PHP version history (4 changes)v1.0.0PHP ^7.2

v1.0.1PHP ^7.2|^8.0

v2.0.0PHP ^7.4|^8.0

v2.7.0PHP ^7.4|^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/91095d431958c79a7384d515efec2686ca3cd1e1e1a5a42b680309b8e855355a?d=identicon)[kermage](/maintainers/kermage)

---

Top Contributors

[![kermage](https://avatars.githubusercontent.com/u/8350223?v=4)](https://github.com/kermage "kermage (60 commits)")

---

Tags

wordpresswordpress-scriptswordpress-styles

### Embed Badge

![Health badge](/badges/themeplate-enqueue/health.svg)

```
[![Health](https://phpackages.com/badges/themeplate-enqueue/health.svg)](https://phpackages.com/packages/themeplate-enqueue)
```

###  Alternatives

[ohanzee/helpers

Collection of helpers, small static classes for general purpose use

552.5k1](/packages/ohanzee-helpers)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
