Make WordPress Core

Ticket #52845: template.php.patch

File template.php.patch, 1.2 KB (added by nayanchamp7, 3 years ago)

Updated the codes and tested.

  • src/wp-admin/includes/template.php

     
    20252025        wp_enqueue_style( 'colors' );
    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' ) ); ?>',
    20312031        pagenow = '<?php echo esc_js( $current_screen->id ); ?>',
     
    21152115        do_action( 'admin_print_footer_scripts' );
    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>
    21212121        <?php