Best laravel framework open-source packages.

Intervention

WordPress plugin to configure wp-admin and application state using a single config file.
Updated 4 weeks ago

Intervention

Easily customize wp-admin and configure application options.

Installation

Composer/Bedrock

$ composer require soberwp/intervention:dev-main
$ wp plugin activate intervention

WP-CLI

$ wp plugin install https://github.com/soberwp/intervention/archive/master.zip --activate

Requirements

Usage

Create config/intervention.php for Sage 10, resources/intervention.php for Sage 9, or intervention.php inside your theme root folder and return an array.

<?php

return [
    'application' => [

    ],
    'wp-admin.$role|$username' => [

    ],
];

For the options, you can use dot notatation, a standard array, or a combination.

Admin

Remove components from wp-admin.

Return wp-admin.$role or wp-admin.$username

  • Support for multiple user roles using a pipe operator.
    • editor|author
<?php

return [
    'wp-admin.$role|$username' => [
        'common.adminbar',
    ],
];

User Roles

  • all
  • all-not-administrator (shortcut alias)
  • administrator
  • author
  • editor
  • contributor
  • subscriber

Options

Login

Common

Dashboard

Posts

Media

Pages

Comments

Appearance

Plugins

Users

Tools

Settings

Application

Set application options.

  • Options are automatically changed to read only fields in wp-admin.
  • Options can be placed under version control.

Return application.

New! You can auto-generate/export a config file from the database using Tools/Intervention in the WordPress admin.

<?php

return [
    'application' => [
        'general' => [
            'tagline' => 'Intervention',
            'wp-address' => 'https://soberwp.com/wp',
            'site-address' => 'https://soberwp.com',
            'admin-email' => 'example@soberwp.com',
            'membership' => false,
            'default-role' => 'editor',
            'language' => 'en_US',
            'timezone' => 'Africa/Johannesburg',
            'date-format' => 'F j Y',
            'time-format' => 'g:i a',
            'week-starts' => 'Mon',
        ],
    ],
];

Options

Quick Reference

Updating

Composer

  • Change the composer.json version to ^2.0.0**
  • Check CHANGELOG.md for any breaking changes before updating.
$ composer update

WordPress

Includes support for github-updater to track updates through wp-admin.

Roadmap

  • ✅ Export database values to Intervention config file.
  • ✅ Save to database manual option (update_option vs pre_option).
  • (WIP) Intervention wp-admin interface.
  • Better support for the block editor.
  • Support wp-admin custom post types.

Have a suggestion, or want to track new releases? @soberwp

If you would like to buy me a coffee, paypal.me/darrenjacoby

Tags file php