質問編集履歴

1

ステータス変更部分のコーディング漏れ追加

2018/06/27 12:11

投稿

ykiyota
ykiyota

スコア21

test CHANGED
File without changes
test CHANGED
@@ -100,6 +100,8 @@
100
100
 
101
101
  $postdata = get_post($postId);
102
102
 
103
+ $postdata->post_status = 'draft';
104
+
103
105
  wp_update_post($postdata);
104
106
 
105
107
  }