Changeset 11615
- Timestamp:
- 02/25/2022 06:51:15 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions.php
r11486 r11615 96 96 'recaptcha-api', 97 97 'function onSubmit(token) { 98 var form = document.getElementById("registerform"); 99 98 var form = document.querySelector( "#registerform, form:not(#language-switcher)" ); 99 100 if ( ! form ) { 101 return; 102 } 103 104 // This is used for the interaction with the invisible v3 recaptcha. 100 105 if ( form.dataset.submitReady ) { 101 106 form.submit(); … … 131 136 // Add the token to the "primary" form 132 137 var input = document.createElement( "input" ), 133 form = document. getElementById( "registerform" );138 form = document.querySelector( "#registerform, form:not(#language-switcher)" ); 134 139 135 140 if ( ! form ) { 136 form = document.querySelectorAll( "form:not(#language-switcher)" );141 return; 137 142 } 138 143 … … 143 148 form.appendChild( input ); 144 149 150 // If the visual reCaptcha v2 is not loaded, this data point will never be used. 145 151 if ( form.dataset.submitReady ) { 146 152 form.submit();
Note: See TracChangeset
for help on using the changeset viewer.