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:
parent
1db1017721
commit
e515dde625
|
@ -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();
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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: {
|
||||
|
|
Loading…
Reference in New Issue