kaiseki / wp-soil
Configure roots/soil modules through kaiseki/config and a kaiseki/wp-hook provider
Requires
- php: ^8.2
- kaiseki/config: ^2.0
- kaiseki/wp-hook: ^2.0
- psr/container: ^1.1 || ^2.0
Requires (Dev)
- bnf/phpstan-psr-container: ^1.1
- kaiseki/php-coding-standard: ^1.0
- maglnet/composer-require-checker: ^4.0
- php-stubs/wordpress-stubs: ^6.2
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- phpunit/phpunit: ^11.0
- roave/security-advisories: dev-latest
- szepeviktor/phpstan-wordpress: ^2.0
- thecodingmachine/phpstan-safe-rule: ^1.4
This package is auto-updated.
Last update: 2026-06-02 23:43:53 UTC
README
Configure roots/soil modules through kaiseki/config and a
kaiseki/wp-hook provider.
A single kaiseki/wp-hook HookProviderInterface (Soil) that, on after_setup_theme, declares the
configured Soil modules via add_theme_support('soil', …) and boots Soil. The module list is read
from the soil config key, so enabling or disabling Soil features is pure configuration.
The Soil plugin itself (roots/soil) is provided by the host WordPress install at runtime; this
package only wires it up.
Installation
composer require kaiseki/wp-soil
Requires PHP 8.2 or newer.
Usage
Register ConfigProvider with your laminas-style config aggregator, list the Soil modules under the
soil key, and activate the provider via kaiseki/wp-hook:
use Kaiseki\WordPress\Soil\Soil; return [ 'soil' => [ 'clean-up', // Cleaner WordPress markup 'nice-search', // Redirect /?s=query to /search/query 'js-to-footer', // Move JS to the footer // 'google-analytics' => 'UA-XXXXX-Y', ], 'hook' => [ 'provider' => [ Soil::class, ], ], ];
ConfigProvider registers the SoilFactory, which reads the soil array from the container and
passes it straight to add_theme_support('soil', …).
Development
composer install
composer check # check-deps, cs-check, phpstan
License
MIT — see LICENSE.