-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Selected Admin Bar Links #52
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know when you've made the requested changes and I'll be happy to do a second review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small fix-up for the test, otherwise 🍣
public function test_filter() { | ||
|
||
$admin_bar = $this->apply_admin_bar(); | ||
$node = 'comments'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comments
is one of the nodes that the feature removes by default. I would recommend doing one of two things here to test the filter:
- Add a node that the feature doesn't remove by default. Check for its existence before running the removal, then ensure it was removed. Or:
- Instead of adding a node to the node list in the filter, return an array with only one thing in it (e.g.,
comments
) and then check to ensure that comments was removed but one of the other default nodes (e.g.,themes
) wasn't.
WalkthroughThe pull request introduces a new feature to clean the WordPress admin bar by removing specified menus. The feature is implemented in a new class Changes
TipsChat with CodeRabbit Bot (
|
Summary
Removes specific admin bar links that we don't normally want to include (comments and themes).
Changelog entries
Added
Added the
clean_admin_bar
feature.Fixes #6
Summary by CodeRabbit
disable_dashboard_widgets
feature for clarity and accuracy.