This file contains 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
(function($){ | |
const $root = $( '#root' ); | |
const $stage1 = $( '.stage-1', $root ); | |
const $stage2 = $( '.stage-2', $root ); | |
// If there's no GET string, then no credentials have been passed back. Let's get them. | |
if ( ! window.location.href.includes('?') ) { | |
// Stage 1: Get the WordPress Site URL, Validate the REST API, and Send to the Authentication Flow | |
const $urlInput = $( 'input[type=url]', $stage1 ); |