Changeset 56687 for trunk/src/wp-login.php
- Timestamp:
- 09/25/2023 09:03:19 PM (14 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-login.php
r56654 r56687 102 102 */ 103 103 if ( 'loggedout' === $wp_error->get_error_code() ) { 104 ob_start(); 104 105 ?> 105 106 <script>if("sessionStorage" in window){try{for(var key in sessionStorage){if(key.indexOf("wp-autosave-")!=-1){sessionStorage.removeItem(key)}}}catch(e){}};</script> 106 107 <?php 108 wp_print_inline_script_tag( str_replace( array( '<script>', '</script>' ), '', ob_get_clean() ) ); 107 109 } 108 110 … … 194 196 </head> 195 197 <body class="login no-js <?php echo esc_attr( implode( ' ', $classes ) ); ?>"> 196 <script type="text/javascript"> 197 document.body.className = document.body.className.replace('no-js','js'); 198 </script> 198 <?php 199 wp_print_inline_script_tag( "document.body.className = document.body.className.replace('no-js','js');" ); 200 ?> 201 199 202 <?php 200 203 /** … … 415 418 416 419 if ( ! empty( $input_id ) ) { 420 ob_start(); 417 421 ?> 418 <script type="text/javascript">422 <script> 419 423 try{document.getElementById('<?php echo $input_id; ?>').focus();}catch(e){} 420 424 if(typeof wpOnload==='function')wpOnload(); 421 425 </script> 422 426 <?php 427 wp_print_inline_script_tag( str_replace( array( '<script>', '</script>' ), '', ob_get_clean() ) ); 423 428 } 424 429 … … 442 447 */ 443 448 function wp_shake_js() { 444 ?> 445 <script type="text/javascript"> 446 document.querySelector('form').classList.add('shake'); 447 </script> 448 <?php 449 wp_print_inline_script_tag( "document.querySelector('form').classList.add('shake');" ); 449 450 } 450 451 … … 1358 1359 1359 1360 if ( $customize_login ) { 1361 ob_start(); 1360 1362 ?> 1361 <script type="text/javascript">setTimeout( function(){ new wp.customize.Messenger({ url: '<?php echo wp_customize_url(); ?>', channel: 'login' }).send('login') }, 1000 );</script>1363 <script>setTimeout( function(){ new wp.customize.Messenger({ url: '<?php echo wp_customize_url(); ?>', channel: 'login' }).send('login') }, 1000 );</script> 1362 1364 <?php 1365 wp_print_inline_script_tag( str_replace( array( '<script>', '</script>' ), '', ob_get_clean() ) ); 1363 1366 } 1364 1367 … … 1606 1609 $login_script .= "if ( typeof wpOnload === 'function' ) { wpOnload() }"; 1607 1610 1608 ?> 1609 <script type="text/javascript"> 1610 <?php echo $login_script; ?> 1611 </script> 1612 <?php 1611 wp_print_inline_script_tag( $login_script ); 1613 1612 1614 1613 if ( $interim_login ) { 1614 ob_start(); 1615 1615 ?> 1616 <script type="text/javascript">1616 <script> 1617 1617 ( function() { 1618 1618 try { … … 1628 1628 </script> 1629 1629 <?php 1630 wp_print_inline_script_tag( str_replace( array( '<script>', '</script>' ), '', ob_get_clean() ) ); 1630 1631 } 1631 1632
Note: See TracChangeset
for help on using the changeset viewer.