Make WordPress Core


Ignore:
Timestamp:
03/18/2021 02:11:55 PM (4 years ago)
Author:
SergeyBiryukov
Message:

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

Follow-up to [48083].

Props nayanchamp7, rnaby.
Fixes #52845, #41988.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/media.php

    r50505 r50541  
    534534    ?>
    535535    <script type="text/javascript">
    536     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();}}};
     536    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();}}};
    537537    var ajaxurl = '<?php echo esc_js( admin_url( 'admin-ajax.php', 'relative' ) ); ?>', pagenow = 'media-upload-popup', adminpage = 'media-upload-popup',
    538538    isRtl = <?php echo (int) is_rtl(); ?>;
     
    608608
    609609    ?>
    610     <script type="text/javascript">if(typeof wpOnload=='function')wpOnload();</script>
     610    <script type="text/javascript">if(typeof wpOnload==='function')wpOnload();</script>
    611611    </body>
    612612    </html>
Note: See TracChangeset for help on using the changeset viewer.