PHPackages                             redandblue/wordpress-tools - 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. redandblue/wordpress-tools

ActiveWordpress-muplugin[Utility &amp; Helpers](/categories/utility)

redandblue/wordpress-tools
==========================

Bag of tools to aid in WordPress development.

2331[3 issues](https://github.com/redandbluefi/wordpress-tools/issues)[2 PRs](https://github.com/redandbluefi/wordpress-tools/pulls)PHPCI failing

Since Mar 30Pushed 1y ago3 watchersCompare

[ Source](https://github.com/redandbluefi/wordpress-tools)[ Packagist](https://packagist.org/packages/redandblue/wordpress-tools)[ RSS](/packages/redandblue-wordpress-tools/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (5)Used By (0)

wordpress-tools
===============

[](#wordpress-tools)

Bag of tools to lessen the pain of WordPress development. [Documentation](https://redandbluefi.github.io/wordpress-tools/) exists, and might improve over time.

It's modular, so you can disable the parts you don't need.

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

[](#requirements)

PHP 7.

`composer.json` says 5.6, but that's just temporary so Composer stops complaining about it when installing with the standard macOS PHP, which is 5.6 and unreasonably hard to upgrade.

Interesting parts
-----------------

[](#interesting-parts)

There's a lot going on, and some things aren't as useful as the other. It brings a new vibe to templating.

First, we "register" a template directory, add this to your theme's functions.php

```
\rnb\template\load_glob(dirname(__FILE__) . '/templates/*');

```

Then every PHP file from `templates/` is loaded and usable by `\rnb\template\output()` and `\rnb\template\to_string()`. You could have multiple template directories if you wanted to.

Templates differ a bit from "traditional" templates: all templates are functions that are given data as parameters, while the traditional template usually just calls a function directly. Example template, located in `templates/single-item.php`:

```
function single_item($props = []) {
  // We can also let the template populate itself with data if required.
  $content = $props['content'] ?? get_the_content();
  $image = $props['image'] ?? \rnb\media\image(get_post_thumbnail_id());
  $injectorfn = !is_null($data['injectorfn']) ? $data['injectorfn'] : function() {
    return '';
  }; ?>

}
```

You could then use that template in The Loop, or supply the data in any other way.

```
while (have_posts()) { the_post();
  \rnb\template\output('single_item');
}

// or

\rnb\template\output('single_item', [ // notice array inside array
  [
    'content' => 'Hello world!',
    'image' => '',
    'injectorfn' => function() {
      $link = get_permalink();
      return \rnb\core\tag([
        "",
        "Read the whole thing",
        ""
      ]);
    }
  ]
]);
```

This was all written inside the GitHub editor without actually testing the code, so if it works, great! If it doesn't, fix it and PR it please :)

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 Bus Factor1

Top contributor holds 93.1% 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://avatars.githubusercontent.com/u/19853317?v=4)[redandblue](/maintainers/redandblue)[@redandblue](https://github.com/redandblue)

---

Top Contributors

[![k1sul1](https://avatars.githubusercontent.com/u/2719615?v=4)](https://github.com/k1sul1 "k1sul1 (67 commits)")[![jeiesmoon](https://avatars.githubusercontent.com/u/57522913?v=4)](https://github.com/jeiesmoon "jeiesmoon (2 commits)")[![Joona-Makinen-rnb](https://avatars.githubusercontent.com/u/177521812?v=4)](https://github.com/Joona-Makinen-rnb "Joona-Makinen-rnb (2 commits)")[![petriLan](https://avatars.githubusercontent.com/u/45594759?v=4)](https://github.com/petriLan "petriLan (1 commits)")

### Embed Badge

![Health badge](/badges/redandblue-wordpress-tools/health.svg)

```
[![Health](https://phpackages.com/badges/redandblue-wordpress-tools/health.svg)](https://phpackages.com/packages/redandblue-wordpress-tools)
```

###  Alternatives

[pentatrion/vite-bundle

Vite integration for your Symfony app

2776.2M21](/packages/pentatrion-vite-bundle)

PHPackages © 2026

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