Code Monkey home page Code Monkey logo

intervention's Introduction

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' => '[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',
        ],
    ],
];

Options

Quick Reference

Connect

intervention's People

Contributors

bluesword2024 avatar

Stargazers

Paul Koop avatar  avatar  avatar Charles Berry avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.