提交 c056f08d 编写于 作者: J jianbo

去掉文章里的“_link”字段

上级 672de569
......@@ -7,6 +7,11 @@ function custom_post_fields( $data, $post, $request) {
$_data = $data->data;
$post_id =$post->ID;
//去除 _links
foreach($data->get_links() as $_linkKey => $_linkVal) {
$data->remove_link($_linkKey);
}
//$content =get_the_content();
$content=$_data['content']['rendered'];
$content_protected=$_data['content']['protected'];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册