我安装了JSON API plugin 它运作正常,但它的旧版本
然后我安装了WordPress REST API (Version 2) 并没有取得任何结果,只是为了我的要求显示:
“意外”<' “
答案 0 :(得分:1)
在wp-includes / meta.php文件中
我们应该添加以下代码:
def delete
@expense_category = ExpenseCategory.find(params[:id])
end
def destroy
expense_category = ExpenseCategory.find(params[:id]).destroy
flash[:notice] = "ExpenseCategory '#{expense_category.description}' destroyed successfully."
redirect_to(expense_categories_path)
end