-
Notifications
You must be signed in to change notification settings - Fork 799
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
Load the Search widget even if Extra Sidebar Widgets is disabled #9062
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.
Technically I have no problem with this - I have tested it and examined the code, everything is fine.
But, do we want to make Search a special widget like this? Perhaps a better way would be to help the user to activate sidebar widgets using JITMs and Settings notices?
The idea was to allow people to start use the enhanced search functionality without having to go enable it first (using the widget would enable it). But yeah, perhaps a JITM or something would be better. "Hey, you have a plan that supports better search. Want to enable it?" One alternative I can think of is to only load the widget if Extra Sidebar Widgets is enabled OR the Search module is enabled. That still fixes the original issue (widget disappearing if Extra Sidebar Widgets is disabled) without always loading it. |
Since we don't have module dependencies, having Search Widget on only when either of the modules is turned on feels good enough to me. I'm glad to help with this if needed. |
Fixes case where widget not loaded if Extra Sidebar Widgets is disabled.
Significant code changes, needs a re-review
@zinigor I changed things up so that the widget is only loaded if either (or both) the Search module or the widgets module is loaded. Needs a re-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.
Read/tested after refactor. LGTM
* Changelog 6.0: create base for changelog. * Add #8938 to changelog * Add #8962 to changelog * Add #8974 to changelog * Add #8975 to changelog * Add #8978 to changelog * Add #8867 to changelog * Add #8937 to changelog * Add #8961 to changelog * Add #8855 to changelog * Add #8944 to changelog * Add #8973 to changelog * Add #8977 to changelog * Add #8979 to changelog * Add #8980 to changelog * Add #8982 to changelog * Add #8983 to changelog * Add #8984 to changelog * Add #8986 to changelog * Add #9005 to changelog * Add #9010 to changelog * Add #9012 to changelog * Add #9021 to changelog * Add #9022 to changelog * Add #9056 to changelog * Add #9061 to changelog * Add #9079 to changelog * Add #9080 to changelog * Add #9088 to changelog * Add #9096 to changelog * Add #9097 to changelog * Add #9100 to changelog * Add #9107 to changelog * Add #8969 to changelog * Add #8993 to changelog * Add #9003 to changelog * Add #9031 to changelog * Add #8945 to changelog * Add #9052 to changelog * Add #9058 to changelog * Add #9066 to changelog * Add #9076 to changelog * Add #9053 to changelog * Add #9108 to changelog * Add #9135 to changelog * Add #9148 to changelog * Add #9125 to changelog * Add #9137 to changelog * Added testing instructions for 6.0. * Added IS testing instructions, huge props to @tiagonoronha. * Added #8498 to changelog. * Added #8954 to changelog. * Added #8985 to changelog. * add #9027 * add #9112 to changelog * add #9136 to changelog * add #9102 to changelog * add #9093 to changelog * add #9062 to changelog * add #9172 to changelog
Fixes #9041
Not 100% sure this is the best way to always load a widget or not. Suggestions welcome for alternate code choices.Changes proposed in this Pull Request:
Always load the Search widget, even if the Extra Sidebar Widgets module is disabled. It's already loaded even if the Search module isn't loaded.Force the Search widget to be loaded via the Search module so that even if Extra Sidebar Widgets is disabled, the widget is still available for use.
If both the Search module and the Extra Sidebar Widgets module are disabled, then the widget will not be loaded.
Testing instructions:
/wp-admin/admin.php?page=jetpack_modules
and disable both the Extra Sidebar Widgets module and Search module.