WordPress.org

Make WordPress Core

Changeset 19871


Ignore:
Timestamp:
02/08/2012 04:12:11 PM (8 years ago)
Author:
nacin
Message:

Use relative paths for admin-ajax.php to avoid cross-domain issues with IDN domains in IE and Opera. props SergeyBiryukov, fixes #18952.

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-header.php

    r19825 r19871  
    5656        'time':'<?php echo time() ?>'
    5757    },
    58     ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>',
     58    ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>',
    5959    pagenow = '<?php echo $current_screen->id; ?>',
    6060    typenow = '<?php echo $current_screen->post_type; ?>',
  • trunk/wp-admin/includes/image-edit.php

    r19712 r19871  
    6868
    6969    <div id="imgedit-crop-<?php echo $post_id; ?>" class="imgedit-crop-wrap">
    70     <img id="image-preview-<?php echo $post_id; ?>" onload="imageEdit.imgLoaded('<?php echo $post_id; ?>')" src="<?php echo admin_url('admin-ajax.php'); ?>?action=imgedit-preview&amp;_ajax_nonce=<?php echo $nonce; ?>&amp;postid=<?php echo $post_id; ?>&amp;rand=<?php echo rand(1, 99999); ?>" />
     70    <img id="image-preview-<?php echo $post_id; ?>" onload="imageEdit.imgLoaded('<?php echo $post_id; ?>')" src="<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>?action=imgedit-preview&amp;_ajax_nonce=<?php echo $nonce; ?>&amp;postid=<?php echo $post_id; ?>&amp;rand=<?php echo rand(1, 99999); ?>" />
    7171    </div>
    7272
  • trunk/wp-admin/includes/media.php

    r19623 r19871  
    335335addLoadEvent = 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();}}};
    336336var userSettings = {'url':'<?php echo SITECOOKIEPATH; ?>','uid':'<?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>','time':'<?php echo time(); ?>'};
    337 var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>', pagenow = 'media-upload-popup', adminpage = 'media-upload-popup',
     337var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>', pagenow = 'media-upload-popup', adminpage = 'media-upload-popup',
    338338isRtl = <?php echo (int) is_rtl(); ?>;
    339339//]]>
  • trunk/wp-admin/includes/template.php

    r19853 r19871  
    13951395        'time':'<?php echo time() ?>'
    13961396    },
    1397     ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>',
     1397    ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>',
    13981398    pagenow = '<?php echo $current_screen->id; ?>',
    13991399    typenow = '<?php echo $current_screen->post_type; ?>',
  • trunk/wp-admin/press-this.php

    r19726 r19871  
    305305addLoadEvent = 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();}}};
    306306var userSettings = {'url':'<?php echo SITECOOKIEPATH; ?>','uid':'<?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>','time':'<?php echo time() ?>'};
    307 var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>', pagenow = 'press-this', isRtl = <?php echo (int) is_rtl(); ?>;
     307var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>', pagenow = 'press-this', isRtl = <?php echo (int) is_rtl(); ?>;
    308308var photostorage = false;
    309309//]]>
  • trunk/wp-includes/class-wp-editor.php

    r19833 r19871  
    585585
    586586        if ( !is_admin() )
    587             echo 'var ajaxurl = "' . admin_url('admin-ajax.php') . '";';
     587            echo 'var ajaxurl = "' . admin_url( 'admin-ajax.php', 'relative' ) . '";';
    588588?>
    589589    </script>
  • trunk/wp-includes/media.php

    r19712 r19871  
    10971097/* <![CDATA[ */
    10981098    jQuery(document).ready(function($){
    1099         $.get("<?php echo admin_url( 'admin-ajax.php?action=oembed-cache&post=' . $post_ID ); ?>");
     1099        $.get("<?php echo admin_url( 'admin-ajax.php?action=oembed-cache&post=' . $post_ID, 'relative' ); ?>");
    11001100    });
    11011101/* ]]> */
Note: See TracChangeset for help on using the changeset viewer.