Skip to content

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

License

Notifications You must be signed in to change notification settings

darrenjacoby/intervention

Folders and files

NameName
Last commit message
Last commit date
Jul 16, 2023
Jul 12, 2023
Jul 11, 2023
Jul 11, 2023
Jul 11, 2023
Jul 11, 2023
Mar 23, 2024
Jul 11, 2023
Jul 11, 2023
Jul 12, 2023
Jul 10, 2023
Jul 11, 2023
Feb 13, 2022
Jan 31, 2022
Jul 11, 2023
Jul 11, 2023
Jul 12, 2023
Feb 21, 2022
Jan 2, 2017
Jul 16, 2023
Jul 11, 2023
Mar 30, 2021
Jul 11, 2023
Jul 10, 2023
Jul 11, 2023
Jul 11, 2023
Jul 10, 2023
Jul 11, 2023
Jul 12, 2023
Jul 11, 2023
Jul 10, 2023
Jul 11, 2023
Jul 11, 2023

Repository files navigation

Easily customize wp-admin and configure application options.

View on WordPress.org

Installation

Composer

$ composer require wpackagist-plugin/intervention

WP-CLI

$ wp plugin install intervention --activate

Requirements

Usage

Create config/intervention.php for Sage 10, 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.

Tip: automate exporting a config file from the database using Tools→Intervention in the WordPress admin.

<?php

return [
    'application' => [
        'general' => [
            'tagline' => 'Intervention Example',
            'wp-address' => 'https://example.com/wp',
            'site-address' => 'https://example.com',
            'admin-email' => 'example@example.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

Connect