Changeset 63791
- Timestamp:
- 09/22/2026 07:35:23 AM (less than one hour ago)
- File:
-
- 1 edited
-
trunk/src/js/_enqueues/wp/api.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/wp/api.js
r63766 r63791 867 867 868 868 /** 869 * Set nonce header before every Backbone sync.869 * Sets a nonce header before every Backbone sync. 870 870 * 871 * @param {string} method The CRUD method ("create", "read", "update", or "delete") to be performed. 872 * @param {Backbone.Model} model The model to be synced. 873 * @param {Object} options Additional options for the sync. 874 * @return {*}. 871 * @param {string} method The CRUD method ("create", "read", "update", or "delete") to be performed. 872 * @param {Backbone.Model} model The model to be synced. 873 * @param {Object} options Additional options for the sync. 874 * @param {Function} [options.beforeSend] A function to be called before sending the request. 875 * @param {Function} [options.complete] A function to be called when the request completes. 876 * @return {JQuery.Promise} A promise that resolves when the sync operation completes. 875 877 */ 876 878 sync: function( method, model, options ) { … … 1028 1030 1029 1031 /** 1030 * Extend Backbone.Collection.sync to add nonce and pagination support.1032 * Extends Backbone.Collection.sync to add nonce and pagination support. 1031 1033 * 1032 * Set nonce header before every Backbone sync.1034 * Sets a nonce header before every Backbone sync. 1033 1035 * 1034 * @param {string} method The CRUD method ("create", "read", "update", or "delete") to be performed. 1035 * @param {Backbone.Model} model The model to be synced. 1036 * @param {Object} options Additional options for the sync. 1037 * @return {*}. 1036 * @param {string} method The CRUD method ("create", "read", "update", or "delete") to be performed. 1037 * @param {Backbone.Model} model The model to be synced. 1038 * @param {Object} options Additional options for the sync. 1039 * @param {Function} [options.beforeSend] A function to be called before sending the request. 1040 * @param {Function} [options.success] A function to be called when the request succeeds. 1041 * @param {Function} [options.complete] A function to be called when the request completes, regardless of success or failure. 1042 * @param {Object} [options.data] Data to be sent with the request. 1043 * @return {JQuery.Promise} A promise that resolves when the sync operation completes. 1038 1044 */ 1039 1045 sync: function( method, model, options ) {
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)