[WordPress] 外掛分享: GCal Days

WordPress 外掛 GCal Days 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「GCal Days」是 2014-03-24 上架。
  • 目前有 10 個安裝啟用數。
  • 上一次更新是 2016-05-25,距離現在已有 3266 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 3.6 以上版本才可以安裝。
  • 尚未有人給過這款外掛評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

coffee2code |

外掛標籤

gcal | google | calendar | shortcode | days since |

內容簡介

這個外掛提供一個縮寫和一套函數,以返回在你的 Google 日曆中與指定的搜索詞匹配的最近過去事件之後的天數。該縮寫也可用於返回與指定搜索詞匹配的最接近未來事件的天數。

縮略語
[gcal-days search="" type="" id=""]

這個縮寫名稱是 gcal-days,它有三個屬性,但只有一個是絕對必要的:

search:(必需的)搜索詞。
type:(可選)搜索時間方向。預設為“自從”,即搜索過去的事件。 “直到”將搜索未來事件。
id:(條件可選)要搜索的日曆的ID。您可以通過外掛的設置頁面發現日曆的ID。如果在外掛的設置中定義了默認日曆,則可以從縮略語中選擇省略此縮略語屬性。

縮略語輸出表示與匹配事件的天數的數字。如果找不到事件,則顯示-1。

範例:[gcal-days search="dentist"],[gcal-days type="until" search="vacation" id="[email protected]"]

鏈接:外掛首頁 | 外掛目錄頁面 | 作者首頁

函數

該外掛提供了兩個函數供您在佈景主題模板、functions.php 或外掛中使用。

函數


參數

$search(字符串)
必填。要搜索的單詞或短語

$calendar_id(字符串)
可選的。Google 日曆的 ID。檢查外掛的設置頁面以獲取日曆 ID。只有在您通過外掛的設置定義了默認日曆時,此參數是可選的。

回傳值

與匹配事件相比的天數的整數值。如果沒有找到事件或遇到錯誤,則返回-1。

範例

$days_until = gcal_days_until( 'dentist' );
?>

// 取得從我最後一次休息的日子起的天數
$days_since = gcal_days_since( 'day off' );
// 使用該數字輸出一條消息
if ( -1 == $days_since ) {
echo "妳從來沒有放假過嗎?快去放假!";
} else {
printf( _n( '妳最後一次放假是 %d 天前。', '妳最後一次放假是 $d 天前。', $days_since ), $days_since );
}
?>

原文外掛簡介

This plugin provides a shortcode and a set of functions to return the number of days since the most recent past event in your Google Calendar matching specified search terms. The shortcode can also be used to return the number of days until the closest upcoming event matching specified search terms.
The Shortcode
[gcal-days search="" type="" id=""]

The shortcode name is gcal-days. It has three attributes, but only one of which is absolutely necessary:

search: (Required.) The search term.
type: (Optional.) The direction in time to search. Defaults to “since”, which searches past events. “until” will search future events.
id: (Conditionally optional.) The ID of the calendar to search. You can discover the IDs of calendars via the plugin’s settings page. This shortcode attribute can only be optionally omitted from shortcodes if you define a default calendar in the plugin’s settings.

The shortcode outputs a number representing the number of days until a matching event. If no event is found, a -1 will be displayed.
Examples: [gcal-days search="dentist"], [gcal-days type="until" search="vacation" id="[email protected]"]
Links: Plugin Homepage | Plugin Directory Page | Author Homepage
Functions
The plugin provides two functions for use in your theme templates, functions.php, or in plugins.
Functions


Arguments

$search (string)
Required. The word or phrase to search for

$calendar_id (string)
Optional. The ID for the Google Calendar. Check the plugin’s settings page for calendar IDs. This argument is only optional if you have defined a default calendar via the plugin’s settings.

Return Value
An integer value of the number of days since/until the matching event. -1 is returned if no event was found or an error was encountered.
Examples

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「GCal Days」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.0 | 1.1 | 1.2 | 1.1.1 | trunk |

