內容簡介
這個外掛為 WordPress 新增一個函式 rs_shots(),可以回傳一個包含指定球員最新 15 個 Dribbble 圖片的陣列。函式回傳的型別為JSON 格式,可在 PHP 中直接使用。
外掛還新增了一個管理員選擇,可以在 Settings > RainyShots 下設定球員和快取喜好。
功能
指定球員
回傳的圖片資料預設會快取一天;可以在管理員設定中更新快取持續時間
您可以隨時在管理員選單中手動清除快取。如果您發佈一張新圖片而希望它立即在模板中顯示,這非常有用。
更多資訊可參閱我的部落格。
外掛標籤
開發者團隊
原文外掛簡介
This plugin adds a function rs_shots() to WordPress that returns an array of the 15 latest Dribbble shots by a player. The return type of the function is JSON in appropriate PHP type.
The plugin adds an admin screen under Settings > RainyShots that provides a few options such as specifying a player and caching preferences.
Features
Specify the player
Returned shots variable is cached for a day by default; this cache duration may be updated in admin settings
You can manually reset the cache through the admin at any time. This is useful if you post a shot and want it to immediately show up in your template.
Read more about it on my blog.
