Git Product home page Git Product logo

intervention's Introduction

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' => '[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

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

intervention's People

Contributors

9585999 avatar darrenjacoby avatar dependabot[bot] avatar huubl avatar johnnyicarus avatar log1x avatar mike-sheppard avatar mikespainhower avatar mrgesco avatar nlemoine avatar pacotole avatar reiterbene avatar rrikesh avatar runofthemill avatar soean avatar szepeviktor 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.