Harden Recommended Plugins section, drop admin-bar hint#23
Merged
Conversation
- Remove the admin-bar "Click here to come back!" hint overlay along with its dismiss AJAX handler, JS click binding and CSS. - Recommended Plugins no longer vanish when wp.org is slow or unreachable: fall back to the bundled JSON metadata (title, author, categories, note) instead of dropping the entry, and fix the cached-error shape so a transient failure doesn't render a blank card for an hour. - Always render the "Recommended Plugins" sidebar entry so the section is discoverable while the async enrichment fetch is in flight (or if it fails). - Add a one-line intro above the list and a "Browse all WordPress plugins" link at the bottom pointing at plugin-install.php.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
plugins_api()failure causedajax_get_recommended_pluginstocontinue, and a cached error array produced blank cards for up to an hour. Now every entry is returned with a JSON-metadata fallback (title/author/note), and the cached-error shape is detected correctly.hasPlugins, which was only true after the async enrichment fetch resolved. It's now rendered unconditionally with loading/failure states inside the content area.plugin-install.php.Test plan
plugin-install.php.api.wordpress.orgor set a bogus transient): recommendations still render with titles/authors from the curated JSON, not blank cards or a missing section.my-apps-hint/ajax_dismiss_hintin the plugin.