How to use the wpcom-xhr-request.del function in wpcom-xhr-request

To help you get started, we’ve selected a few wpcom-xhr-request examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Automattic / wpcom.js / app.js View on Github external
Category.prototype['delete'] = Category.prototype.del = function (query, fn) {
  var path = '/sites/' + this._sid + '/categories/slug:' + this._slug + '/delete';
  return request.del(this.wpcom, null, path, query, fn);
};
github Automattic / wpcom.js / app.js View on Github external
Media.prototype['delete'] = Media.prototype.del = function (query, fn) {
  var path = '/sites/' + this._sid + '/media/' + this._id + '/delete';
  return request.del(this.wpcom, def, path, query, fn);
};

wpcom-xhr-request

REST API requests to WordPress.com via XMLHttpRequest (and CORS)

MIT
Latest version published 3 years ago

Package Health Score

49 / 100
Full package analysis