Skip to content
项目

vincentorback/clean-wordpress-admin

在 GitHub 查看

关于

A collection of functions to clean up WordPress

网站与应用开发

这些数字如何统计

实测星标增长

24小时
-1
7天
-1
15天
-1
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

Clean WordPress Admin

A collection of functions to clean up WordPress front-end and back-end to make it easier for editors to work and for you to look at the source code. Hiding certain functionality also helps prevent clients from accidentally breaking site functionality.

Tested with PHP 8.1 and WordPress 6.9

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. Some functions may have performance implications, so evaluate each one for your specific needs.

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.

Assets

Remove some default loaded CSS and JavaScript.

Block settings and styles (theme.json)

Control editor settings, and settings for individual blocks.
Read more here

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.

Customizer

Remove and disable the theme customizer.

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.

Email

Disable email functions.

Emojis

Disable built-in emojis that load large JavaScript, CSS and image files.

Feed

Disable RSS and other feeds.

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.

Login

Remove functions from the login page.

Media

Remove fields and actions from the media editor and set allowed file types.

Posts

Remove specific meta boxes from post-types.

REST API

Hide the URL with a custom prefix or disable it completely.

Roles

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

Search

Disable search query and search form.

Settings

Hide fields from settings pages.

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!

探索相关项目

加载中…