A collection of functions to clean up WordPress

Overview

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 👎

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!

You might also like...
Clean Code concepts adapted for PHP

Clean Code PHP Table of Contents Introduction Variables Use meaningful and pronounceable variable names Use the same vocabulary for the same type of v

A PocketMine-MP plugin that can reduce or clean up the chunks in your world

AutoClearChunk A PocketMine-MP plugin that can reduce or clean up the chunks in your world Features Custom Clear Message Custom Clear Interval Time Pe

POC d'un projet Clean Architecture + DDD

Proof Of Concept - Clean Architecture & DDD Installation Dans un premier temps, cloner le repository : git clone https://github.com/TBoileau/rse cd rs

PHP Simple M3U Parser, it clean the playlist and remove duplicate

SimpleM3UParser PHP Simple M3U Playlist Parser, it clean, remove duplicate, and group the playlist. Usage see example.php ?php require_once "M3UPars

A super simple, clean and pretty error handler that replace the default error handler of PHP. You need only include this file!

php-custom-error-handler A super simple, clean and pretty error handler that replace the default error handler of PHP. You need just include only this

A faster drop in replacement for bin/magento cache:clean with file watcher

"You know, hope is a mistake. If you can't fix what's broken, you'll, uh... you'll go insane." - Max Rockatansky Magento 2 Cache Clean A faster drop i

Clean Code concepts adapted for PHP - A guide for producing readable, reusable, and refactorable PHP software

Clean Code concepts adapted for PHP - A guide for producing readable, reusable, and refactorable PHP software

Clean Code concepts adapted for PHP

PHP Temiz Kod İçindekiler Giriş Değişkenler Anlamlı ve telaffuz edilebilir değişken isimleri kullanın Aynı türden değişkenler için aynı kelimeleri kul

Conceptos de Clean Code adaptados para PHP

Clean Code PHP Traducción al español de Clean Code PHP realizado por Jupeter. Si encuentras un error de ortografía, de redacción o de traducción; no d

Comments
  • remove_submenu_page issue in multisite mode

    remove_submenu_page issue in multisite mode

    I tried to remove a sub menu page by using remove_submenu_page( 'admin.php', 'admin.php?page=yrc_home_settings_page' ); but it did not work. the sub menu still stays there.

    If I use remove_submenu_page( 'yrc_home_settings_page', 'yrc_home_settings_page' ); it takes away all submenus under YRC Settings parent menu when it supposed to remove only the one I wanted.

    The same approach i.e. remove_submenu_page( 'yrc_home_settings_page', 'yrc_home_settings_page' ); works well in single installation mode.

    WP Version: 4.8 Multisite: Yes Theme: VIP

    opened by emfluenceindia 4
  • Bump lodash from 4.17.15 to 4.17.20

    Bump lodash from 4.17.15 to 4.17.20

    Bumps lodash from 4.17.15 to 4.17.20.

    Commits
    Maintainer changes

    This version was pushed to npm by bnjmnt4n, a new releaser for lodash since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Bump elliptic from 6.5.2 to 6.5.3

    Bump elliptic from 6.5.2 to 6.5.3

    Bumps elliptic from 6.5.2 to 6.5.3.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Bump websocket-extensions from 0.1.3 to 0.1.4

    Bump websocket-extensions from 0.1.3 to 0.1.4

    Bumps websocket-extensions from 0.1.3 to 0.1.4.

    Changelog

    Sourced from websocket-extensions's changelog.

    0.1.4 / 2020-06-02

    • Remove a ReDoS vulnerability in the header parser (CVE-2020-7662, reported by Robert McLaughlin)
    • Change license from MIT to Apache 2.0
    Commits
    • 8efd0cd Bump version to 0.1.4
    • 3dad4ad Remove ReDoS vulnerability in the Sec-WebSocket-Extensions header parser
    • 4a76c75 Add Node versions 13 and 14 on Travis
    • 44a677a Formatting change: {...} should have spaces inside the braces
    • f6c50ab Let npm reformat package.json
    • 2d211f3 Change markdown formatting of docs.
    • 0b62083 Update Travis target versions.
    • 729a465 Switch license to Apache 2.0.
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
Owner
Vincent Orback
Freelancing front-end developer
Vincent Orback
Magento-Functions - A Resource of Magento Functions

Magento-Functions A Resource of Magento Functions Table of Contents Category Product User Cart Checkout General Account [Working w/ URL's] (#urls) Cat

Bryan Littlefield 28 Apr 19, 2021
Here is the top 100 PHP functions: it is the list of the most often used PHP native functions

Here is the top 100 PHP functions: it is the list of the most often used PHP native functions. If you are a PHP developer, you must know the Top 100 PHP Functions deeply.

Max Base 16 Dec 11, 2022
Collection of useful PHP functions, mini-classes, and snippets for every day.

JBZoo / Utils Collection of PHP functions, mini classes and snippets for everyday developer's routine life. Install composer require jbzoo/utils Usage

JBZoo Toolbox 786 Dec 30, 2022
This component provides a collection of functions/classes using the symfony/intl package when the Intl extension is not installed.

Symfony Polyfill / Intl: ICU This package provides fallback implementations when the Intl extension is not installed. It is limited to the "en" locale

Symfony 2.4k Jan 6, 2023
Collection of PHP functions, mini classes and snippets for everyday developer's routine life

JBZoo / Utils Collection of PHP functions, mini classes and snippets for everyday developer's routine life. Install composer require jbzoo/utils Usage

JBZoo Toolbox 776 Jun 2, 2022
A collection of experimental block-based WordPress themes.

Frost An experimental block theme for designers, developers, and creators. About Frost is a Full Site Editing theme for WordPress that extends the inc

Fahim Murshed 0 Dec 25, 2021
WordPress plugin which contains a collection of modules to apply theme-agnostic front-end modifications

Soil A WordPress plugin which contains a collection of modules to apply theme-agnostic front-end modifications. Soil is a commercial plugin available

Roots 1k Dec 20, 2022
A WordPress block to display a collection from Discogs.com

Blocks for Discogs This is a WordPress plugin displays your music collection from Discogs.com in a WordPress Block. If you're using the Classic Editor

null 4 Sep 28, 2022
A collection of useful codes and utilities for WordPress plugin development..

WordPress Utils A collection of useful codes and utilities for WordPress plugin development. These simplifies common tasks and promote code reusabilit

weDevs 5 Jun 9, 2023
my personal example of Laravel clean architecture

what is this repo about Clean Architect Laravel ###run we assume docker desktop is up and running open up a terminal cd project directory run "cp .env

Sadegh Salari 37 Dec 23, 2022