PHPackages                             themeplate/resource - 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/resource

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

themeplate/resource
===================

ThemePlate resource hinting

v2.5.0(1y ago)117811GPL-3.0-onlyPHPPHP ^7.4|^8.2

Since Sep 26Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ThemePlate/Resource)[ Packagist](https://packagist.org/packages/themeplate/resource)[ RSS](/packages/themeplate-resource/feed)WikiDiscussions develop Synced 3w ago

READMEChangelogDependencies (1)Versions (15)Used By (1)

ThemePlate Resource
===================

[](#themeplate-resource)

Usage
-----

[](#usage)

```
use ThemePlate\Resource;

add_action( 'wp_head', array( Resource::class, 'action' ), 2 );

Resource::hint( 'dns-prefetch', '//cdnjs.cloudflare.com' );
Resource::hint( 'preconnect', '//ajax.cloudflare.com' );
Resource::hint( 'prerender', 'http://my.site/blog' );
Resource::hint( 'prefetch', 'jquery-migrate' );
Resource::hint( 'preload', 'jquery-core' );

Resource::hint( 'preload', array(
	'href' => 'https://fonts.gstatic.com/s/montserrat/v14/JTURjIg1_i6t8kCHKm45_cJD3gTD_u50.woff2',
	'as'   => 'font',
	'type' => 'font/woff2',
) );
```

### Resource::hint( $directive, $resource )

[](#resourcehint-directive-resource-)

- **$directive** *(string)(Required)* Type of directive to use
- **$resource** *(mixed)(Required)*

> - URL *(string)*
>     - `dns-prefetch`
>     - `preconnect`
>     - `prerender`
> - Handle *(string)*
>     - `prefetch`
>     - `preload`
> - Custom *(array)*
>     - `prefetch`
>     - `preload`

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance46

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity75

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 ~130 days

Recently: every ~116 days

Total

14

Last Release

405d ago

Major Versions

v1.x-dev → v2.0.02023-02-04

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

v1.1.1PHP ^7.2|^8.0

v2.0.0PHP ^7.4|^8.0

v2.4.0PHP ^7.4|^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8350223?v=4)[Gene Alyson Fortunado Torcende](/maintainers/kermage)[@kermage](https://github.com/kermage)

---

Top Contributors

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

---

Tags

directiveswordpresswordpress-dependencies

### Embed Badge

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

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

PHPackages © 2026

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