內容簡介
這個外掛會在頁面載入時,從一個簡單的 .csv 檔案中隨機選擇一個引用進行顯示。你可以提供任何你喜歡的 .csv 檔案,其格式應為: 來源,“引用內容”。
此外掛提供了一些 token 樣式類別/ID,讓你可以根據自己的喜好設計引用的樣式。輸出的 HTML 如下:
但丁·阿利吉耶里:
沒有比在苦難中回想起美好時光更令人悲傷的事情了。
你只需要添加 #quotationSource 和 #randomQuotation CSS 規則,或者讓其按默認樣式展示。
這是我的第一個 WordPress 插件,並不算很複雜。最初我看了原始外掛 hello.php 的代碼,再結合自己寫 mashups 的經驗,就開始寫這個插件了。
外掛標籤
開發者團隊
原文外掛簡介
This plugin displays a random quotation upon page load pulled from a simple .csv file. You can provide any .csv file you like it should be of the format: source, “Quotation”
There are token css classes/ids to allow you to style the quotations however you like. The HTML outputed looks like this:
Dante Alighieri:
There is no greater sorrow than thinking back upon a happy time in misery.
You just need to add a #quotationSource and a #randomQuotation CSS rules or just let the chips fall where they may.
This is my first WordPress plugin it isn’t terribly clever. I eventually looked at the original plugin, hello.php and combined with my experience writing mashups just cranked it out.
