我正在尝试使用javascript和Wordpress REST API更新自定义字段。我可以使用这个很容易地创建一个新的帖子,并且它工作得很完美:var parentId = 91; // the post id
var metaData = new wp.api.collections.PostMe
我在RequireJS中使用主干,我的视图需要在类似的集合之间切换,比如说,对应于各自的RESTful API的20个集合。/collections/collection-1'), c20 = require('./collections/collection-20');
/* Some methods to toggle