Download the PHP package open-function-computers-llc/better-wordpress without Composer
On this page you can find all versions of the php package open-function-computers-llc/better-wordpress. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download open-function-computers-llc/better-wordpress
More information about open-function-computers-llc/better-wordpress
Files in open-function-computers-llc/better-wordpress
Package better-wordpress
Short Description A suite of classes to make WordPress theme development cleaner
License MIT
Informations about the package better-wordpress
A suite of utilities to deliver a faster and more consistent WordPress theme development experience.
📦 View on Packagist
📃 Read the Docs
About
The purpose of this package is to enable developers to use the familiar model-view-controller pattern in the creation of WordPress themes. This is accomplished by keeping HTML and PHP code as seperated as possible and adding convenient methods to organize data before it's sent to the view controllers. Querying for posts, rendering menus, handling taxonomies and all the other essential parts of developing a WordPress theme are now easier than ever with the RAD Theme Engine.
Quick Start
Inside of your site's wp-content/themes folder, run the following command to create a new Rad Theme Engine project.
Next, enter your new theme's folder and run npm install to get dependencies.
And that's it! Read about advanced installations and asset bundling on the docs.
Local Development & Testing
This section is for contributors who want to work on rad-theme-engine itself with a full TDD setup.
Prerequisites
- PHP >= 8.1
- Composer
- MariaDB or MySQL running locally
- WP-CLI (
wp) - A local WordPress install (see below)
1. Clone the repos
Pick a working directory (e.g. ~/programming/php/ofco) and clone both repos into it:
2. Set up a local WordPress install
Start the built-in PHP server to browse the site:
3. Create a dev theme with a symlinked package
From inside wp-content/themes, scaffold a new theme:
Then update dev-theme/composer.json to add a path repository so Composer symlinks your local clone instead of downloading from Packagist:
Run composer update and verify the symlink:
Activate the theme:
Any changes you make in rad-theme-engine/src/ are now live immediately in the WordPress install — no reinstall required.
4. Set up the WordPress test suite
Clone wordpress-develop somewhere permanent on your machine:
Create a dedicated test database:
Copy and fill in the test config:
Edit wp-tests-config.php with your database credentials and point ABSPATH at your WordPress install:
5. Configure the test environment
Inside rad-theme-engine, copy .env.example to .env and fill in your local paths:
This file is gitignored — it never gets committed.
6. Install dev dependencies and run the suite
You should see WordPress boot and all tests pass:
Available make commands
| Command | Description |
|---|---|
make test |
Run the full test suite |
make coverage |
Run tests and generate an HTML coverage report in ./report |
make watch |
Re-run tests automatically on every file save (requires entr) |
Install entr on Debian/Ubuntu with sudo apt install entr, or on macOS with brew install entr.
Writing tests
Tests live in the tests/ directory. Integration tests that need WordPress extend WP_UnitTestCase. The Site class is a singleton, so each test class that instantiates it must reset the instance in tearDown:
Pure unit tests that don't need WordPress (like testing utility methods) can extend PHPUnit\Framework\TestCase directly and will run faster.
Example Projects
- Shirt Store – Demonstrates custom post types, taxonomies, handlebars, and more.
Authors
- Kurtis Holsapple – @lapubell
- Escher Wright-Dykhouse – @escherwd
- Gabriel Johnson - @gabriel-johnson
License
Licensed under the MIT license, see LICENSE
All versions of better-wordpress with dependencies
jjgrainger/posttypes Version ^2.2
salesforce/handlebars-php Version ^2.3
enshrined/svg-sanitize Version ^0.22.0
symfony/yaml Version ^7.4