
內容簡介
這是 QRecipeWriter 使用的 WordPress 外掛程式,可將烹飪食譜傳送到您的部落格。
QRecipeWriter 軟體:https://gite.flo-art.fr/cooking/qrecipewriter
它擴展了 WordPress API,使其能夠與 QRecipeWriter 軟體進行通訊,以新增烹飪食譜到您的部落格,或從部落格中取回食譜。
需要 QRecipeWriter 4.0 或更高版本。
使用方法
不需要特別配置,但您可以擴展傳送或載入食譜的功能。
要做到這一點,請在 wp-content 文件夾中創建一個“qrecipewriter”文件夾,並將 api.custom.php.example
文件複製到內部,重命名為 api.custom.php。
然後,手動編輯所需的函數:
new_post_custom:對發送新食譜(或更改現有食譜)的代碼進行擴展。
引數:post(WordPress 文章物件)、params(從 QRecipeWriter 發送的參數,如果它是現有的文章,則 id != -1 否則它是一篇新文章)
getPost_custom:對所獲取的食譜進行代碼擴展(可能不適用於 QRecipeWriter)
getPosts_custom:對食譜列表的獲取進行代碼擴展(可能不適用於 QRecipeWriter)
僅預計更改第一個自定義功能的官方版本 QRecipeWriter。
外掛標籤
開發者團隊
原文外掛簡介
A wordpress plugin used by QRecipeWriter to send cooking recipes to your blog.
QRecipeWriter software: https://gite.flo-art.fr/cooking/qrecipewriter
It extend WordPress API to be able to talk with QRecipeWriter software, to add
recipes to your blog, or to get recipes from your blog to the software.
Requires QRecipeWriter 4.0 or higher.
How to use
No special configuration is needed. But you can extend the send or the load of recipes.
To do that, create a folder “qrecipewriter” inside the wp-content folder, and copy the api.custom.php.example
file inside, renaming it api.custom.php.
Then, edit manually the desired functions:
new_post_custom: to add some code to a send of a new recipe (or a change of an existing recipe).
Arguments: post (the wordpress post object), params(parameters sent from QRecipeWriter, containing id != -1 if it’s an existing post, else it’s a new post)
getPost_custom: to add code to a recipe getted (might not be used for QRecipeWriter)
getPosts_custom: to add code to a get of the list of recipes (might not be used for QRecipeWriter)
Only the first custom function is expected to be changed with the official version of QRecipeWriter.
