Created
September 20, 2017 00:15
-
-
Save Log1x/8ca179e96a20ae6a8024b46dc31e79f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
use function \Sober\Intervention\intervention; | |
if (function_exists('Sober\Intervention\intervention')) { | |
// Add Welcome Dashboard | |
intervention('add-dashboard-item', [ | |
'Welcome', | |
'Welcome to '.get_bloginfo('name') | |
]); | |
// Add SVG Support | |
intervention('add-svg-support', [ | |
'admin', | |
'editor' | |
]); | |
// Remove Dashboard Items | |
intervention('remove-dashboard-items'); | |
// Remove Emoji | |
intervention('remove-emoji'); | |
// Remove Howdy | |
intervention('remove-howdy', ''); | |
// Remove footer | |
intervention('update-label-footer'); | |
// Remove Page Components | |
intervention('remove-page-components', [ | |
'author', | |
'comments' | |
]); | |
// Remove Post Components | |
intervention('remove-post-components', [ | |
'comments', | |
'trackbacks' | |
]); | |
// Remove toolbar from non-admin users | |
intervention('remove-toolbar-frontend', [ | |
'all-not-admin' | |
]); | |
// Remove unused user fields | |
intervention('remove-user-fields', [ | |
'option-title', | |
'option-editor', | |
'option-schemes', | |
'option-shortcuts', | |
'option-toolbar', | |
'contact', | |
'contact-web', | |
'about', | |
'about-bio', | |
'about-profile' | |
]); | |
// Remove toolbar items for all | |
intervention('remove-toolbar-items', [ | |
'logo', | |
'comments', | |
'customize', | |
], ['all']); | |
// Remove toolbar items for non-admin users | |
intervention('remove-toolbar-items', [ | |
'updates', | |
], ['all-not-admin']); | |
// Remove update notices from non-admin users | |
intervention('remove-update-notices', [ | |
'editor', | |
'author' | |
]); | |
// Remove senseless user roles from WordPress | |
intervention('remove-user-roles', [ | |
'subscriber', | |
'contributor' | |
]); | |
// Remove Widgets | |
intervention('remove-widgets'); | |
// Default 100 pagination | |
intervention('update-pagination', 100); | |
// Remove Menu items | |
intervention('remove-menu-items', 'danger-zone', 'all-not-admin'); | |
intervention('remove-menu-items', [ | |
'acf', | |
'acf-new', | |
'acf-tools', | |
'acf-updates', | |
'comments', | |
'media', | |
'media-new', | |
'theme-editor', | |
'plugin-editor', | |
'tool-import', | |
'tool-export' | |
], 'all'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment