plugin updates

This commit is contained in:
Tony Volpe
2024-07-16 13:57:46 +00:00
parent 41f50eacc4
commit 8f93917880
1529 changed files with 259452 additions and 25451 deletions

View File

@@ -777,6 +777,7 @@
ajaxData: function (data) {
ajaxData.paged = data.paged;
ajaxData.s = data.s;
ajaxData.conditional_logic = true;
ajaxData.include = $.isNumeric(data.s) ? Number(data.s) : '';
return acf.prepareForAjax(ajaxData);
},
@@ -4464,15 +4465,15 @@
this.set('timeout', setTimeout(callback, 300));
},
search: function (url) {
// ajax
var ajaxData = {
const ajaxData = {
action: 'acf/fields/oembed/search',
s: url,
field_key: this.get('key')
field_key: this.get('key'),
nonce: this.get('nonce')
};
// clear existing timeout
var xhr = this.get('xhr');
let xhr = this.get('xhr');
if (xhr) {
xhr.abort();
}
@@ -4481,7 +4482,7 @@
this.showLoading();
// query
var xhr = $.ajax({
xhr = $.ajax({
url: acf.get('ajaxurl'),
data: acf.prepareForAjax(ajaxData),
type: 'post',
@@ -4892,6 +4893,7 @@
// extra
ajaxData.action = 'acf/fields/relationship/query';
ajaxData.field_key = this.get('key');
ajaxData.nonce = this.get('nonce');
// Filter.
ajaxData = acf.applyFilters('relationship_ajax_data', ajaxData, this);
@@ -5673,7 +5675,8 @@
// ajax
var ajaxData = {
action: 'acf/fields/taxonomy/add_term',
field_key: field.get('key')
field_key: field.get('key'),
nonce: field.get('nonce')
};
// get HTML
@@ -5724,6 +5727,7 @@
var ajaxData = {
action: 'acf/fields/taxonomy/add_term',
field_key: field.get('key'),
nonce: field.get('nonce'),
term_name: $name.val(),
term_parent: $parent.length ? $parent.val() : 0
};
@@ -6109,16 +6113,6 @@
type: 'user'
});
acf.registerFieldType(Field);
acf.addFilter('select2_ajax_data', function (data, args, $input, field, select2) {
if (!field || 'user' !== field.get('type')) {
return data;
}
const query_nonce = field.get('queryNonce');
if (query_nonce && query_nonce.toString().length) {
data.user_query_nonce = query_nonce;
}
return data;
});
})(jQuery);
/***/ }),
@@ -9245,6 +9239,9 @@
var field = this.get('field');
if (field) {
ajaxData.field_key = field.get('key');
if (field.get('nonce')) {
ajaxData.nonce = field.get('nonce');
}
}
// callback