大約6個月前有一個更新WordPress的API,它允許設置後的縮略圖(或功能)的圖像。集特色圖片
http://www.maxcutler.com/2012/04/04/xml-rpc-in-wordpress-3-4/
我試圖使用它,但它不是爲我工作。我想知道我可能做錯了什麼。我打電話的XML-RPC newPost方法來創建一個帖子,並在媒體庫通過現有資產的媒體ID(被稱爲媒體庫中attachment_id)正在創建新的崗位和所有其他屬性都被設置,除了特色圖片。
我驗證了我的wordpress api版本,並且確實足夠在class-wp-xmlrpc-server.php中查看新帖子功能部分中的註釋: 「* post_thumbnail - 用作媒體項目的ID後縮略圖/特色形象」
所有其他屬性都在工作。我可以通過XML-RPC將新圖像添加到媒體庫。我可以創建和更新帖子並設置他們的標籤,標題,說明,自定義字段值和類別。我嘗試設置post_thumbnail值時沒有遇到任何錯誤。即使我傳入一個不存在的媒體ID,這看起來很奇怪。