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:
parent
681c6ea428
commit
0cbc56cfa8
|
@ -117,7 +117,7 @@ inlineEditPost = {
|
||||||
if ( 'post' == type ) {
|
if ( 'post' == type ) {
|
||||||
// support multi taxonomies?
|
// support multi taxonomies?
|
||||||
tax = 'post_tag';
|
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' );
|
$('html, body').animate( { scrollTop: 0 }, 'fast' );
|
||||||
},
|
},
|
||||||
|
@ -193,7 +193,7 @@ inlineEditPost = {
|
||||||
textarea.val(terms);
|
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
|
// handle the post status
|
||||||
|
@ -251,7 +251,7 @@ inlineEditPost = {
|
||||||
params = fields + '&' + $.param(params);
|
params = fields + '&' + $.param(params);
|
||||||
|
|
||||||
// make ajax request
|
// make ajax request
|
||||||
$.post('admin-ajax.php', params,
|
$.post( ajaxurl, params,
|
||||||
function(r) {
|
function(r) {
|
||||||
$('table.widefat .inline-edit-save .waiting').hide();
|
$('table.widefat .inline-edit-save .waiting').hide();
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ inlineEditTax = {
|
||||||
params = fields + '&' + $.param(params);
|
params = fields + '&' + $.param(params);
|
||||||
|
|
||||||
// make ajax request
|
// make ajax request
|
||||||
$.post('admin-ajax.php', params,
|
$.post( ajaxurl, params,
|
||||||
function(r) {
|
function(r) {
|
||||||
var row, new_id;
|
var row, new_id;
|
||||||
$('table.widefat .inline-edit-save .waiting').hide();
|
$('table.widefat .inline-edit-save .waiting').hide();
|
||||||
|
|
|
@ -136,7 +136,7 @@ function prepareMediaItemInit(fileObj) {
|
||||||
jQuery('a.delete', item).click(function(){
|
jQuery('a.delete', item).click(function(){
|
||||||
// Tell the server to delete it. TODO: handle exceptions
|
// Tell the server to delete it. TODO: handle exceptions
|
||||||
jQuery.ajax({
|
jQuery.ajax({
|
||||||
url: 'admin-ajax.php',
|
url: ajaxurl,
|
||||||
type: 'post',
|
type: 'post',
|
||||||
success: deleteSuccess,
|
success: deleteSuccess,
|
||||||
error: deleteError,
|
error: deleteError,
|
||||||
|
@ -154,7 +154,7 @@ function prepareMediaItemInit(fileObj) {
|
||||||
jQuery('a.undo', item).click(function(){
|
jQuery('a.undo', item).click(function(){
|
||||||
// Tell the server to untrash it. TODO: handle exceptions
|
// Tell the server to untrash it. TODO: handle exceptions
|
||||||
jQuery.ajax({
|
jQuery.ajax({
|
||||||
url: 'admin-ajax.php',
|
url: ajaxurl,
|
||||||
type: 'post',
|
type: 'post',
|
||||||
id: fileObj.id,
|
id: fileObj.id,
|
||||||
data: {
|
data: {
|
||||||
|
|
|
@ -96,7 +96,7 @@ function prepareMediaItemInit(fileObj) {
|
||||||
jQuery('a.delete', item).click(function(){
|
jQuery('a.delete', item).click(function(){
|
||||||
// Tell the server to delete it. TODO: handle exceptions
|
// Tell the server to delete it. TODO: handle exceptions
|
||||||
jQuery.ajax({
|
jQuery.ajax({
|
||||||
url: 'admin-ajax.php',
|
url: ajaxurl,
|
||||||
type: 'post',
|
type: 'post',
|
||||||
success: deleteSuccess,
|
success: deleteSuccess,
|
||||||
error: deleteError,
|
error: deleteError,
|
||||||
|
@ -114,7 +114,7 @@ function prepareMediaItemInit(fileObj) {
|
||||||
jQuery('a.undo', item).click(function(){
|
jQuery('a.undo', item).click(function(){
|
||||||
// Tell the server to untrash it. TODO: handle exceptions
|
// Tell the server to untrash it. TODO: handle exceptions
|
||||||
jQuery.ajax({
|
jQuery.ajax({
|
||||||
url: 'admin-ajax.php',
|
url: ajaxurl,
|
||||||
type: 'post',
|
type: 'post',
|
||||||
id: fileObj.id,
|
id: fileObj.id,
|
||||||
data: {
|
data: {
|
||||||
|
|
Loading…
Reference in New Issue