PHPackages                             26b/wp-framework - 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. [Framework](/categories/framework)
4. /
5. 26b/wp-framework

ActiveLibrary[Framework](/categories/framework)

26b/wp-framework
================

A PHP package designed to simplify the development of WordPress themes and plugins by centralizing shared functionality.

1.7.0(2mo ago)0201↓91.7%[2 issues](https://github.com/26B/wp-framework/issues)[2 PRs](https://github.com/26B/wp-framework/pulls)1GPL-2.0-or-laterPHPPHP &gt;=8.1CI failing

Since Jul 29Pushed 2mo agoCompare

[ Source](https://github.com/26B/wp-framework)[ Packagist](https://packagist.org/packages/26b/wp-framework)[ Docs](https://github.com/26b/wp-framework)[ RSS](/packages/26b-wp-framework/feed)WikiDiscussions develop Synced yesterday

READMEChangelog (5)Dependencies (22)Versions (7)Used By (1)

WP Framework
============

[](#wp-framework)

[![Support Level](https://camo.githubusercontent.com/8c579db8a55059deda3033173df4c217a684e93a04acd7adb9a91e67d90b3ced/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f737570706f72742d626574612d626c756576696f6c65742e737667)](#support-level) [![GPL-2.0-or-later License](https://camo.githubusercontent.com/566f301d3894ca4935aea16f983d8af6a356f83580fa966f13a911d760add768/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f3236622f77702d6672616d65776f726b2e737667)](https://github.com/26b/wp-framework/blob/develop/LICENSE.md) [![PHP Checks](https://github.com/26b/wp-framework/actions/workflows/php.yml/badge.svg)](https://github.com/26b/wp-framework/actions/workflows/php.yml)

> WP Framework is a PHP package designed to simplify the development of WordPress themes and plugins by centralizing shared functionality. It provides a set of foundational tools, abstract classes, and reusable components to handle common challenges, enabling developers to focus on project-specific logic while ensuring consistency across projects.

Key Features
------------

[](#key-features)

- **Shared Functionality:** Provides commonly used abstract classes and utilities to reduce boilerplate code in WordPress projects.
- **Extendability:** Built for easy extension. Engineers can subclass or override functionality as needed to tailor it to their projects.
- **Centralized Updates:** Simplifies rolling out updates and new features across projects using this framework.
- **Modern Standards:** Compatible with PHP 8.2+ and adheres to modern development practices.

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

[](#installation)

You can include WP Framework in your project via Composer:

```
composer require 26b/wp-framework
```

Usage
-----

[](#usage)

### Autoloading

[](#autoloading)

The framework follows the PSR-4 autoloading standard, making it easy to include and extend classes in your project.

It also builds upon the module autoloader that was previously used in the WP-Scaffold. The only difference is that now, instead of extending the `Module` class, you should implement the `ModuleInterface` interface. To help with this, we have also provided a `Module` trait that gives you a basic implementation of the interface.

```
namespace YourNamespace;

use TenupFramework\ModuleInterface;
use TenupFramework\Module;

class YourModule implements ModuleInterface {
    use Module;

	public function can_register(): bool {
		return true;
	}

	public function register(): void {
	    // Register hooks and filters here.
	}
}
```

### Helpful Abstract Classes

[](#helpful-abstract-classes)

#### Custom Post Types

[](#custom-post-types)

```
namespace TenUpPlugin\Posts;

use TenupFramework\PostTypes\AbstractPostType;

class Demo extends AbstractPostType {

	public function get_name() {
		return 'tenup-demo';
	}

	public function get_singular_label() {
		return esc_html__( 'Demo', 'tenup-plugin' );
	}

	public function get_plural_label() {
		return esc_html__( 'Demos', 'tenup-plugin' );
	}

	public function get_menu_icon() {
		return 'dashicons-chart-pie';
	}
}
```

#### Core Post Types

[](#core-post-types)

```
namespace TenUpPlugin\Posts;

use TenupFramework\PostTypes\AbstractCorePostType;

class Post extends AbstractCorePostType {

	public function get_name() {
		return 'post';
	}

	public function get_supported_taxonomies() {
		return [];
	}

	public function after_register() {
		// Do nothing.
	}
}
```

#### Taxonomies

[](#taxonomies)

```
namespace TenUpPlugin\Taxonomies;

use TenupFramework\Taxonomies\AbstractTaxonomy;

class Demo extends AbstractTaxonomy {

    public function get_name() {
        return 'tenup-demo-category';
    }

    public function get_singular_label() {
        return esc_html__( 'Category', 'tenup-plugin' );
    }

    public function get_plural_label() {
        return esc_html__( 'Categories', 'tenup-plugin' );
    }

    public function get_post_types() {
        return [ 'tenup-demo' ];
    }
}
```

### Facades - Wordpress

[](#facades---wordpress)

```
use TenupFramework\Facades\WordPress;

// Get the correct current site's URL, which may vary based on plugins or conditions.
WordPress::get_home_url();

// Get the correct current locale, which may vary based on plugins or conditions.
WordPress::get_locale();

// Get the correct default locale, which may vary based on plugins or conditions.
WordPress::get_default_locale();
```

### Filters - Run Once

[](#filters---run-once)

```
use TenupFramework\Filters\RunOnce;

RunOnce::add_filter(
	'example_filter',
	function( $value ) {
		// Do something once and return the value.
		return $value;
	}
);

RunOnce::add_action(
	'example_action',
	function( $value ) {
		// Do something once.
	}
);
```

Changelog
---------

[](#changelog)

A complete listing of all notable changes to Distributor are documented in [CHANGELOG.md](https://github.com/26b/wp-framework/blob/develop/CHANGELOG.md).

Contributing
------------

[](#contributing)

Please read [CODE\_OF\_CONDUCT.md](https://github.com/26b/wp-framework/blob/develop/CODE_OF_CONDUCT.md) for details on our code of conduct and [CONTRIBUTING.md](https://github.com/26b/wp-framework/blob/develop/CONTRIBUTING.md) for details on the process for submitting pull requests to us.

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance85

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Total

5

Last Release

78d ago

PHP version history (2 changes)1.3.0PHP &gt;=8.2

1.4.0PHP &gt;=8.1

### Community

Maintainers

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

---

Top Contributors

[![darylldoyle](https://avatars.githubusercontent.com/u/968731?v=4)](https://github.com/darylldoyle "darylldoyle (29 commits)")[![azathcat](https://avatars.githubusercontent.com/u/32324608?v=4)](https://github.com/azathcat "azathcat (14 commits)")[![jeffpaul](https://avatars.githubusercontent.com/u/2818133?v=4)](https://github.com/jeffpaul "jeffpaul (7 commits)")[![xipasduarte](https://avatars.githubusercontent.com/u/123991?v=4)](https://github.com/xipasduarte "xipasduarte (5 commits)")[![fabiankaegy](https://avatars.githubusercontent.com/u/20684594?v=4)](https://github.com/fabiankaegy "fabiankaegy (2 commits)")[![claytoncollie](https://avatars.githubusercontent.com/u/4236538?v=4)](https://github.com/claytoncollie "claytoncollie (2 commits)")[![s3rgiosan](https://avatars.githubusercontent.com/u/499982?v=4)](https://github.com/s3rgiosan "s3rgiosan (2 commits)")[![tlovett1](https://avatars.githubusercontent.com/u/1844351?v=4)](https://github.com/tlovett1 "tlovett1 (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/26b-wp-framework/health.svg)

```
[![Health](https://phpackages.com/badges/26b-wp-framework/health.svg)](https://phpackages.com/packages/26b-wp-framework)
```

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.8k35.2M968](/packages/spatie-laravel-data)[laravel/surveyor

Static analysis tool for Laravel applications.

86121.4k11](/packages/laravel-surveyor)[spatie/typescript-transformer

This is my package typescript-transformer

3957.8M26](/packages/spatie-typescript-transformer)[laravel/ranger

Laravel Ranger is a powerful introspection library for Laravel applications.

63120.6k6](/packages/laravel-ranger)[guava/filament-knowledge-base

A filament plugin that adds a knowledge base and help to your filament panel(s).

209151.3k2](/packages/guava-filament-knowledge-base)[10up/wp-framework

A PHP package designed to simplify the development of WordPress themes and plugins by centralizing shared functionality.

48141.4k](/packages/10up-wp-framework)

PHPackages © 2026

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