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/template.php

    r50434 r50541  
    20262026    ?>
    20272027<script type="text/javascript">
    2028 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();}}};
     2028addLoadEvent = 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();}}};
    20292029function tb_close(){var win=window.dialogArguments||opener||parent||top;win.tb_remove();}
    20302030var ajaxurl = '<?php echo esc_js( admin_url( 'admin-ajax.php', 'relative' ) ); ?>',
     
    21162116    ?>
    21172117    </div>
    2118 <script type="text/javascript">if(typeof wpOnload=="function")wpOnload();</script>
     2118<script type="text/javascript">if(typeof wpOnload==='function')wpOnload();</script>
    21192119</body>
    21202120</html>
Note: See TracChangeset for help on using the changeset viewer.