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

git-svn-id: http://svn.automattic.com/wordpress/trunk@20191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin
2012-03-15 13:30:28 +00:00
parent 1db1017721
commit e515dde625
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();