-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Sidebar: Remove Plugins menu item for all sites except Jetpack ones #3079
Conversation
Works as expected. There is still some clean up that will need to happen which should probably be done in different PRs. |
I also tested, and it looks good to me. |
323b322
to
666e54e
Compare
666e54e
to
f54ae68
Compare
classNames = require( 'classnames' ), | ||
contains = require( 'lodash/collection/contains' ), |
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.
this will break if merged. contains
is now includes
and we can ditch the path
lodash 4 broke this one. Needs a rebase and fixup before proceeding. |
has = require( 'lodash/object/has' ), | ||
contains = require( 'lodash/collection/contains' ); | ||
React = require( 'react' ), | ||
startsWith = require( 'lodash/string/startsWith' ); |
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.
just need to drop the path
0ae6854
to
9afc01a
Compare
Rebased. |
Thanks @stephanethomas ! |
Well thank you to you @blowery. You did all the hard work! |
This makes it more consistent with the logic to display the Plan menu item.
This clarifies the code by minimizing the number of feature gates.
This also switches part of a condition to make it easier to understand.
This make sure the Plugins page is not accessible from the sidebar for sites with a Business plan and ecommerce plugins.
9afc01a
to
50c17bf
Compare
Sidebar: Remove Plugins menu item for all sites except Jetpack ones
Remove business plugins (cleanup of #3079)
This pull request disables the
Plugins
menu item from the sidebar for all except Jetpack sites. This is a preliminary step to removing ecommerce plugins - it just makes sure thePlugins
page is not linked from the sidebar for sites with a Business plan:Testing instructions
There are several conditions to test. First start with a single blog:
git checkout remove/ecommerce-plugin-sidebar
and start your serverMy Sites
Plugins
menu item in the sidebarMy Sites
Plugins
menu item in the sidebarPlugins
menu item with aAdd
button in the sidebarNow repeat the same steps for a test account with several blogs:
My Sites
Plugins
menu item in the sidebarPlugins
menu item in the sidebarMy Sites
Plugins
menu item in the sidebarPlugins
menu item in the sidebarAll My Sites
Plugins
menu item in the sidebarFinally let's add a Jetpack site to the mix:
My Sites
Plugins
menu item in the sidebarMy Sites
Plugins
menu item in the sidebarPlugins
menu item with aAdd
button in the sidebarAll My Sites
Plugins
menu item with aAdd
button in the sidebarAdditional notes
The
Plugins
page is still accessible by entering the url directly in the browser.Reviews