Make WordPress Core

Changeset 20191


Ignore:
Timestamp:
03/15/2012 01:30:28 PM (15 years ago)
Author:
nacin
Message:

Use ajaxurl rather than direct references to admin-ajax.php. see #18952.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/js/inline-edit-post.dev.js

    r19929 r20191  
    118118                        // support multi taxonomies?
    119119                        tax = 'post_tag';
    120                         $('tr.inline-editor textarea[name="tax_input['+tax+']"]').suggest( 'admin-ajax.php?action=ajax-tag-search&tax='+tax, { delay: 500, minchars: 2, multiple: true, multipleSep: inlineEditL10n.comma + ' ' } );
     120                        $('tr.inline-editor textarea[name="tax_input['+tax+']"]').suggest( ajaxurl + '?action=ajax-tag-search&tax=' + tax, { delay: 500, minchars: 2, multiple: true, multipleSep: inlineEditL10n.comma + ' ' } );
    121121                }
    122122                $('html, body').animate( { scrollTop: 0 }, 'fast' );
    … …  
    194194                        }
    195195
    196                         textarea.suggest( 'admin-ajax.php?action=ajax-tag-search&tax='+taxname, { delay: 500, minchars: 2, multiple: true, multipleSep: inlineEditL10n.comma + ' ' } );
     196                        textarea.suggest( ajaxurl + '?action=ajax-tag-search&tax=' + taxname, { delay: 500, minchars: 2, multiple: true, multipleSep: inlineEditL10n.comma + ' ' } );
    197197                });
    198198
    … …  
    252252
    253253                // make ajax request
    254                 $.post('admin-ajax.php', params,
     254                $.post( ajaxurl, params,
    255255                        function(r) {
    256256                                $('table.widefat .inline-edit-save .waiting').hide();
  • trunk/wp-admin/js/inline-edit-tax.dev.js

    r18222 r20191  
    7474
    7575                // make ajax request
    76                 $.post('admin-ajax.php', params,
     76                $.post( ajaxurl, params,
    7777                        function(r) {
    7878                                var row, new_id;
  • trunk/wp-includes/js/plupload/handlers.dev.js

    r20114 r20191  
    137137                // Tell the server to delete it. TODO: handle exceptions
    138138                jQuery.ajax({
    139                         url: 'admin-ajax.php',
     139                        url: ajaxurl,
    140140                        type: 'post',
    141141                        success: deleteSuccess,
    … …  
    155155                // Tell the server to untrash it. TODO: handle exceptions
    156156                jQuery.ajax({
    157                         url: 'admin-ajax.php',
     157                        url: ajaxurl,
    158158                        type: 'post',
    159159                        id: fileObj.id,
  • trunk/wp-includes/js/swfupload/handlers.dev.js

    r18484 r20191  
    9797                // Tell the server to delete it. TODO: handle exceptions
    9898                jQuery.ajax({
    99                         url: 'admin-ajax.php',
     99                        url: ajaxurl,
    100100                        type: 'post',
    101101                        success: deleteSuccess,
    … …  
    115115                // Tell the server to untrash it. TODO: handle exceptions
    116116                jQuery.ajax({
    117                         url: 'admin-ajax.php',
     117                        url: ajaxurl,
    118118                        type: 'post',
    119119                        id: fileObj.id,
Note: See TracChangeset for help on using the changeset viewer.