Repository navigation
Connect from the plugin with one link - #21
Merged
Merged
Conversation
…ngs flips to Connected by itself
…, only for the MonoRanks app id
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.
When the site is not connected, step 1 on Settings (and on the Overview connect card) now sends people straight to the MonoRanks connect page instead of the bare app.
{api_base}/connect/wordpress?site=<home URL, no trailing slash>&return=<this plugin's settings page>, built in PHP (Settings::connect_url(), exposed asconnect_urlin the settings data andurls.connectin the admin bootstrap). Opens in a new tab. No UTM tags, since it points into the app.Example links:
https://example.com/→https://app.monoranks.com/connect/wordpress?site=https%3A%2F%2Fexample.com&return=https%3A%2F%2Fexample.com%2Fwp-admin%2Fadmin.php%3Fpage%3Dmonoranks-settingshttps://example.com/blog/→https://app.monoranks.com/connect/wordpress?site=https%3A%2F%2Fexample.com%2Fblog&return=https%3A%2F%2Fexample.com%2Fblog%2Fwp-admin%2Fadmin.php%3Fpage%3Dmonoranks-settingsChecks: PHP unit tests (90, two new for the link),
tsc --noEmit,vite build. Checked in a WordPress Playground site with headless Playwright: the link is right, and the page switched to Connected about 4 seconds after a mocked approval. The wp-env e2e suite was not run because Docker is paused on this machine.No version bump or changelog entry; the release step adds those.
Approve screen branding: on WordPress's own Authorize Application screen, when the request's
app_idis MonoRanks' (6f1c1b5e-3f7a-4d8e-9a51-7a2b0c4e8d10), thewp_authorize_application_password_formhook prints the MonoRanks logo, the line "Reads your content and applies only fixes you approve.", and a little CSS for that page only (the approve button in our dark colour). WordPress's text and its Yes and No buttons are not changed, and no core file is edited. Other apps get nothing (unit tested; the matching is on the app id only, not the name).