Skip to content

Canowyrms/clean-wordpress-admin

 
 

Repository files navigation

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 6.1

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

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

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

Hide items and sub-items in the admin menu.

Remove some default loaded CSS and Javascript.

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

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

Remove default fields in the comment form.

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

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

Remove and disable the theme customizer.

Remove dashboard meta boxes or even the whole dashboard itself.

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

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

Disable email functions.

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

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

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

Remove functions from the login page.

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

Remove specific meta boxes from post-types.

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

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

Disable search query and search form.

Change settings in the old TinyMCE WYSIWYG editor.

Disable updates and remove notifications.

Remove things from user pages.

Remove default widgets.

Plugins

Functions to clean up common plugins.

Contribution

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

About

A collection of functions to clean up WordPress

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 95.7%
  • JavaScript 4.3%