修正XMLRPC只能发表发布状态的问题,修正后可以发布私密、草稿、等等状态的文章

修正XMLRPC只能发表发布状态的问题,修正后可以发布私密、草稿、等等状态的文章
在1442行
$status = $this->wordpressToTypechoStatus($content["{$type}_status"], $type);
后面增加一行判断
$input['visibility'] = isset($content["visibility"]) ? $content["visibility"] : $status;
This commit is contained in:
权那他 2019-08-18 10:14:26 +08:00 committed by GitHub
parent 2e2835ce6b
commit 6d27a24fb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1439,7 +1439,7 @@ class Widget_XmlRpc extends Widget_Abstract_Contents implements Widget_Interface
/** 调整状态 */
if (isset($content["{$type}_status"])) {
$status = $this->wordpressToTypechoStatus($content["{$type}_status"], $type);
$input['visibility'] = isset($content["visibility"]) ? $content["visibility"] : $status;
if ('publish' == $status || 'waiting' == $status || 'private' == $status) {
$input['do'] = 'publish';