├── .editorconfig ├── .eslintrc ├── .gitignore ├── .prettierrc ├── LICENSE ├── README.md ├── admin-bar.php ├── admin-footer.php ├── admin-menu.php ├── assets.php ├── classic-editor.php ├── comments.php ├── composer.json ├── composer.lock ├── content-tables.php ├── contextual-tabs.php ├── customizer.php ├── dashboard.php ├── editor.js ├── editor.php ├── email.php ├── emojis.php ├── feed.php ├── head.php ├── images.php ├── login.php ├── media.php ├── package-lock.json ├── package.json ├── plugins ├── acf.php ├── jetpack.php ├── simple-history.php └── yoast-seo.php ├── posts.php ├── rest-api.php ├── roles.php ├── search.php ├── theme.json ├── tinymce-editor.php ├── updates.php ├── users.php └── widgets.php /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = tab 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.js] 12 | indent_style = space 13 | indent_size = 2 14 | 15 | [*.md] 16 | trim_trailing_whitespace = false 17 | insert_final_newline = false 18 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "plugin:@wordpress/eslint-plugin/custom", 4 | "plugin:@wordpress/eslint-plugin/esnext", 5 | "plugin:@wordpress/eslint-plugin/jsdoc" 6 | ], 7 | "env": { 8 | "browser": true 9 | }, 10 | "rules": { 11 | "quotes": ["single"] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | vendor 3 | node_modules 4 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "tabWidth": 2, 3 | "useTabs": false, 4 | "semi": false, 5 | "singleQuote": true 6 | } 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Clean WordPress Admin 2 | 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 :) 3 | 4 | **Tested with WordPress 6.7** 5 | 6 | ## Using 7 | 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. 8 | 9 | You should probably keep some things visible to you or a super admin. Check the user role like this: 10 | ```php 11 | if ( ! current_user_can( 'administrator' ) ) { 12 | // Clean it up! 13 | } 14 | ``` 15 | 16 | ## Content 17 | 18 | ### [Admin bar](admin-bar.php) 19 | Hide items and sub-items in the admin bar. Also known as the Toolbar. 20 | 21 | ### [Admin footer](admin-footer.php) 22 | Hide 'Thank you' text and version number in the admin footer 23 | 24 | ### [Admin menu](admin-menu.php) 25 | Hide items and sub-items in the admin menu. 26 | 27 | ### [Assets](assets.php) 28 | Remove some default loaded CSS and Javascript. 29 | 30 | ### [Block settings and styles (theme.json)]() 31 | Control editor settings, and settings for individual blocks. 32 | [Read more here](https://developer.wordpress.org/themes/global-settings-and-styles/) 33 | 34 | ### [Classic editor](classic-editor.php) 35 | Change settings and clean up the classic editor (the one before Gutenberg). 36 | 37 | ### [Comments](comments.php) 38 | Remove default fields in the comment form. 39 | 40 | ### [Content tables](content-tables.php) 41 | Hide functions from tables with posts, users, plugins and more. 42 | 43 | ### [Contextual tabs](contextual-tabs.php) 44 | Remove all or specific contextual tabs with help and information about how to use the WordPress interface. 45 | 46 | ### [Customizer](customizer.php) 47 | Remove and disable the theme customizer. 48 | 49 | ### [Dashboard](dashboard.php) 50 | Remove dashboard meta boxes or even the whole dashboard itself. 51 | 52 | ### [Editor](editor.php) 53 | Change editor settings, hide meta boxes or disable the editor completely. 54 | 55 | ### [Editor (JavaScript)](editor.js) 56 | Change editor settings, hide meta boxes, disable block functions, unregister plugins and more. 57 | 58 | ### [Email](email.php) 59 | Disable email functions. 60 | 61 | ### [Emojis](emojis.php) 62 | Disable built-in emojis that loads large JavaScript, CSS and image files :-1: 63 | 64 | ### [Feed](feed.php) 65 | Disable RSS and other feeds. 66 | 67 | ### [Head](head.php) 68 | Clears out generated unwanted stuff from the wp_head hook. Such as feeds and the WordPress version. 69 | 70 | ### [Images](images.php) 71 | Remove functions related to images like the default link, alignment, and sizes. 72 | 73 | ### [Login](login.php) 74 | Remove functions from the login page. 75 | 76 | ### [Media](media.php) 77 | Remove fields and actions from the media editor and set allowed file types. 78 | 79 | ### [Posts](posts.php) 80 | Remove specific meta boxes from post-types. 81 | 82 | ### [REST API](rest-api.php) 83 | Hide the url with a custom prefix or disable it completely. 84 | 85 | ### [Roles](roles.php) 86 | Remove default roles. Remove capabilities to specific roles or users. 87 | 88 | ### [Search](search.php) 89 | Disable search query and search form. 90 | 91 | ### [TinyMCE editor](tinymce-editor.php) 92 | Change settings in the old TinyMCE WYSIWYG editor. 93 | 94 | ### [Updates](updates.php) 95 | Disable updates and remove notifications. 96 | 97 | ### [Users](users.php) 98 | Remove things from user pages. 99 | 100 | ### [Widgets](widgets.php) 101 | Remove default widgets. 102 | 103 | ## Plugins 104 | Functions to clean up common plugins. 105 | 106 | ### [Advanced Custom Fields](plugins/acf.php) 107 | 108 | ### [Jetpack](plugins/jetpack.php) 109 | 110 | ### [Simple History](plugins/simple-history.php) 111 | 112 | ### [Yoast SEO](plugins/yoast-seo.php) 113 | 114 | ## Contribution 115 | Feel free to [suggest anything](https://github.com/vincentorback/clean-wordpress-admin/issues) you see missing or want to be fixed! 116 | -------------------------------------------------------------------------------- /admin-bar.php: -------------------------------------------------------------------------------- 1 | remove_menu( 'wp-logo' ); // Remove the WordPress logo 27 | $wp_admin_bar->remove_menu( 'about' ); // Remove the about WordPress link 28 | $wp_admin_bar->remove_menu( 'wporg' ); // Remove the about WordPress link 29 | $wp_admin_bar->remove_menu( 'documentation' ); // Remove the WordPress documentation link 30 | $wp_admin_bar->remove_menu( 'support-forums' ); // Remove the support forums link 31 | $wp_admin_bar->remove_menu( 'feedback' ); // Remove the feedback link 32 | 33 | /* Site name menu */ 34 | $wp_admin_bar->remove_menu( 'site-name' ); // Remove the site name menu 35 | $wp_admin_bar->remove_menu( 'view-site' ); // Remove the view site link 36 | $wp_admin_bar->remove_menu( 'dashboard' ); // Remove the dashboard link 37 | $wp_admin_bar->remove_menu( 'themes' ); // Remove the themes link 38 | $wp_admin_bar->remove_menu( 'widgets' ); // Remove the widgets link 39 | $wp_admin_bar->remove_menu( 'menus' ); // Remove the menus link 40 | 41 | /* Customize menu */ 42 | $wp_admin_bar->remove_menu( 'customize' ); // Remove the site name menu 43 | 44 | /* Updates menu */ 45 | $wp_admin_bar->remove_menu( 'updates' ); // Remove the updates link 46 | $wp_admin_bar->remove_menu( 'comments' ); // Remove the comments link 47 | 48 | /* New content menu */ 49 | $wp_admin_bar->remove_menu( 'new-content' ); // Remove the content link 50 | $wp_admin_bar->remove_menu( 'new-post' ); // Remove the new post link 51 | $wp_admin_bar->remove_menu( 'new-media' ); // Remove the new media link 52 | $wp_admin_bar->remove_menu( 'new-page' ); // Remove the new page link 53 | $wp_admin_bar->remove_menu( 'new-user' ); // Remove the new user link 54 | 55 | /* Edit menu */ 56 | $wp_admin_bar->remove_menu( 'edit' ); // Remove the edit link 57 | 58 | /* Account menu */ 59 | $wp_admin_bar->remove_menu( 'my-account' ); // Remove the user details tab 60 | 61 | /* Search bar */ 62 | $wp_admin_bar->remove_menu( 'search' ); // Remove the search tab 63 | }, 64 | 999 65 | ); 66 | 67 | 68 | 69 | /** 70 | * Replace "Howdy, "-title and avatar with only users display_name 71 | * 72 | * @link https://developer.wordpress.org/reference/hooks/admin_bar_menu/ 73 | */ 74 | add_filter( 75 | 'admin_bar_menu', 76 | function ( $admin_bar ) { 77 | $title = wp_get_current_user()->display_name; 78 | 79 | $admin_bar->add_node( 80 | array( 81 | 'id' => 'my-account', 82 | 'title' => $title, 83 | ) 84 | ); 85 | }, 86 | 25 87 | ); 88 | -------------------------------------------------------------------------------- /admin-footer.php: -------------------------------------------------------------------------------- 1 | Update Core notice 15 | remove_submenu_page( 'index.php', 'update-core.php' ); 16 | 17 | // Remove Posts 18 | remove_menu_page( 'edit.php' ); 19 | // Remove Posts -> New post 20 | remove_submenu_page( 'edit.php', 'post-new.php' ); 21 | // Remove Posts -> Categories 22 | remove_submenu_page( 'edit.php', 'edit-tags.php?taxonomy=category' ); 23 | // Remove Posts -> Tags 24 | remove_submenu_page( 'edit.php', 'edit-tags.php?taxonomy=post_tag' ); 25 | 26 | // Remove Media 27 | remove_menu_page( 'upload.php' ); 28 | // Remove Media -> Library 29 | remove_submenu_page( 'upload.php', 'upload.php' ); 30 | // Remove Media -> Add new media 31 | remove_submenu_page( 'upload.php', 'media-new.php' ); 32 | 33 | // Remove Pages 34 | remove_menu_page( 'edit.php?post_type=page' ); 35 | // Remove Pages -> All pages 36 | remove_submenu_page( 'edit.php?post_type=page', 'edit.php?post_type=page' ); 37 | // Remove Pages -> Add new page 38 | remove_submenu_page( 'edit.php?post_type=page', 'post-new.php?post_type=page' ); 39 | 40 | // Remove Comments 41 | remove_menu_page( 'edit-comments.php' ); 42 | 43 | // Remove Appearance 44 | remove_menu_page( 'themes.php' ); 45 | // Remove Appearance -> Themes 46 | remove_submenu_page( 'themes.php', 'themes.php' ); 47 | // Remove Appearance -> Customize 48 | remove_submenu_page( 'themes.php', 'customize.php?return=' . urlencode( $_SERVER['REQUEST_URI'] ) ); 49 | 50 | // Remove Appearance -> Widgets 51 | remove_submenu_page( 'themes.php', 'widgets.php' ); 52 | // Remove Appearance -> Menus 53 | remove_submenu_page( 'themes.php', 'nav-menus.php.php' ); 54 | // Remove Appearance -> Editor 55 | remove_submenu_page( 'themes.php', 'theme-editor.php' ); 56 | 57 | // Remove Plugins 58 | remove_menu_page( 'plugins.php' ); 59 | // Remove Plugins -> Installed plugins 60 | remove_submenu_page( 'plugins.php', 'plugins.php' ); 61 | // Remove Plugins -> Add new plugins 62 | remove_submenu_page( 'plugins.php', 'plugin-install.php' ); 63 | // Remove Plugins -> Plugin editor 64 | remove_submenu_page( 'plugins.php', 'plugin-editor.php' ); 65 | 66 | // Remove Users 67 | remove_menu_page( 'users.php' ); 68 | // Remove Users -> Users 69 | remove_submenu_page( 'users.php', 'users.php' ); 70 | // Remove Users -> New user 71 | remove_submenu_page( 'users.php', 'user-new.php' ); 72 | // Remove Users -> Your profile 73 | remove_submenu_page( 'users.php', 'profile.php' ); 74 | 75 | // Remove Tools 76 | remove_menu_page( 'tools.php' ); 77 | // Remove Tools -> Available Tools 78 | remove_submenu_page( 'tools.php', 'tools.php' ); 79 | // Remove Tools -> Import 80 | remove_submenu_page( 'tools.php', 'import.php' ); 81 | // Remove Tools -> Export 82 | remove_submenu_page( 'tools.php', 'export.php' ); 83 | 84 | // Remove Settings 85 | remove_menu_page( 'options-general.php' ); 86 | // Remove Settings -> Writing 87 | remove_submenu_page( 'options-general.php', 'options-writing.php' ); 88 | // Remove Settings -> Reading 89 | remove_submenu_page( 'options-general.php', 'options-reading.php' ); 90 | // Remove Settings -> Discussion 91 | remove_submenu_page( 'options-general.php', 'options-discussion.php' ); 92 | // Remove Settings -> Media 93 | remove_submenu_page( 'options-general.php', 'options-media.php' ); 94 | // Remove Settings -> Permalinks 95 | remove_submenu_page( 'options-general.php', 'options-permalink.php' ); 96 | }, 97 | 999 98 | ); 99 | -------------------------------------------------------------------------------- /assets.php: -------------------------------------------------------------------------------- 1 | 0, 14 | 'spam' => 0, 15 | 'trash' => 0, 16 | 'post-trashed' => 0, 17 | 'total_comments' => 0, 18 | 'all' => 0, 19 | 'moderated' => 0, 20 | ); 21 | } 22 | ); 23 | 24 | 25 | /** 26 | * Remove default fields in comment form 27 | * 28 | * @link https://developer.wordpress.org/reference/hooks/comment_form_default_fields/ 29 | */ 30 | add_filter( 31 | 'comment_form_default_fields', 32 | function ( $fields ) { 33 | unset( $fields['author'] ); 34 | unset( $fields['email'] ); 35 | unset( $fields['url'] ); 36 | 37 | return $fields; 38 | } 39 | ); 40 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vincentorback/clean-wordpress-admin", 3 | "license": "UNLICENSED", 4 | "repositories": [ 5 | { 6 | "type": "composer", 7 | "url": "https://wpackagist.org" 8 | } 9 | ], 10 | "scripts": { 11 | "test": "./vendor/bin/phpcbf *.php -q --ignore=vendor --standard=WordPress" 12 | }, 13 | "require-dev": { 14 | "wp-coding-standards/wpcs": "^3.1.0", 15 | "phpcompatibility/phpcompatibility-wp": "^2.1.6", 16 | "squizlabs/php_codesniffer": "^3.12.1", 17 | "dealerdirect/phpcodesniffer-composer-installer": "^1.0.0" 18 | }, 19 | "config": { 20 | "allow-plugins": { 21 | "dealerdirect/phpcodesniffer-composer-installer": true 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", 5 | "This file is @generated automatically" 6 | ], 7 | "content-hash": "ed748311835c69c00130631d86ffc51a", 8 | "packages": [], 9 | "packages-dev": [ 10 | { 11 | "name": "dealerdirect/phpcodesniffer-composer-installer", 12 | "version": "v1.0.0", 13 | "source": { 14 | "type": "git", 15 | "url": "https://github.com/PHPCSStandards/composer-installer.git", 16 | "reference": "4be43904336affa5c2f70744a348312336afd0da" 17 | }, 18 | "dist": { 19 | "type": "zip", 20 | "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/4be43904336affa5c2f70744a348312336afd0da", 21 | "reference": "4be43904336affa5c2f70744a348312336afd0da", 22 | "shasum": "" 23 | }, 24 | "require": { 25 | "composer-plugin-api": "^1.0 || ^2.0", 26 | "php": ">=5.4", 27 | "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" 28 | }, 29 | "require-dev": { 30 | "composer/composer": "*", 31 | "ext-json": "*", 32 | "ext-zip": "*", 33 | "php-parallel-lint/php-parallel-lint": "^1.3.1", 34 | "phpcompatibility/php-compatibility": "^9.0", 35 | "yoast/phpunit-polyfills": "^1.0" 36 | }, 37 | "type": "composer-plugin", 38 | "extra": { 39 | "class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" 40 | }, 41 | "autoload": { 42 | "psr-4": { 43 | "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" 44 | } 45 | }, 46 | "notification-url": "https://packagist.org/downloads/", 47 | "license": [ 48 | "MIT" 49 | ], 50 | "authors": [ 51 | { 52 | "name": "Franck Nijhof", 53 | "email": "franck.nijhof@dealerdirect.com", 54 | "homepage": "http://www.frenck.nl", 55 | "role": "Developer / IT Manager" 56 | }, 57 | { 58 | "name": "Contributors", 59 | "homepage": "https://github.com/PHPCSStandards/composer-installer/graphs/contributors" 60 | } 61 | ], 62 | "description": "PHP_CodeSniffer Standards Composer Installer Plugin", 63 | "homepage": "http://www.dealerdirect.com", 64 | "keywords": [ 65 | "PHPCodeSniffer", 66 | "PHP_CodeSniffer", 67 | "code quality", 68 | "codesniffer", 69 | "composer", 70 | "installer", 71 | "phpcbf", 72 | "phpcs", 73 | "plugin", 74 | "qa", 75 | "quality", 76 | "standard", 77 | "standards", 78 | "style guide", 79 | "stylecheck", 80 | "tests" 81 | ], 82 | "support": { 83 | "issues": "https://github.com/PHPCSStandards/composer-installer/issues", 84 | "source": "https://github.com/PHPCSStandards/composer-installer" 85 | }, 86 | "time": "2023-01-05T11:28:13+00:00" 87 | }, 88 | { 89 | "name": "phpcompatibility/php-compatibility", 90 | "version": "9.3.5", 91 | "source": { 92 | "type": "git", 93 | "url": "https://github.com/PHPCompatibility/PHPCompatibility.git", 94 | "reference": "9fb324479acf6f39452e0655d2429cc0d3914243" 95 | }, 96 | "dist": { 97 | "type": "zip", 98 | "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9fb324479acf6f39452e0655d2429cc0d3914243", 99 | "reference": "9fb324479acf6f39452e0655d2429cc0d3914243", 100 | "shasum": "" 101 | }, 102 | "require": { 103 | "php": ">=5.3", 104 | "squizlabs/php_codesniffer": "^2.3 || ^3.0.2" 105 | }, 106 | "conflict": { 107 | "squizlabs/php_codesniffer": "2.6.2" 108 | }, 109 | "require-dev": { 110 | "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0" 111 | }, 112 | "suggest": { 113 | "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.", 114 | "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." 115 | }, 116 | "type": "phpcodesniffer-standard", 117 | "notification-url": "https://packagist.org/downloads/", 118 | "license": [ 119 | "LGPL-3.0-or-later" 120 | ], 121 | "authors": [ 122 | { 123 | "name": "Wim Godden", 124 | "homepage": "https://github.com/wimg", 125 | "role": "lead" 126 | }, 127 | { 128 | "name": "Juliette Reinders Folmer", 129 | "homepage": "https://github.com/jrfnl", 130 | "role": "lead" 131 | }, 132 | { 133 | "name": "Contributors", 134 | "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors" 135 | } 136 | ], 137 | "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.", 138 | "homepage": "http://techblog.wimgodden.be/tag/codesniffer/", 139 | "keywords": [ 140 | "compatibility", 141 | "phpcs", 142 | "standards" 143 | ], 144 | "support": { 145 | "issues": "https://github.com/PHPCompatibility/PHPCompatibility/issues", 146 | "source": "https://github.com/PHPCompatibility/PHPCompatibility" 147 | }, 148 | "time": "2019-12-27T09:44:58+00:00" 149 | }, 150 | { 151 | "name": "phpcompatibility/phpcompatibility-paragonie", 152 | "version": "1.3.3", 153 | "source": { 154 | "type": "git", 155 | "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git", 156 | "reference": "293975b465e0e709b571cbf0c957c6c0a7b9a2ac" 157 | }, 158 | "dist": { 159 | "type": "zip", 160 | "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/293975b465e0e709b571cbf0c957c6c0a7b9a2ac", 161 | "reference": "293975b465e0e709b571cbf0c957c6c0a7b9a2ac", 162 | "shasum": "" 163 | }, 164 | "require": { 165 | "phpcompatibility/php-compatibility": "^9.0" 166 | }, 167 | "require-dev": { 168 | "dealerdirect/phpcodesniffer-composer-installer": "^1.0", 169 | "paragonie/random_compat": "dev-master", 170 | "paragonie/sodium_compat": "dev-master" 171 | }, 172 | "suggest": { 173 | "dealerdirect/phpcodesniffer-composer-installer": "^1.0 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", 174 | "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." 175 | }, 176 | "type": "phpcodesniffer-standard", 177 | "notification-url": "https://packagist.org/downloads/", 178 | "license": [ 179 | "LGPL-3.0-or-later" 180 | ], 181 | "authors": [ 182 | { 183 | "name": "Wim Godden", 184 | "role": "lead" 185 | }, 186 | { 187 | "name": "Juliette Reinders Folmer", 188 | "role": "lead" 189 | } 190 | ], 191 | "description": "A set of rulesets for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by the Paragonie polyfill libraries.", 192 | "homepage": "http://phpcompatibility.com/", 193 | "keywords": [ 194 | "compatibility", 195 | "paragonie", 196 | "phpcs", 197 | "polyfill", 198 | "standards", 199 | "static analysis" 200 | ], 201 | "support": { 202 | "issues": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/issues", 203 | "security": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/security/policy", 204 | "source": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie" 205 | }, 206 | "funding": [ 207 | { 208 | "url": "https://github.com/PHPCompatibility", 209 | "type": "github" 210 | }, 211 | { 212 | "url": "https://github.com/jrfnl", 213 | "type": "github" 214 | }, 215 | { 216 | "url": "https://opencollective.com/php_codesniffer", 217 | "type": "open_collective" 218 | } 219 | ], 220 | "time": "2024-04-24T21:30:46+00:00" 221 | }, 222 | { 223 | "name": "phpcompatibility/phpcompatibility-wp", 224 | "version": "2.1.6", 225 | "source": { 226 | "type": "git", 227 | "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git", 228 | "reference": "80ccb1a7640995edf1b87a4409fa584cd5869469" 229 | }, 230 | "dist": { 231 | "type": "zip", 232 | "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/80ccb1a7640995edf1b87a4409fa584cd5869469", 233 | "reference": "80ccb1a7640995edf1b87a4409fa584cd5869469", 234 | "shasum": "" 235 | }, 236 | "require": { 237 | "phpcompatibility/php-compatibility": "^9.0", 238 | "phpcompatibility/phpcompatibility-paragonie": "^1.0" 239 | }, 240 | "require-dev": { 241 | "dealerdirect/phpcodesniffer-composer-installer": "^1.0" 242 | }, 243 | "suggest": { 244 | "dealerdirect/phpcodesniffer-composer-installer": "^1.0 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", 245 | "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." 246 | }, 247 | "type": "phpcodesniffer-standard", 248 | "notification-url": "https://packagist.org/downloads/", 249 | "license": [ 250 | "LGPL-3.0-or-later" 251 | ], 252 | "authors": [ 253 | { 254 | "name": "Wim Godden", 255 | "role": "lead" 256 | }, 257 | { 258 | "name": "Juliette Reinders Folmer", 259 | "role": "lead" 260 | } 261 | ], 262 | "description": "A ruleset for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by WordPress.", 263 | "homepage": "http://phpcompatibility.com/", 264 | "keywords": [ 265 | "compatibility", 266 | "phpcs", 267 | "standards", 268 | "static analysis", 269 | "wordpress" 270 | ], 271 | "support": { 272 | "issues": "https://github.com/PHPCompatibility/PHPCompatibilityWP/issues", 273 | "security": "https://github.com/PHPCompatibility/PHPCompatibilityWP/security/policy", 274 | "source": "https://github.com/PHPCompatibility/PHPCompatibilityWP" 275 | }, 276 | "funding": [ 277 | { 278 | "url": "https://github.com/PHPCompatibility", 279 | "type": "github" 280 | }, 281 | { 282 | "url": "https://github.com/jrfnl", 283 | "type": "github" 284 | }, 285 | { 286 | "url": "https://opencollective.com/php_codesniffer", 287 | "type": "open_collective" 288 | } 289 | ], 290 | "time": "2025-01-16T22:34:19+00:00" 291 | }, 292 | { 293 | "name": "phpcsstandards/phpcsextra", 294 | "version": "1.2.1", 295 | "source": { 296 | "type": "git", 297 | "url": "https://github.com/PHPCSStandards/PHPCSExtra.git", 298 | "reference": "11d387c6642b6e4acaf0bd9bf5203b8cca1ec489" 299 | }, 300 | "dist": { 301 | "type": "zip", 302 | "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/11d387c6642b6e4acaf0bd9bf5203b8cca1ec489", 303 | "reference": "11d387c6642b6e4acaf0bd9bf5203b8cca1ec489", 304 | "shasum": "" 305 | }, 306 | "require": { 307 | "php": ">=5.4", 308 | "phpcsstandards/phpcsutils": "^1.0.9", 309 | "squizlabs/php_codesniffer": "^3.8.0" 310 | }, 311 | "require-dev": { 312 | "php-parallel-lint/php-console-highlighter": "^1.0", 313 | "php-parallel-lint/php-parallel-lint": "^1.3.2", 314 | "phpcsstandards/phpcsdevcs": "^1.1.6", 315 | "phpcsstandards/phpcsdevtools": "^1.2.1", 316 | "phpunit/phpunit": "^4.5 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" 317 | }, 318 | "type": "phpcodesniffer-standard", 319 | "extra": { 320 | "branch-alias": { 321 | "dev-stable": "1.x-dev", 322 | "dev-develop": "1.x-dev" 323 | } 324 | }, 325 | "notification-url": "https://packagist.org/downloads/", 326 | "license": [ 327 | "LGPL-3.0-or-later" 328 | ], 329 | "authors": [ 330 | { 331 | "name": "Juliette Reinders Folmer", 332 | "homepage": "https://github.com/jrfnl", 333 | "role": "lead" 334 | }, 335 | { 336 | "name": "Contributors", 337 | "homepage": "https://github.com/PHPCSStandards/PHPCSExtra/graphs/contributors" 338 | } 339 | ], 340 | "description": "A collection of sniffs and standards for use with PHP_CodeSniffer.", 341 | "keywords": [ 342 | "PHP_CodeSniffer", 343 | "phpcbf", 344 | "phpcodesniffer-standard", 345 | "phpcs", 346 | "standards", 347 | "static analysis" 348 | ], 349 | "support": { 350 | "issues": "https://github.com/PHPCSStandards/PHPCSExtra/issues", 351 | "security": "https://github.com/PHPCSStandards/PHPCSExtra/security/policy", 352 | "source": "https://github.com/PHPCSStandards/PHPCSExtra" 353 | }, 354 | "funding": [ 355 | { 356 | "url": "https://github.com/PHPCSStandards", 357 | "type": "github" 358 | }, 359 | { 360 | "url": "https://github.com/jrfnl", 361 | "type": "github" 362 | }, 363 | { 364 | "url": "https://opencollective.com/php_codesniffer", 365 | "type": "open_collective" 366 | } 367 | ], 368 | "time": "2023-12-08T16:49:07+00:00" 369 | }, 370 | { 371 | "name": "phpcsstandards/phpcsutils", 372 | "version": "1.0.12", 373 | "source": { 374 | "type": "git", 375 | "url": "https://github.com/PHPCSStandards/PHPCSUtils.git", 376 | "reference": "87b233b00daf83fb70f40c9a28692be017ea7c6c" 377 | }, 378 | "dist": { 379 | "type": "zip", 380 | "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/87b233b00daf83fb70f40c9a28692be017ea7c6c", 381 | "reference": "87b233b00daf83fb70f40c9a28692be017ea7c6c", 382 | "shasum": "" 383 | }, 384 | "require": { 385 | "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0", 386 | "php": ">=5.4", 387 | "squizlabs/php_codesniffer": "^3.10.0 || 4.0.x-dev@dev" 388 | }, 389 | "require-dev": { 390 | "ext-filter": "*", 391 | "php-parallel-lint/php-console-highlighter": "^1.0", 392 | "php-parallel-lint/php-parallel-lint": "^1.3.2", 393 | "phpcsstandards/phpcsdevcs": "^1.1.6", 394 | "yoast/phpunit-polyfills": "^1.1.0 || ^2.0.0" 395 | }, 396 | "type": "phpcodesniffer-standard", 397 | "extra": { 398 | "branch-alias": { 399 | "dev-stable": "1.x-dev", 400 | "dev-develop": "1.x-dev" 401 | } 402 | }, 403 | "autoload": { 404 | "classmap": [ 405 | "PHPCSUtils/" 406 | ] 407 | }, 408 | "notification-url": "https://packagist.org/downloads/", 409 | "license": [ 410 | "LGPL-3.0-or-later" 411 | ], 412 | "authors": [ 413 | { 414 | "name": "Juliette Reinders Folmer", 415 | "homepage": "https://github.com/jrfnl", 416 | "role": "lead" 417 | }, 418 | { 419 | "name": "Contributors", 420 | "homepage": "https://github.com/PHPCSStandards/PHPCSUtils/graphs/contributors" 421 | } 422 | ], 423 | "description": "A suite of utility functions for use with PHP_CodeSniffer", 424 | "homepage": "https://phpcsutils.com/", 425 | "keywords": [ 426 | "PHP_CodeSniffer", 427 | "phpcbf", 428 | "phpcodesniffer-standard", 429 | "phpcs", 430 | "phpcs3", 431 | "standards", 432 | "static analysis", 433 | "tokens", 434 | "utility" 435 | ], 436 | "support": { 437 | "docs": "https://phpcsutils.com/", 438 | "issues": "https://github.com/PHPCSStandards/PHPCSUtils/issues", 439 | "security": "https://github.com/PHPCSStandards/PHPCSUtils/security/policy", 440 | "source": "https://github.com/PHPCSStandards/PHPCSUtils" 441 | }, 442 | "funding": [ 443 | { 444 | "url": "https://github.com/PHPCSStandards", 445 | "type": "github" 446 | }, 447 | { 448 | "url": "https://github.com/jrfnl", 449 | "type": "github" 450 | }, 451 | { 452 | "url": "https://opencollective.com/php_codesniffer", 453 | "type": "open_collective" 454 | } 455 | ], 456 | "time": "2024-05-20T13:34:27+00:00" 457 | }, 458 | { 459 | "name": "squizlabs/php_codesniffer", 460 | "version": "3.12.1", 461 | "source": { 462 | "type": "git", 463 | "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", 464 | "reference": "ea16a1f3719783345febd3aab41beb55c8c84bfd" 465 | }, 466 | "dist": { 467 | "type": "zip", 468 | "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/ea16a1f3719783345febd3aab41beb55c8c84bfd", 469 | "reference": "ea16a1f3719783345febd3aab41beb55c8c84bfd", 470 | "shasum": "" 471 | }, 472 | "require": { 473 | "ext-simplexml": "*", 474 | "ext-tokenizer": "*", 475 | "ext-xmlwriter": "*", 476 | "php": ">=5.4.0" 477 | }, 478 | "require-dev": { 479 | "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" 480 | }, 481 | "bin": [ 482 | "bin/phpcbf", 483 | "bin/phpcs" 484 | ], 485 | "type": "library", 486 | "extra": { 487 | "branch-alias": { 488 | "dev-master": "3.x-dev" 489 | } 490 | }, 491 | "notification-url": "https://packagist.org/downloads/", 492 | "license": [ 493 | "BSD-3-Clause" 494 | ], 495 | "authors": [ 496 | { 497 | "name": "Greg Sherwood", 498 | "role": "Former lead" 499 | }, 500 | { 501 | "name": "Juliette Reinders Folmer", 502 | "role": "Current lead" 503 | }, 504 | { 505 | "name": "Contributors", 506 | "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" 507 | } 508 | ], 509 | "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", 510 | "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", 511 | "keywords": [ 512 | "phpcs", 513 | "standards", 514 | "static analysis" 515 | ], 516 | "support": { 517 | "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", 518 | "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", 519 | "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", 520 | "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" 521 | }, 522 | "funding": [ 523 | { 524 | "url": "https://github.com/PHPCSStandards", 525 | "type": "github" 526 | }, 527 | { 528 | "url": "https://github.com/jrfnl", 529 | "type": "github" 530 | }, 531 | { 532 | "url": "https://opencollective.com/php_codesniffer", 533 | "type": "open_collective" 534 | }, 535 | { 536 | "url": "https://thanks.dev/u/gh/phpcsstandards", 537 | "type": "thanks_dev" 538 | } 539 | ], 540 | "time": "2025-04-04T12:57:55+00:00" 541 | }, 542 | { 543 | "name": "wp-coding-standards/wpcs", 544 | "version": "3.1.0", 545 | "source": { 546 | "type": "git", 547 | "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", 548 | "reference": "9333efcbff231f10dfd9c56bb7b65818b4733ca7" 549 | }, 550 | "dist": { 551 | "type": "zip", 552 | "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/9333efcbff231f10dfd9c56bb7b65818b4733ca7", 553 | "reference": "9333efcbff231f10dfd9c56bb7b65818b4733ca7", 554 | "shasum": "" 555 | }, 556 | "require": { 557 | "ext-filter": "*", 558 | "ext-libxml": "*", 559 | "ext-tokenizer": "*", 560 | "ext-xmlreader": "*", 561 | "php": ">=5.4", 562 | "phpcsstandards/phpcsextra": "^1.2.1", 563 | "phpcsstandards/phpcsutils": "^1.0.10", 564 | "squizlabs/php_codesniffer": "^3.9.0" 565 | }, 566 | "require-dev": { 567 | "php-parallel-lint/php-console-highlighter": "^1.0.0", 568 | "php-parallel-lint/php-parallel-lint": "^1.3.2", 569 | "phpcompatibility/php-compatibility": "^9.0", 570 | "phpcsstandards/phpcsdevtools": "^1.2.0", 571 | "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" 572 | }, 573 | "suggest": { 574 | "ext-iconv": "For improved results", 575 | "ext-mbstring": "For improved results" 576 | }, 577 | "type": "phpcodesniffer-standard", 578 | "notification-url": "https://packagist.org/downloads/", 579 | "license": [ 580 | "MIT" 581 | ], 582 | "authors": [ 583 | { 584 | "name": "Contributors", 585 | "homepage": "https://github.com/WordPress/WordPress-Coding-Standards/graphs/contributors" 586 | } 587 | ], 588 | "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions", 589 | "keywords": [ 590 | "phpcs", 591 | "standards", 592 | "static analysis", 593 | "wordpress" 594 | ], 595 | "support": { 596 | "issues": "https://github.com/WordPress/WordPress-Coding-Standards/issues", 597 | "source": "https://github.com/WordPress/WordPress-Coding-Standards", 598 | "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki" 599 | }, 600 | "funding": [ 601 | { 602 | "url": "https://opencollective.com/php_codesniffer", 603 | "type": "custom" 604 | } 605 | ], 606 | "time": "2024-03-25T16:39:00+00:00" 607 | } 608 | ], 609 | "aliases": [], 610 | "minimum-stability": "stable", 611 | "stability-flags": {}, 612 | "prefer-stable": false, 613 | "prefer-lowest": false, 614 | "platform": {}, 615 | "platform-dev": {}, 616 | "plugin-api-version": "2.6.0" 617 | } 618 | -------------------------------------------------------------------------------- /content-tables.php: -------------------------------------------------------------------------------- 1 | ", "edit-comments", "plugins", "users" or "upload". 51 | * 52 | * @link 53 | */ 54 | add_filter( 55 | 'bulk_actions-edit-post', 56 | function ( $actions ) { 57 | unset( 58 | $actions['edit'], 59 | $actions['trash'] 60 | ); 61 | 62 | return $actions; 63 | } 64 | ); 65 | -------------------------------------------------------------------------------- /contextual-tabs.php: -------------------------------------------------------------------------------- 1 | remove_help_tabs(); 16 | 17 | // Remove specific 18 | $screen->remove_help_tab( 'id-of-tab-you-want-to-remove' ); 19 | } 20 | ); 21 | 22 | 23 | /** 24 | * Remove Screen Options tab 25 | * 26 | * @link https://developer.wordpress.org/reference/hooks/screen_options_show_screen/ 27 | */ 28 | add_filter( 'screen_options_show_screen', '__return_false' ); 29 | -------------------------------------------------------------------------------- /customizer.php: -------------------------------------------------------------------------------- 1 | ID === 123 ) { 18 | return false; 19 | } 20 | 21 | // Disable for post type 22 | if ( $post->post_type == 'event' ) { 23 | return false; 24 | } 25 | 26 | // Disable for page template 27 | if ( basename( get_page_template( $post->ID ) ) == 'template-events.php' ) { 28 | return false; 29 | } 30 | 31 | // Return default value 32 | return $use_block_editor; 33 | }, 34 | 10, 35 | 2 36 | ); 37 | 38 | 39 | /** 40 | * Change editor settings 41 | * 42 | * @deprecated These should be set in theme.json from now on 43 | * @link https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-json/#backward-compatibility-with-add_theme_support 44 | */ 45 | add_action( 46 | 'after_setup_theme', 47 | function () { 48 | // Remove default colors 49 | add_theme_support( 'editor-color-palette', array() ); 50 | 51 | // Disable custom colors 52 | add_theme_support( 'disable-custom-colors' ); 53 | 54 | // Remove default font sizes 55 | add_theme_support( 'editor-font-sizes', array() ); 56 | 57 | // Disable setting a custom font size 58 | add_theme_support( 'disable-custom-font-sizes' ); 59 | 60 | // Remove default gradients 61 | remove_theme_support( 'editor-gradient-presets', array() ); 62 | 63 | // Disable custom gradients 64 | add_theme_support( 'disable-custom-gradients' ); 65 | } 66 | ); 67 | 68 | 69 | 70 | /** 71 | * Set allowed block types 72 | * 73 | * @link https://developer.wordpress.org/reference/hooks/allowed_block_types_all/ 74 | * @link https://developer.wordpress.org/block-editor/reference-guides/core-blocks/ 75 | */ 76 | add_filter( 77 | 'allowed_block_types_all', 78 | function ( $block_editor_context, $editor_context ) { 79 | if ( ! empty( $editor_context->post ) ) { 80 | return array( 81 | 'core/button', 82 | 'core/buttons', 83 | 'core/freeform', 84 | 'core/code', 85 | 'core/column', 86 | 'core/columns', 87 | 'core/file', 88 | 'core/gallery', 89 | 'core/group', 90 | 'core/heading', 91 | 'core/html', 92 | 'core/image', 93 | 'core/list', 94 | 'core/list-item', 95 | 'core/media-text', 96 | 'core/missing', 97 | 'core/more', 98 | 'core/navigation-link', 99 | 'core/nextpage', 100 | 'core/paragraph', 101 | 'core/preformatted', 102 | 'core/pullquote', 103 | 'core/quote', 104 | 'core/separator', 105 | 'core/social-links', 106 | 'core/spacer', 107 | 'core/subhead', 108 | 'core/table', 109 | 'core/text-columns', 110 | 'core/verse', 111 | 'core/video', 112 | 'core/embed', 113 | 114 | 'core/archives', 115 | 'core/block', 116 | 'core/calendar', 117 | 'core/categories', 118 | 'core/cover', 119 | 'core/latest-comments', 120 | 'core/latest-posts', 121 | 'core/navigation', 122 | 'core/navigation-link', 123 | 'core/rss', 124 | 'core/search', 125 | 'core/shortcode', 126 | 'core/social-link', 127 | 'core/tag-cloud', 128 | 'core/post-author', 129 | 'core/post-comment', 130 | 'core/post-comment-author', 131 | 'core/post-comment-content', 132 | 'core/post-comment-date', 133 | 'core/post-comments', 134 | 'core/post-comments-count', 135 | 'core/post-comments-form', 136 | 'core/post-content', 137 | 'core/post-date', 138 | 'core/post-excerpt', 139 | 'core/post-featured-image', 140 | 'core/post-hierarchical-terms', 141 | 'core/post-tags', 142 | 'core/post-title', 143 | 'core/query', 144 | 'core/query-loop', 145 | 'core/query-pagination', 146 | 'core/site-logo', 147 | 'core/site-tagline', 148 | 'core/site-title', 149 | 'core/template-part', 150 | ); 151 | } 152 | 153 | return $block_editor_context; 154 | }, 155 | 10, 156 | 2 157 | ); 158 | 159 | 160 | 161 | /** 162 | * Remove bult in block patterns 163 | */ 164 | add_action( 165 | 'after_setup_theme', 166 | function () { 167 | remove_theme_support( 'core-block-patterns' ); 168 | }, 169 | 11 170 | ); 171 | 172 | 173 | 174 | /** 175 | * Hide taxonomy metaboxes 176 | * 177 | * @link https://developer.wordpress.org/reference/hooks/rest_prepare_taxonomy/ 178 | */ 179 | add_filter( 180 | 'rest_prepare_taxonomy', 181 | function ( $response, $taxonomy ) { 182 | if ( 'post_tag' == $taxonomy->name ) { 183 | $response->data['visibility']['show_ui'] = false; 184 | } 185 | 186 | if ( 'category' == $taxonomy->name ) { 187 | $response->data['visibility']['show_ui'] = false; 188 | } 189 | 190 | return $response; 191 | }, 192 | 10, 193 | 2 194 | ); 195 | 196 | 197 | 198 | /** 199 | * Remove default theme json settings. 200 | * Even if these are removed in you theme.json-file, they will still be used by the inline styles "global-styles" because they could be used by blocks, plugins etc. 201 | * 202 | * @link https://developer.wordpress.org/reference/hooks/wp_theme_json_data_default/ 203 | */ 204 | add_filter( 205 | 'wp_theme_json_data_default', 206 | function ( $theme_json ) { 207 | $new_data = array( 208 | 'version' => 2, 209 | 'settings' => array( 210 | 'color' => array( 211 | 'palette' => array(), 212 | 'gradients' => array(), 213 | 'duotone' => array(), 214 | ), 215 | 'shadow' => array(), 216 | 'typography' => array( 217 | 'fontSizes' => array(), 218 | 'fontFamilies' => array(), 219 | 'fontWeights' => array(), 220 | 'lineHeights' => array(), 221 | 'letterSpacings' => array(), 222 | ), 223 | ), 224 | ); 225 | 226 | return $theme_json->update_with( $new_data ); 227 | } 228 | ); 229 | -------------------------------------------------------------------------------- /email.php: -------------------------------------------------------------------------------- 1 | .forgetmenot { display:none; }'; 10 | } 11 | ); 12 | -------------------------------------------------------------------------------- /media.php: -------------------------------------------------------------------------------- 1 | 61 | Edit 22 | remove_submenu_page( 'edit.php?post_type=acf-field-group', 'post-new.php?post_type=acf-field-group' ); 23 | 24 | // Remove ACF -> Tools 25 | remove_submenu_page( 'edit.php?post_type=acf-field-group', 'acf-settings-tools' ); 26 | 27 | // Remove ACF -> Updates 28 | remove_submenu_page( 'edit.php?post_type=acf-field-group', 'acf-settings-updates' ); 29 | 30 | // Remove custom ACF Options page 31 | remove_menu_page( 'acf-options-name-of-page' ); 32 | }, 33 | 999 34 | ); 35 | 36 | 37 | 38 | /** 39 | * Remove toolbar items from wysiwyg-field 40 | */ 41 | add_filter( 42 | 'acf/fields/wysiwyg/toolbars', 43 | function( $toolbars ) { 44 | $toolbars['Basic'] = array(); 45 | $toolbars['Basic'][1] = array('link,removeformat'); 46 | 47 | return $toolbars; 48 | } 49 | ); 50 | -------------------------------------------------------------------------------- /plugins/jetpack.php: -------------------------------------------------------------------------------- 1 | remove_menu( 'wpseo-menu' ); 43 | }, 44 | 999 45 | ); 46 | 47 | 48 | 49 | /** 50 | * Remove Yoast 'primary' categories 51 | */ 52 | add_filter( 'wpseo_primary_term_taxonomies', '__return_empty_array' ); 53 | 54 | 55 | 56 | /** 57 | * Remove Yoast post columns 58 | */ 59 | add_filter( 60 | 'manage_posts_columns', 61 | function ( $columns ) { 62 | unset( 63 | $columns['wpseo-score'], 64 | $columns['wpseo-title'], 65 | $columns['wpseo-metadesc'], 66 | $columns['wpseo-focuskw'], 67 | $coulmns['wpseo-links'] 68 | ); 69 | 70 | return $columns; 71 | } 72 | ); 73 | 74 | 75 | 76 | /** 77 | * Remove Yoast page columns 78 | */ 79 | add_filter( 80 | 'manage_page_columns', 81 | function ( $columns ) { 82 | unset( 83 | $columns['wpseo-score'], 84 | $columns['wpseo-title'], 85 | $columns['wpseo-metadesc'], 86 | $columns['wpseo-focuskw'], 87 | $columns['wpseo-links'] 88 | ); 89 | 90 | return $columns; 91 | } 92 | ); 93 | 94 | 95 | 96 | /** 97 | * Remove Yoast metabox on dashboard 98 | */ 99 | add_action( 100 | 'wp_dashboard_setup', 101 | function () { 102 | remove_meta_box( 'wpseo-dashboard-overview', 'dashboard', 'side' ); 103 | } 104 | ); 105 | 106 | 107 | 108 | /** 109 | * Remove Yoast presentation items 110 | * Description, robots, open graph, twitter, etc. 111 | * 112 | * @link https://gist.github.com/amboutwe/811e92b11e5277977047d44ea81ee9d4#file-yoast_seo_opengraph_remove_presenters-php 113 | */ 114 | add_filter( 115 | 'wpseo_frontend_presenter_classes', 116 | function ( $filter ) { 117 | $presenter_to_remove = array( 118 | 'Yoast\WP\SEO\Presenters\Meta_Description_Presenter', 119 | 'Yoast\WP\SEO\Presenters\Robots_Presenter', 120 | 'Yoast\WP\SEO\Presenters\Canonical_Presenter', 121 | 122 | // Prev next relations 123 | 'Yoast\WP\SEO\Presenters\Rel_Prev_Presenter', 124 | 'Yoast\WP\SEO\Presenters\Rel_Next_Presenter', 125 | 126 | // Open Graph 127 | 'Yoast\WP\SEO\Presenters\Open_Graph\Locale_Presenter', 128 | 'Yoast\WP\SEO\Presenters\Open_Graph\Type_Presenter', 129 | 'Yoast\WP\SEO\Presenters\Open_Graph\Title_Presenter', 130 | 'Yoast\WP\SEO\Presenters\Open_Graph\Description_Presenter', 131 | 'Yoast\WP\SEO\Presenters\Open_Graph\Url_Presenter', 132 | 'Yoast\WP\SEO\Presenters\Open_Graph\Site_Name_Presenter', 133 | 'Yoast\WP\SEO\Presenters\Open_Graph\Article_Publisher_Presenter', 134 | 'Yoast\WP\SEO\Presenters\Open_Graph\Article_Author_Presenter', 135 | 'Yoast\WP\SEO\Presenters\Open_Graph\Article_Published_Time_Presenter', 136 | 'Yoast\WP\SEO\Presenters\Open_Graph\Article_Modified_Time_Presenter', 137 | 'Yoast\WP\SEO\Presenters\Open_Graph\Image_Presenter', 138 | 139 | // Twitter 140 | 'Yoast\WP\SEO\Presenters\Twitter\Card_Presenter', 141 | 'Yoast\WP\SEO\Presenters\Twitter\Title_Presenter', 142 | 'Yoast\WP\SEO\Presenters\Twitter\Description_Presenter', 143 | 'Yoast\WP\SEO\Presenters\Twitter\Image_Presenter', 144 | 'Yoast\WP\SEO\Presenters\Twitter\Creator_Presenter', 145 | 'Yoast\WP\SEO\Presenters\Twitter\Site_Presenter', 146 | ); 147 | 148 | foreach ( $presenter_to_remove as $presenter ) { 149 | if ( ( $key = array_search( $presenter, $filter ) ) !== false ) { 150 | unset( $filter[ $key ] ); 151 | } 152 | } 153 | 154 | return $filter; 155 | } 156 | ); 157 | 158 | 159 | 160 | /** 161 | * Remove breadcrumbs from schema 162 | */ 163 | add_filter( 'wpseo_schema_graph_pieces', function ($pieces, $context) { 164 | return \array_filter( $pieces, function( $piece ) { 165 | return ! $piece instanceof \Yoast\WP\SEO\Generators\Schema\Breadcrumb; 166 | }); 167 | }, 11, 2 ); 168 | 169 | add_filter( 'wpseo_schema_webpage', function ($data) { 170 | if (array_key_exists('breadcrumb', $data)) { 171 | unset($data['breadcrumb']); 172 | } 173 | 174 | return $data; 175 | }, 11, 1 ); 176 | 177 | 178 | 179 | /** 180 | * Remove wordpress author from meta and schema 181 | */ 182 | 183 | add_filter('wpseo_meta_author', '__return_false'); 184 | -------------------------------------------------------------------------------- /posts.php: -------------------------------------------------------------------------------- 1 | rest_authorization_required_code() ) 31 | ); 32 | } 33 | 34 | return $existing_callback( $request ); 35 | }; 36 | } 37 | 38 | function api_users_endpoint_force_auth( $endpoints ) { 39 | $users_get_route = &$endpoints['/wp/v2/users'][0]; 40 | $users_get_route['permission_callback'] = users_permission_check( $users_get_route['permission_callback'] ); 41 | 42 | $user_get_route = &$endpoints['/wp/v2/users/(?P[\d]+)'][0]; 43 | $user_get_route['permission_callback'] = users_permission_check( $user_get_route['permission_callback'] ); 44 | 45 | return $endpoints; 46 | } 47 | 48 | add_filter( 'rest_endpoints', 'api_users_endpoint_force_auth' ); 49 | 50 | 51 | 52 | /** 53 | * Fullt disable the REST API 54 | * (not recommended, will probably break stuff) 55 | */ 56 | add_action( 57 | 'init', 58 | function () { 59 | add_filter( 'rest_jsonp_enabled', '__return_false' ); 60 | 61 | remove_action( 'xmlrpc_rsd_apis', 'rest_output_rsd' ); 62 | remove_action( 'wp_head', 'rest_output_link_wp_head', 10 ); 63 | remove_action( 'template_redirect', 'rest_output_link_header', 11 ); 64 | } 65 | ); 66 | 67 | 68 | 69 | 70 | 71 | /** 72 | * Remove REST API endpoints for non-logged in users 73 | */ 74 | add_filter( 75 | 'rest_authentication_errors', 76 | function ( $result ) { 77 | if ( 78 | ! empty( $result ) || 79 | is_admin_request() || 80 | is_customize_preview() 81 | ) { 82 | return $result; 83 | } 84 | 85 | wp_send_json_error( 86 | array( 87 | 'code' => 'rest_not_logged_in', 88 | 'message' => 'Sorry, you must be logged in to access this API.', 89 | 'data' => array( 90 | 'status' => 401, 91 | ), 92 | ), 93 | 401 94 | ); 95 | } 96 | ); 97 | 98 | function is_admin_request() { 99 | /** 100 | * Get current URL. 101 | * 102 | * @link https://wordpress.stackexchange.com/a/126534 103 | */ 104 | $current_url = home_url( add_query_arg( null, null ) ); 105 | 106 | /** 107 | * Get admin URL and referrer. 108 | * 109 | * @link https://core.trac.wordpress.org/browser/tags/4.8/src/wp-includes/pluggable.php#L1076 110 | */ 111 | $admin_url = strtolower( admin_url() ); 112 | $referrer = strtolower( wp_get_referer() ); 113 | 114 | // $requestFromBackend = is_rest() && strpos($admin_url, '/wp-admin/') > 0 && !strpos($admin_url, '/wp-admin/admin-ajax.php'); 115 | 116 | // if ($requestFromBackend) { 117 | // return true; 118 | // } 119 | 120 | /** 121 | * Check if this is a admin request. If true, it 122 | * could also be a AJAX request from the frontend. 123 | */ 124 | if ( 0 === strpos( $current_url, $admin_url ) ) { 125 | /** 126 | * Check if the user comes from a admin page. 127 | */ 128 | if ( 0 === strpos( $referrer, $admin_url ) ) { 129 | return true; 130 | } else { 131 | /** 132 | * Check for AJAX requests. 133 | * 134 | * @link https://gist.github.com/zitrusblau/58124d4b2c56d06b070573a99f33b9ed#file-lazy-load-responsive-images-php-L193 135 | */ 136 | return ! wp_doing_ajax(); 137 | } 138 | } else { 139 | return false; 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /roles.php: -------------------------------------------------------------------------------- 1 | remove_cap( 'manage_network' ); 36 | $cap_target->remove_cap( 'manage_sites' ); 37 | $cap_target->remove_cap( 'manage_network_users' ); 38 | $cap_target->remove_cap( 'manage_network_plugins' ); 39 | $cap_target->remove_cap( 'manage_network_themes' ); 40 | $cap_target->remove_cap( 'manage_network_options' ); 41 | 42 | // Administrator 43 | $cap_target->remove_cap( 'activate_plugins' ); 44 | $cap_target->remove_cap( 'delete_others_pages' ); 45 | $cap_target->remove_cap( 'delete_others_posts' ); 46 | $cap_target->remove_cap( 'delete_posts' ); 47 | $cap_target->remove_cap( 'delete_published_pages' ); 48 | $cap_target->remove_cap( 'edit_dashboard' ); 49 | $cap_target->remove_cap( 'edit_theme_options' ); 50 | $cap_target->remove_cap( 'export' ); 51 | $cap_target->remove_cap( 'import' ); 52 | $cap_target->remove_cap( 'list_users' ); 53 | $cap_target->remove_cap( 'manage_options' ); 54 | $cap_target->remove_cap( 'promote_users' ); 55 | $cap_target->remove_cap( 'remove_users' ); 56 | $cap_target->remove_cap( 'switch_themes' ); 57 | 58 | // Additional Admin Capabilities (available on single sites) 59 | $cap_target->remove_cap( 'update_core' ); 60 | $cap_target->remove_cap( 'update_plugins' ); 61 | $cap_target->remove_cap( 'update_themes' ); 62 | $cap_target->remove_cap( 'install_plugins' ); 63 | $cap_target->remove_cap( 'install_themes' ); 64 | $cap_target->remove_cap( 'delete_themes' ); 65 | $cap_target->remove_cap( 'delete_plugins' ); 66 | $cap_target->remove_cap( 'edit_plugins' ); 67 | $cap_target->remove_cap( 'edit_themes' ); 68 | $cap_target->remove_cap( 'edit_files' ); 69 | $cap_target->remove_cap( 'edit_users' ); 70 | $cap_target->remove_cap( 'create_users' ); 71 | $cap_target->remove_cap( 'delete_users' ); 72 | 73 | // Editor 74 | $cap_target->remove_cap( 'delete_others_pages' ); 75 | $cap_target->remove_cap( 'delete_others_posts' ); 76 | $cap_target->remove_cap( 'delete_pages' ); 77 | $cap_target->remove_cap( 'delete_private_pages' ); 78 | $cap_target->remove_cap( 'delete_private_posts' ); 79 | $cap_target->remove_cap( 'delete_published_pages' ); 80 | $cap_target->remove_cap( 'edit_others_pages' ); 81 | $cap_target->remove_cap( 'edit_others_posts' ); 82 | $cap_target->remove_cap( 'edit_pages' ); 83 | $cap_target->remove_cap( 'edit_private_pages' ); 84 | $cap_target->remove_cap( 'edit_private_posts' ); 85 | $cap_target->remove_cap( 'edit_published_pages' ); 86 | $cap_target->remove_cap( 'manage_links' ); 87 | $cap_target->remove_cap( 'moderate_comments' ); 88 | $cap_target->remove_cap( 'publish_pages' ); 89 | $cap_target->remove_cap( 'read_private_pages' ); 90 | $cap_target->remove_cap( 'read_private_posts' ); 91 | $cap_target->remove_cap( 'unfiltered_html' ); // not available on multisites 92 | 93 | // Author 94 | $cap_target->remove_cap( 'edit_published_posts' ); 95 | $cap_target->remove_cap( 'delete_published_posts' ); 96 | $cap_target->remove_cap( 'publish_posts' ); 97 | $cap_target->remove_cap( 'upload_files' ); 98 | 99 | // Contributor 100 | $cap_target->remove_cap( 'edit_posts' ); 101 | $cap_target->remove_cap( 'delete_posts' ); 102 | 103 | // Subscriber 104 | $cap_target->remove_cap( 'read' ); 105 | 106 | // Not available to anyone 107 | $cap_target->remove_cap( 'unfiltered_upload' ); 108 | } 109 | ); 110 | -------------------------------------------------------------------------------- /search.php: -------------------------------------------------------------------------------- 1 | is_search = false; 14 | $query->query_vars['s'] = false; 15 | $query->query['s'] = false; 16 | 17 | // Send to 404 18 | $query->is_404 = true; 19 | } 20 | } 21 | ); 22 | 23 | 24 | /** 25 | * Disable search form 26 | * 27 | * @link https://developer.wordpress.org/reference/hooks/get_search_form/ 28 | */ 29 | add_filter( 'get_search_form', '__return_empty_string' ); 30 | -------------------------------------------------------------------------------- /theme.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "settings": { 4 | "border": { 5 | "color": false, 6 | "radius": false, 7 | "style": false, 8 | "width": false 9 | }, 10 | "color": { 11 | "background": false, 12 | "custom": false, 13 | "customDuotone": false, 14 | "customGradient": false, 15 | "defaultGradients": false, 16 | "defaultPalette": false, 17 | "duotone": null, 18 | "gradients": [], 19 | "link": false, 20 | "palette": [], 21 | "text": false 22 | }, 23 | "shadow": { 24 | "defaultPresets": false 25 | }, 26 | "spacing": { 27 | "customSpacingSize": false 28 | }, 29 | "typography": { 30 | "customFontSize": false, 31 | "dropCap": false, 32 | "fontFamilies": [], 33 | "fontSizes": [], 34 | "fontStyle": false, 35 | "fontWeight": false, 36 | "letterSpacing": false, 37 | "textDecoration": false, 38 | "textTransform": false 39 | }, 40 | "blocks": { 41 | "core/heading": {}, 42 | "blocks": { 43 | "core/button": { 44 | "border": { 45 | "radius": false 46 | }, 47 | "layout": { 48 | "width": false 49 | } 50 | } 51 | }, 52 | "core/paragraph": { 53 | "border": {}, 54 | "color": {}, 55 | "custom": {}, 56 | "layout": {}, 57 | "spacing": {}, 58 | "typography": {} 59 | }, 60 | "etc": {} 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /tinymce-editor.php: -------------------------------------------------------------------------------- 1 | updates = array(); 13 | $current->version_checked = $wp_version; 14 | $current->last_checked = time(); 15 | 16 | return $current; 17 | } 18 | 19 | // Core update notifications 20 | add_filter( 'pre_site_transient_update_core', 'set_last_checked_to_now' ); 21 | 22 | // Plugin update notifications 23 | add_filter( 'pre_site_transient_update_plugins', 'set_last_checked_to_now' ); 24 | 25 | // Theme update notifications 26 | add_filter( 'pre_site_transient_update_themes', 'set_last_checked_to_now' ); 27 | } 28 | 29 | if ( ! function_exists( 'remove_translation_updates' ) ) { 30 | function remove_translation_updates( $transient ) { 31 | if ( is_object( $transient ) && isset( $transient->translations ) ) { 32 | $transient->translations = array(); 33 | } 34 | 35 | return $transient; 36 | } 37 | 38 | // Core translation notifications 39 | add_filter( 'site_transient_update_core', 'remove_translation_updates' ); 40 | 41 | // Plugin translation notifications 42 | add_filter( 'site_transient_update_plugins', 'remove_translation_updates' ); 43 | 44 | // Theme translation notifications 45 | add_filter( 'site_transient_update_themes', 'remove_translation_updates' ); 46 | } 47 | 48 | 49 | /** 50 | * Remove actions that checks for updates 51 | */ 52 | add_action( 53 | 'admin_init', 54 | function () { 55 | remove_action( 'wp_maybe_auto_update', 'wp_maybe_auto_update' ); 56 | remove_action( 'admin_init', 'wp_maybe_auto_update' ); 57 | remove_action( 'admin_init', 'wp_auto_update_core' ); 58 | wp_clear_scheduled_hook( 'wp_maybe_auto_update' ); 59 | } 60 | ); 61 | 62 | 63 | /** 64 | * Disable automatic core updates 65 | */ 66 | add_filter( 'automatic_updater_disabled', '__return_true' ); 67 | add_filter( 'allow_minor_auto_core_updates', '__return_false' ); 68 | add_filter( 'allow_major_auto_core_updates', '__return_false' ); 69 | add_filter( 'allow_dev_auto_core_updates', '__return_false' ); 70 | add_filter( 'auto_update_core', '__return_false' ); 71 | add_filter( 'wp_auto_update_core', '__return_false' ); 72 | add_filter( 'auto_core_update_send_email', '__return_false' ); 73 | add_filter( 'send_core_update_notification_email', '__return_false' ); 74 | add_filter( 'automatic_updates_send_debug_email', '__return_false' ); 75 | add_filter( 'automatic_updates_is_vcs_checkout', '__return_true' ); 76 | 77 | 78 | /** 79 | * Disable automatic plugin updates 80 | */ 81 | add_filter( 'auto_update_plugin', '__return_false' ); 82 | 83 | 84 | /** 85 | * Disable automatic theme updates 86 | */ 87 | add_filter( 'auto_update_theme', '__return_false' ); 88 | 89 | 90 | /** 91 | * Disable automatic translation updates 92 | */ 93 | add_filter( 'auto_update_translation', '__return_false' ); 94 | -------------------------------------------------------------------------------- /users.php: -------------------------------------------------------------------------------- 1 | 64 |