[WordPress] 外掛分享: Cyprus Pharmacies

首頁 › 外掛目錄 › Cyprus Pharmacies
全新外掛
安裝啟用
—
尚無評分
28 天前
最後更新
—
問題解決
WordPress 5.3+ PHP 7.4+ v1.2.9 上架:2022-01-06

內容簡介

Cyprus Pharmacies 外掛提供一個簡單的方式,顯示塞浦路斯各城市(尼科西亞、利馬索、拉納卡、帕拉林尼、帕福斯)當天及明天的24小時藥局資訊,方便使用者查詢。

【主要功能】
• 支援多個城市查詢
• 自訂標題選項
• 快取功能提升效能
• 管理快取的介面
• 可自訂快取持續時間

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.2.9) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Cyprus Pharmacies」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

An easy way to show the all-night today and tomorrow pharmacies of Cyprus per city (Nicosia, Limassol, Larnaca, Paralimni, Paphos).
A simple example
[cypharm show_title=false]

More Options
The plugin supports the following optional parameters:

city: select the Cyprus city between Nicosia, Limassol, Larnaca, Paralimni and Paphos (defaults to Paphos)
title: Choose a custom title to use (defaults to false)

Performance Features

Caching: API responses are cached for 12 hours to improve performance and reduce API calls
Cache Management: Admin interface to clear cache when needed
Smart Loading: Only makes API calls when cached data is expired or doesn’t exist

Developer Features

Customizable Cache Duration: Use the cypharm_cache_duration filter to modify cache duration
Cache Management: Programmatic cache clearing with clear_cache() method
Extensible: Easy to extend with additional caching features

Customizing Cache Duration
You can customize the cache duration by adding the following code to your theme’s functions.php file:
Set cache to 24 hours:
add_filter( 'cypharm_cache_duration', function() {
return 86400; // 24 hours in seconds
});
Set cache to 1 hour:
add_filter( 'cypharm_cache_duration', function() {
return 3600; // 1 hour in seconds
});
Set cache to 30 minutes:
add_filter( 'cypharm_cache_duration', function() {
return 1800; // 30 minutes in seconds
});
Disable caching (not recommended for production):
add_filter( 'cypharm_cache_duration', function() {
return 0; // No caching
});
Using a named function (recommended):
function my_custom_cypharm_cache_duration() {
return 7200; // 2 hours in seconds
}
add_filter( 'cypharm_cache_duration', 'my_custom_cypharm_cache_duration' );
Credits

National Opendata Portal

延伸相關外掛

文章
Filter
Mastodon