Shortcode and functions to query your Google Calendar for the number of days since or until the most recent event matching your search criteria.
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.
[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.
[gcal-days type="until" search="vacation" id="firstname.lastname@example.org"]
Requires: 3.6 or higher
Compatible up to: 4.5.2
Last Updated: 6 days ago
Active Installs: 10+
Got something to say? Need help?