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

git-svn-id: https://develop.svn.wordpress.org/trunk@20191 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-03-15 13:30:28 +00:00
parent 681c6ea428
commit 0cbc56cfa8
4 changed files with 8 additions and 8 deletions

View File

@ -117,7 +117,7 @@ inlineEditPost = {
if ( 'post' == type ) {
// support multi taxonomies?
tax = 'post_tag';
$('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 + ' ' } );
$('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 + ' ' } );
}
$('html, body').animate( { scrollTop: 0 }, 'fast' );
},
@ -193,7 +193,7 @@ inlineEditPost = {
textarea.val(terms);
}
textarea.suggest( 'admin-ajax.php?action=ajax-tag-search&tax='+taxname, { delay: 500, minchars: 2, multiple: true, multipleSep: inlineEditL10n.comma + ' ' } );
textarea.suggest( ajaxurl + '?action=ajax-tag-search&tax=' + taxname, { delay: 500, minchars: 2, multiple: true, multipleSep: inlineEditL10n.comma + ' ' } );
});
// handle the post status
@ -251,7 +251,7 @@ inlineEditPost = {
params = fields + '&' + $.param(params);
// make ajax request
$.post('admin-ajax.php', params,
$.post( ajaxurl, params,
function(r) {
$('table.widefat .inline-edit-save .waiting').hide();

View File

@ -73,7 +73,7 @@ inlineEditTax = {
params = fields + '&' + $.param(params);
// make ajax request
$.post('admin-ajax.php', params,
$.post( ajaxurl, params,
function(r) {
var row, new_id;
$('table.widefat .inline-edit-save .waiting').hide();

View File

@ -136,7 +136,7 @@ function prepareMediaItemInit(fileObj) {
jQuery('a.delete', item).click(function(){
// Tell the server to delete it. TODO: handle exceptions
jQuery.ajax({
url: 'admin-ajax.php',
url: ajaxurl,
type: 'post',
success: deleteSuccess,
error: deleteError,
@ -154,7 +154,7 @@ function prepareMediaItemInit(fileObj) {
jQuery('a.undo', item).click(function(){
// Tell the server to untrash it. TODO: handle exceptions
jQuery.ajax({
url: 'admin-ajax.php',
url: ajaxurl,
type: 'post',
id: fileObj.id,
data: {

View File

@ -96,7 +96,7 @@ function prepareMediaItemInit(fileObj) {
jQuery('a.delete', item).click(function(){
// Tell the server to delete it. TODO: handle exceptions
jQuery.ajax({
url: 'admin-ajax.php',
url: ajaxurl,
type: 'post',
success: deleteSuccess,
error: deleteError,
@ -114,7 +114,7 @@ function prepareMediaItemInit(fileObj) {
jQuery('a.undo', item).click(function(){
// Tell the server to untrash it. TODO: handle exceptions
jQuery.ajax({
url: 'admin-ajax.php',
url: ajaxurl,
type: 'post',
id: fileObj.id,
data: {