Make WordPress Core


Ignore:
Timestamp:
01/03/2015 05:45:17 AM (10 years ago)
Author:
wonderboymusic
Message:

Inline <script>s that are only printed in the admin for pages that are served with the HTML5 doctype absolutely do not need CDATA comments.

Props tw2113 for the initial patch.
See #18788.

File:
1 edited

Legend:

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

    r31019 r31034  
    15501550?>
    15511551<script type="text/javascript">
    1552 //<![CDATA[
    15531552addLoadEvent = 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();}}};
    15541553function tb_close(){var win=window.dialogArguments||opener||parent||top;win.tb_remove();}
     
    15601559    decimalPoint = '<?php echo addslashes( $wp_locale->number_format['decimal_point'] ); ?>',
    15611560    isRtl = <?php echo (int) is_rtl(); ?>;
    1562 //]]>
    15631561</script>
    15641562<?php
     
    15971595<body<?php if ( isset($GLOBALS['body_id']) ) echo ' id="' . $GLOBALS['body_id'] . '"'; ?> class="wp-admin wp-core-ui no-js iframe <?php echo $admin_body_classes . ' ' . $admin_body_class; ?>">
    15981596<script type="text/javascript">
    1599 //<![CDATA[
    16001597(function(){
    16011598var c = document.body.className;
     
    16031600document.body.className = c;
    16041601})();
    1605 //]]>
    16061602</script>
    16071603<?php
     
    17301726?>
    17311727    <script type="text/javascript">
    1732     /* <![CDATA[ */
    17331728    var testCompression = {
    17341729        get : function(test) {
     
    17771772    };
    17781773    testCompression.check();
    1779     /* ]]> */
    17801774    </script>
    17811775<?php
     
    19761970        ?>
    19771971        <script type="text/javascript">
    1978         //<![CDATA[
    19791972        (function($){
    19801973            var options = <?php echo wp_json_encode( $args ); ?>, setup;
     
    20021995
    20031996        })( jQuery );
    2004         //]]>
    20051997        </script>
    20061998        <?php
Note: See TracChangeset for help on using the changeset viewer.