PHPackages                             arraypress/wp-register-includes - 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. arraypress/wp-register-includes

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

arraypress/wp-register-includes
===============================

Simple file inclusion management for WordPress plugins and themes with prefix-based registration.

10PHP

Since Nov 24Pushed 5mo agoCompare

[ Source](https://github.com/arraypress/wp-register-includes)[ Packagist](https://packagist.org/packages/arraypress/wp-register-includes)[ RSS](/packages/arraypress-wp-register-includes/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

WordPress Register Includes
===========================

[](#wordpress-register-includes)

Simple file inclusion management for WordPress plugins and themes.

Installation
------------

[](#installation)

```
composer require arraypress/wp-register-includes
```

Usage
-----

[](#usage)

```
// Register your base path
arraypress_register_loader( 'myplugin', MY_PLUGIN_DIR );

// Load directories
arraypress_register_includes( 'myplugin', [
	'includes/core',
	'includes/admin'
] );

// Load specific files
arraypress_register_includes( 'myplugin', [
	'includes/config.php',
	'includes/functions.php'
] );

// Load recursively
arraypress_register_includes( 'myplugin', [ 'includes' ], true );

// Custom exclusions
arraypress_register_loader( 'myplugin', MY_PLUGIN_DIR, [ 'index.php', 'uninstall.php' ] );
```

Real Example
------------

[](#real-example)

```
class Plugin {
	private function setup_files(): void {
		// Register base
		arraypress_register_loader( 'sugarcart', SUGARCART_PLUGIN_DIR );

		// Core components
		arraypress_register_includes( 'sugarcart', [
			'includes/abstracts',
			'includes/classes'
		] );

		// Database files
		arraypress_register_includes( 'sugarcart', [
			'includes/database/tables',
			'includes/database/schemas',
			'includes/database/queries'
		] );

		// Admin (recursive)
		if ( is_admin() ) {
			arraypress_register_includes( 'sugarcart', [ 'includes/admin' ], true );
		}
	}
}
```

Features
--------

[](#features)

- ✅ Prefix-based registration
- ✅ Automatic duplicate prevention
- ✅ File and directory support
- ✅ Optional recursive loading
- ✅ Custom file exclusions
- ✅ Multiple plugin support

Requirements
------------

[](#requirements)

- PHP 7.4+
- WordPress 5.0+

License
-------

[](#license)

GPL-2.0-or-later

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance48

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/cd6eb8aff0903d87eb674d1ba3c5f3653899c0d7661504eb0deb7798ed86b643?d=identicon)[arraypress](/maintainers/arraypress)

---

Top Contributors

[![arraypress](https://avatars.githubusercontent.com/u/22668877?v=4)](https://github.com/arraypress "arraypress (1 commits)")

### Embed Badge

![Health badge](/badges/arraypress-wp-register-includes/health.svg)

```
[![Health](https://phpackages.com/badges/arraypress-wp-register-includes/health.svg)](https://phpackages.com/packages/arraypress-wp-register-includes)
```

###  Alternatives

[dantleech/gherkin-lint

Gherkin linter

46177.5k11](/packages/dantleech-gherkin-lint)[zhaohehe/laravel-echo-server

166.2k](/packages/zhaohehe-laravel-echo-server)

PHPackages © 2026

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