Coding Standards: Use strict comparison for JS fragment in some admin files.

Follow-up to [48083].

Props nayanchamp7, rnaby.
Fixes #52845, #41988.
Built from https://develop.svn.wordpress.org/trunk@50541


git-svn-id: http://core.svn.wordpress.org/trunk@50154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2021-03-18 14:13:08 +00:00
parent 357e77789c
commit bf29bb4441
5 changed files with 7 additions and 7 deletions

View File

@ -114,6 +114,6 @@ if ( function_exists( 'get_site_option' ) ) {
?>
<div class="clear"></div></div><!-- wpwrap -->
<script type="text/javascript">if(typeof wpOnload=='function')wpOnload();</script>
<script type="text/javascript">if(typeof wpOnload==='function')wpOnload();</script>
</body>
</html>

View File

@ -533,7 +533,7 @@ function wp_iframe( $content_func, ...$args ) {
?>
<script type="text/javascript">
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
addLoadEvent = function(func){if(typeof jQuery!=='undefined')jQuery(document).ready(func);else if(typeof wpOnload!=='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
var ajaxurl = '<?php echo esc_js( admin_url( 'admin-ajax.php', 'relative' ) ); ?>', pagenow = 'media-upload-popup', adminpage = 'media-upload-popup',
isRtl = <?php echo (int) is_rtl(); ?>;
</script>
@ -607,7 +607,7 @@ function wp_iframe( $content_func, ...$args ) {
do_action( 'admin_print_footer_scripts' );
?>
<script type="text/javascript">if(typeof wpOnload=='function')wpOnload();</script>
<script type="text/javascript">if(typeof wpOnload==='function')wpOnload();</script>
</body>
</html>
<?php

View File

@ -2025,7 +2025,7 @@ function iframe_header( $title = '', $deprecated = false ) {
wp_enqueue_style( 'colors' );
?>
<script type="text/javascript">
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
addLoadEvent = function(func){if(typeof jQuery!=='undefined')jQuery(document).ready(func);else if(typeof wpOnload!=='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
function tb_close(){var win=window.dialogArguments||opener||parent||top;win.tb_remove();}
var ajaxurl = '<?php echo esc_js( admin_url( 'admin-ajax.php', 'relative' ) ); ?>',
pagenow = '<?php echo esc_js( $current_screen->id ); ?>',
@ -2115,7 +2115,7 @@ function iframe_footer() {
do_action( 'admin_print_footer_scripts' );
?>
</div>
<script type="text/javascript">if(typeof wpOnload=="function")wpOnload();</script>
<script type="text/javascript">if(typeof wpOnload==='function')wpOnload();</script>
</body>
</html>
<?php

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.8-alpha-50540';
$wp_version = '5.8-alpha-50541';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -317,7 +317,7 @@ function login_footer( $input_id = '' ) {
?>
<script type="text/javascript">
try{document.getElementById('<?php echo $input_id; ?>').focus();}catch(e){}
if(typeof wpOnload=='function')wpOnload();
if(typeof wpOnload==='function')wpOnload();
</script>
<?php
}