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

    r30981 r31034  
    240240?>
    241241<script type="text/javascript">
    242 /* <![CDATA[ */
    243242var win = window.dialogArguments || opener || parent || top;
    244243win.send_to_editor('<?php echo addslashes($html); ?>');
    245 /* ]]> */
    246244</script>
    247245<?php
     
    449447?>
    450448<script type="text/javascript">
    451 //<![CDATA[
    452449addLoadEvent = 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();}}};
    453450var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>', pagenow = 'media-upload-popup', adminpage = 'media-upload-popup',
    454451isRtl = <?php echo (int) is_rtl(); ?>;
    455 //]]>
    456452</script>
    457453<?php
     
    683679    if ( isset($_POST['insert-gallery']) || isset($_POST['update-gallery']) ) { ?>
    684680        <script type="text/javascript">
    685         /* <![CDATA[ */
    686681        var win = window.dialogArguments || opener || parent || top;
    687682        win.tb_remove();
    688         /* ]]> */
    689683        </script>
    690684        <?php
     
    19471941
    19481942<script type="text/javascript">
    1949 //<![CDATA[
    19501943jQuery(function($){
    19511944    var preloaded = $(".media-item.preloaded");
     
    19551948    updateMediaForm();
    19561949});
    1957 //]]>
    19581950</script>
    19591951<div id="media-items"><?php
     
    20102002
    20112003<script type="text/javascript">
    2012 //<![CDATA[
    20132004var addExtImage = {
    20142005
     
    21002091    });
    21012092});
    2102 
    2103 //]]>
    21042093</script>
    21052094
Note: See TracChangeset for help on using the changeset viewer.