WordPress.org

Plugin Directory

GCal Days

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.

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="test_lkjsadf987asdf24@group.calendar.google.com"]

Links: Plugin Homepage | Plugin Directory Page | Author Homepage

Requires: 3.6 or higher
Compatible up to: 4.1.5
Last Updated: 2015-3-7
Active Installs: Less than 10

Ratings

0 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.