WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/30/2016 06:20:31 PM (3 years ago)
Author:
nbachiyski
Message:

Add nonce to AJAX action for script compression setting

File:
1 edited

Legend:

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

    r36698 r37143  
    17901790?>
    17911791    <script type="text/javascript">
     1792    var compressionNonce = <?php echo wp_json_encode( wp_create_nonce( 'update_can_compress_scripts' ) ); ?>;
    17921793    var testCompression = {
    17931794        get : function(test) {
     
    18091810                };
    18101811
    1811                 x.open('GET', ajaxurl + '?action=wp-compression-test&test='+test+'&'+(new Date()).getTime(), true);
     1812                x.open('GET', ajaxurl + '?action=wp-compression-test&test='+test+'&_ajax_nonce='+compressionNonce+'&'+(new Date()).getTime(), true);
    18121813                x.send('');
    18131814            }
Note: See TracChangeset for help on using the changeset viewer.