修正XMLRPC不能获取文章是否有草稿状态

修正XMLRPC不能获取文章是否有草稿状态
1608行
$this->typechoToWordpressStatus($posts->status, 'post')
改为
$this->typechoToWordpressStatus(($posts->hasSaved || 'post_draft' == $posts->type) ? 'draft' : $posts->status, 'post')
This commit is contained in:
权那他 2019-08-18 10:16:54 +08:00 committed by GitHub
parent 6d27a24fb8
commit 71c72c7926
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1604,7 +1604,7 @@ class Widget_XmlRpc extends Widget_Abstract_Contents implements Widget_Interface
'wp_author_id' => $posts->authorId,
'wp_author_display_name' => $posts->author->screenName,
'date_created_gmt' => new IXR_Date($posts->created),
'post_status' => $this->typechoToWordpressStatus($posts->status, 'post'),
'post_status' => $this->typechoToWordpressStatus(($posts->hasSaved || 'post_draft' == $posts->type) ? 'draft' : $posts->status, 'post'),
'custom_fields' => array(),
'wp_post_format' => 'standard',
'date_modified' => new IXR_Date($this->options->timezone + $posts->modified),