76

GitHub - vincentorback/clean-wordpress-admin: Collection of functions to clean u...

 6 years ago
source link: https://github.com/vincentorback/clean-wordpress-admin
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Clean WordPress Admin

A collection of functions to clean up WordPress front and back-end to make it easier for editors to work and for you to look at the source code. Hiding content is also a good thing to do to limit the possibilities for your clients to destroy your beautiful site :)

Tested with WordPress 5.7

Using

Do not just include these files in your project. Look at the content, update the options and see what works for you! The code is not optimized for speed. It is optimized for readability. Sometimes the impact on performance makes these functions not eligible.

You should probably keep some things visible to you or a super admin. Check the user role like this:

if ( ! current_user_can( 'administrator' ) ) {
  // Clean it up!
}

Content

Admin bar

Hide items and sub-items in the admin bar. Also known as the Toolbar.

Admin footer

Hide 'Thank you' text and version number in the admin footer

Admin menu

Hide items and sub-items in the admin menu.

Classic editor

Change settings and clean up the classic editor (the one before Gutenberg).

Comments

Remove default fields in the comment form.

Content tables

Hide functions from tables with posts, users, plugins and more.

Contextual tabs

Remove all or specific contextual tabs with help and information about how to use the WordPress interface.

Dashboard

Remove dashboard meta boxes or even the whole dashboard itself.

Editor

Change editor settings, hide meta boxes or disable the editor completely.

Editor (JavaScript)

Change editor settings, hide meta boxes, disable block functions, unregister plugins and more.

Emojis

Disable built-in emojis that loads large JavaScript, CSS and image files -1

Head

Clears out generated unwanted stuff from the wp_head hook. Such as feeds and the WordPress version.

Images

Remove functions related to images like the default link, alignment, and sizes.

JavaScript

De-registers the WordPress default jQuery script.

Login

Remove functions from the login page.

Media editor

Remove fields and actions from the media editor.

Posts

Remove specific meta boxes from post-types.

REST API

Disable the REST API

Roles

Remove default roles. Remove capabilities to specific roles or users.

Search

Disable search query and search form.

Theme

Remove theme features.

TinyMCE editor

Change settings in the old TinyMCE WYSIWYG editor.

Updates

Disable updates and remove notifications.

Users

Remove things from user pages.

Widgets

Remove default widgets.

Plugins

Functions to clean up common plugins.

Advanced Custom Fields

Jetpack

Simple History

Yoast SEO

Contribution

Feel free to suggest anything you see missing or want to be fixed!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK