Updating Post Meta with Backbone and the REST API

var parentId = 96; // the post id
var metaData = new wp.api.collections.PostMeta('', {parent: parentId});
metaData.fetch()
  .done(function(data) {
    var someKey = data.findWhere({key: 'someKey'});
    someKey.set('value', 'newValue');

    someKey.save({parent: parentId});
  });

Leave a Comment

techhipbettruvabetnorabahisbahis forumutaraftarium24edusedueduedusedusedusedueduseduedu