diff --git a/.github/wp-admin/common.adminbar.md b/.github/wp-admin/common.adminbar.md index 9845b40a..b2848c09 100644 --- a/.github/wp-admin/common.adminbar.md +++ b/.github/wp-admin/common.adminbar.md @@ -4,7 +4,7 @@ Remove wp-admin adminbar components. ### Options; -* Parent items remove child items. +* Parent items remove child items. * For concise documentation, `option.[x, y]` has been abbreviated from `option.x, option.y`. ```php @@ -18,6 +18,7 @@ return [ 'common.adminbar.updates', 'common.adminbar.site', 'common.adminbar.site.[menu, visit, dashboard, themes, widgets, menus]', + 'common.adminbar.customize', 'common.adminbar.comments', 'common.adminbar.new', 'common.adminbar.new.[post, page, media, user]', diff --git a/src/Admin/Common/Adminbar.php b/src/Admin/Common/Adminbar.php index 87f25a43..185ad9fe 100644 --- a/src/Admin/Common/Adminbar.php +++ b/src/Admin/Common/Adminbar.php @@ -27,6 +27,7 @@ * 'common.adminbar.updates', * 'common.adminbar.site', * 'common.adminbar.site.[menu, visit, dashboard, themes, widgets, menus]', + * 'common.adminbar.customize', * 'common.adminbar.comments', * 'common.adminbar.new', * 'common.adminbar.new.[post, page, media, user]', @@ -85,7 +86,7 @@ protected function hook() add_action('admin_head', function () { echo ' '; @@ -164,6 +165,11 @@ public function adminbar() $GLOBALS['wp_admin_bar']->remove_node('menus'); } + // Customize + if ($this->config->has('common.adminbar.customize')) { + $GLOBALS['wp_admin_bar']->remove_node('customize'); + } + // Comments if ($this->config->has('common.adminbar.comments')) { $GLOBALS['wp_admin_bar']->remove_node('comments');