Created
March 15, 2016 00:00
-
-
Save s-hiroshi/9378e679fee1376ddc99 to your computer and use it in GitHub Desktop.
WordPressで投稿の状態を変更するサンプルです。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// https://codex.wordpress.org/Post_Status | |
$my_post = array(); | |
$my_post['ID'] = 123 // 投稿ID; | |
$my_post['post_status'] = 'draft'; // 下書き | |
wp_update_post( $my_post ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment