前言介紹
- 這款 WordPress 外掛「Nutrition Facts Label」是 2015-11-26 上架。
- 目前有 10 個安裝啟用數。
- 上一次更新是 2015-12-17,距離現在已有 3427 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 3.0.1 以上版本才可以安裝。
- 有 2 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
kengimel |
外掛標籤
food | food-cook | nutrition | nutrition facts | nutrition label |
內容簡介
我們發佈這個外掛的動機是基於在食品烹調主題支援網站的論壇討論。
我們認為我們已經有一些能夠作為產生該外掛基礎的代碼,其他美食部落客可以從中受益甚至可能改進。
這個外掛適用於使用食品烹調主題的博客網誌。
對於非基於食品烹調主題的美食部落格,可以建立一個名為“recipe”的自定義文章類型,並在其中加入一個元數據項,其鍵值為“RECIPE_META_ingredients”。
我們強烈建議選擇這種方法或在WordPress開發人員的指導下使用這個外掛。
從技術方面來看,為了生成營養成分標籤,您可以生成一個圖像或生成一個帖子元數據鍵(gfb_recipe_meta_nutrition_facts),該鍵保存了JSON數據(每個食譜)用於生成營養標籤。
這個外掛還在管理區中的食譜帖子編輯頁面中包含一個元數據框,該框自動讀取關鍵為“RECIPE_META_ingredients”的元數據項,該項主要包含您的配料清單,並使用它來生成營養標籤。
為了自動顯示每個食譜的營養標籤,您的WordPress開發人員應將此代碼添加到最佳位置。
也可以從文字編輯器中嵌入短代码。
但基於食品烹調食譜頁面佈局的限制,您的選擇可能會受到限制,因此最好由WordPress開發人員在此幫助。
[embed_nutrition_label]
影片教學
這個外掛為美食部落客提供了在他們的食譜帖子中添加營養成分標籤的能力。
這個外掛提供圖像下載選項或短碼作為分享營養見解的可能方法。它還提供了一個更新設施,可以為已有的食譜帖子添加營養成分標籤。
非常感謝nutritionix的人分享他們在javascript nutrition label 的使用,我們對此進行了微調並使用了它們。
我們在www.globalfoodbook.com 是開源和敏捷的倡導者。我們在github 上公開了這個外掛,並將繼續改進它。
我們感謝使用其他外掛而獲得的幫助,並希望能夠在每一個可能的機會貢獻給這個令人驚嘆的WordPress社區。
目前,我們正在努力改進後端算法,如果您有興趣可以加入我們。
我們希望聽到您對此有何改進方式。您可以通過我們的網站或電子郵件(we [at] globalfoodbook.com)聯繫我們。
謝謝。
如何使用這個營養標籤?
登入您的WordPress帳戶。
向下滾動到“食譜配料部分”,並列出配料清單。
按下“營養成分標籤生成器”的“生成標籤”按鈕。
營養成分標籤將自動為您生成。
注意:單獨列出每個配料,包括數量。
如何在現有的食譜中包含營養標籤?
要在現有的食譜上添加營養標籤,只需按下“Go”按鈕,並選擇將要向哪些現有食譜添加標籤。
原文外掛簡介
Our motivation for releasing this plugin is based on a forum discussion on the food-cook theme support site.
We felt that we already had some code that could serve as a basis for producing this plugin, other food bloggers could benefit and possibly improve on.
This plugin will work best on blogs that use food-cook theme.
For food blogs that are not based on the food-cook theme, It is possible to create a custom post type called “recipe” and an ingredients post_meta entry with key “RECIPE_META_ingredients”.
We strongly recommended taking this route or using this plugin under the guidance of a WordPress developer.
From a more technical side, In order to generate a nutrition facts label, you can either generate an image or generate a post_meta key (gfb_recipe_meta_nutrition_facts) that holds JSON data (for each recipe) which is used to generate a nutrition label.
This plugin also includes a meta box within the recipe post edit page in the admin area, which automatically reads the post_meta entry with key “RECIPE_META_ingredients” which mainly contains your ingredients list and uses that to generate the nutrition label.
In order to automatically display a nutrition label on the every recipe, your WordPress developer should add this line of code to the best possible place.
It is also possible to embed this as a short-code from the text editor.
But based on the food-cook recipe page layout your options may appear limited, hence why it is best that a WordPress developer helps out here.
[embed_nutrition_label]
How to Video
This plugin provides food bloggers with the ability to add a nutrition facts label to their recipe post(s).
This plugin provides image download option or short-codes as possible ways of sharing nutritive insights. It also provides an update facility that adds a nutrition facts label to already existing recipe posts.
Big thanks to the guys at nutritionix for sharing their javascript nutrition label which we have tweaked and used here.
We at www.globalfoodbook.com are open source and agile proponents. We have open sourced this plugin on github and will continue to improve this.
We appreciate the help we have received from using other plugins and would like to contribute back to this awesome WordPress community at every chance possible.
At the moment we are working on improving our algorithms on the backend and would like it if you could join us.
We would love to hear from you on ways this can be improved, give us a shout via the our website or via email (we [at] globalfoodbook.com).
Thanks
How to Use this Nutrition Label?
Login into your WordPress account.
Scroll down to the “Ingredients Section” and list the Ingredients.
Press “Generate Label” on the Nutrition Facts Label Generator.
The nutrition facts are automatically generated for you.
N:B List the ingredients individually including the quantities.
How to Include Nutrition Label on Existing Recipes?
To include nutrition label on existing food recipes, simply press the “Go” button for automatic generation of the nutrition label.
For any unsuccessful updates, make sure that the ingredients are placed line by line and in each line they are without commas or fullstops.
Then press the “Go” button to generate label.
Notes to developers
Contributing
If you would like to contribute to our suite of plugins, head on over to Global Food Book Labs. Feel free to fork and contribute back.
Fork it (https://github.com/globalfoodbook/nutrition-facts-label)
Create your feature branch (git checkout -b my-new-feature)
Commit your changes (git commit -am 'Add some feature')
Push to the branch (git push origin my-new-feature)
Create a new Pull Request
Adding Screenshots to the WordPress repo
Rename each screenshot for each step like this. For step 1 the screenshot is screenshot-1.png.
The banner image is named as banner-772×250.png.
Use an SVN client like smart svn or rapid svn etc to upload these images to the /assets folder.
After this, commit and all will be picked up.
Pushing plugin to WordPress svn repo
Clone this repo
git clone [email protected]:globalfoodbook/nutrition-facts-label.git
cd path/to/nutrition-facts-label
vim .git/config
Add the code below:
[svn-remote "svn"]
url = https://plugins.svn.wordpress.org/[plugin_name]/trunk
fetch = :refs/remotes/git-svn
Then merge the master into the new branch:
git svn fetch svn
git checkout -b svn git-svn
git merge master
git svn dcommit --username [Wordpress.org username]
Then rebase that branch to the master, and you can dcommit from the master to svn
git checkout master
git rebase svn
git branch -d svn
git svn dcommit --username [Wordpress.org username]
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Nutrition Facts Label」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
Nutrition Facts Vitamins 》這個外掛可以創建一個「標籤」自訂文章類型並將其指派給任何頁面或文章。, , 包括維生素D、鈣、鐵和鉀, 對於空白欄位將會生成「不是重要的____源」的文字行, ...。
WP Nutrition Facts 》加拿大的營養標示法規旨在提供一個標準格式的系統,提供有關食品營養成分的信息,以允許在購買時進行比較。清晰統一的信息應支持消費者做出符合健康飲食目標...。
Canadian Nutrition Facts Label 》此外掛建立「Label」自訂文章類型,可指定給任何頁面或文章。, , 包含鉀、鈣和鐵, 對於空白欄位會產生「不是重要來源的_____」行, 新增使用者所產生的額外維...。
FoodParser 》這個外掛可以讓您將營養標示添加到文章中。只需點擊梨子圖標,從Calorie Count或Google中複製貼上未格式化的營養信息即可。, 請參閱http://foodparsed.com/ea...。
CD Nutritional Facts 》營養標示法規設計了一套標準化格式來傳達食品營養成分的資訊,使得消費者可以在購買時進行比較。明確統一的資訊應該有助於消費者做出明智的食品選擇,以實現...。