Stars: 631
Forks: 50
Pull Requests: 83
Issues: 62
Watchers: 25
Last Updated: 2023-09-04 17:45:42
WordPress plugin to configure wp-admin and application state using a single config file.
License: MIT License
Languages: PHP, JavaScript, CSS, Shell
Easily customize wp-admin and configure application options.
$ composer require wpackagist-plugin/intervention
$ wp plugin install intervention --activate
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.
Remove components from wp-admin.
Return wp-admin.$role
or wp-admin.$username
editor|author
<?php
return [
'wp-admin.$role|$username' => [
'common.adminbar',
],
];
User Roles
all
all-not-administrator
(shortcut alias)administrator
author
editor
contributor
subscriber
Set application options.
wp-admin
.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' => '[email protected]',
'membership' => false,
'default-role' => 'editor',
'language' => 'en_US',
'timezone' => 'Africa/Johannesburg',
'date-format' => 'F j Y',
'time-format' => 'g:i a',
'week-starts' => 'Mon',
],
],
];