延伸相關外掛(你可能也想知道)

  • The Events Calendar 》使用 The Events Calendar 免費外掛程式,在您的 WordPress 網站上輕鬆創建和管理事件日曆。不論您的事件是實體活動還是虛擬事件,這款 WordPress 日曆插件都...。
  • Events Manager – Calendar, Bookings, Tickets, and more! 》Events Manager 是一個全功能的 WordPress 活動註冊外掛程式,擁有靈活、可靠和強大的功能原則!, 版本 6 是到目前為止最大的更新,完全重構了我們的日曆、列...。
  • Simple Calendar – Google Calendar Plugin 》Simple Calendar 是將 Google 日曆事件添加到 WordPress 網站上最簡單的方法。快速設置。細調到您的需求。適用於手機的響應式設計。, Simple Calendar 功能, ...。
  • Timely All-in-One Events Calendar 》gline, ticket and registration links, and more., Enable users to RSVP to your events or buy tickets directly from your website with leading ticketi...。
  • LatePoint – Calendar Booking Plugin for Appointments and Events 》總結:LatePoint 是一個功能強大且用戶友好的 WordPress 預約管理外掛,簡化了任何規模企業的預訂管理。它提供多種功能,包括直觀的管理面板、適應移動裝置的...。
  • WP Event Manager – Events Calendar, Registrations, Sell Tickets with WooCommerce 》插件,非常容易使用且不會讓你感到事件管理插件過於複雜和功能繁多。你想要一種直觀、快速的方式來快速創建活動,而且需要快速設置活動,無論是實體活動、虛...。
  • Timetable and Event Schedule by MotoPress 》le and Event Schedule 的繁體中文描述:, MotoPress Timetable and Event Schedule 是一個全方位的組織者外掛程式,旨在協助您建立和管理單個或多個事件的線...。
  • WP Simple Booking Calendar 》您需要一個預訂行事曆來展示您度假屋的可用性嗎?如果您將您的度假屋租給來自世界各地的遊客,您應該在您的網站上使用這個免費的外掛程式!這個預訂行事曆非...。
  • The Events Calendar Shortcode & Block 》標籤內容:, , 使用 The Events Calendar Shortcode 和 Block,在需要顯示活動的地方顯示可自定義的活動列表!此外掛程式完全整合了現代部落客 (Modern Tribe...。
  • Easy Appointments 》在你的WordPress網站中添加預約系統,輕鬆管理預約。時間管理十分靈活,並且可以多地點、多服務和多工作人員。能用於:律師、美容院、修車、清潔服務、醫生、...。
  • Appointment Hour Booking – WordPress Booking Plugin 》Appointment Hour Booking 是一個 WordPress 外掛程式,可建立預約表單,用於具有開始時間和預定時間表的預約。使用者可以從一組根據「營業時間」和服務時間...。
  • XO Event Calendar 》XO Event Calendar 是一款簡單易用的活動行事曆外掛。, 其他活動可以設定為節日。, 功能特色, , 增加活動自訂文章類型及分類。, 支援自訂文章類型範本。, 在...。
  • WP-Persian 》WP-Persian 是一款快速強大的 WordPress 插件,可提供 Jalali 月曆和波斯語言支援,並支援標準插件。, , 如果您喜歡這款插件,請隨時在這個頁面的右側評分!,...。
  • WP FullCalendar 》FullCalendar是由Adam Arshaw開發的一款免費開源的jQuery外掛,它可以生成一個華麗的日曆,裡面填滿了您的活動。, 此外掛結合了FullCalendar 3.x和WordPress...。
  • Event Manager, Events Calendar, Tickets, Registrations – Eventin 》Eventin可在您的WordPress網站上創建和管理活動。Eventin是一個簡單易用的WooCommerce活動管理插件,可管理活動、日曆、會議和售賣門票,使活動註冊和管理變...。

文章
Filter
Mastodon