Private Google Calendars

Description

This plugin can display multiple private (and public) Google calendars with a shortcode, Gutenberg block or as a widget.

Features

  • Access to private (and public) calendars by using OAuth2 or an API key.
  • Adjustable caching – this can greatly improve the performance.
  • It uses the FullCalendar library to show the calendar and can be fully customized within the Gutenberg block, shorcode attributes and the widget settings.
  • Calendar filtering.

Blocks

This plugin provides 1 block.

pgc-plugin/calendar
Private Google Calendars

Installation

  1. Upload the plugin files to the /wp-content/plugins/private-google-calendars directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress
  3. Use the Settings->Private Google Calendars screen to configure the plugin
  4. See the Help tab in the settings screen for information about setting up the OAuth2 access and using the shortcode and/or widget.

FAQ

Where can I find more information?

See the website for more information.

How can I override the calendar look?

Create a child theme and enqueue a css file with a dependency on pgc for example:

wp_enqueue_style('fullcalendar-override', get_stylesheet_directory_uri() . '/fullcalendar-override.css', ['pgc']);
I get a ‘Token has been expired or revoked’ error

This usually means you don’t have a valid access or refresh token anymore. This can only be solved by manually revoke access on the Google Permissions page and remove all plugin data.

I get an ‘Error: redirect_uri_mismatch’ error when I want to authorize

This means that you didn’t add your current URL [YOURWEBSITE]/wp-admin/options-general.php?page=pgc to the authorized redirect URIs. See the website for more information.

W3 Total Cache

If you use W3 Total Cache and have minify JS enabled, make sure that you do one of the following:
Choose “Combine only” in the “Minify” settings.
OR
Enter the following files in the “Never minify the following JS files” textbox: fullcalendar.min.js and locale-all.js. Make sure you add the full path to these files from the root of your installation, so if your WordPress website is located in the wordpress directory, this will be:

wordpress/wp-content/plugins/private-google-calendars/lib/fullcalendar4/core/main.min.js
wordpress/wp-content/plugins/private-google-calendars/lib/fullcalendar4/core/locales-all.min.js
wordpress/wp-content/plugins/private-google-calendars/lib/fullcalendar4/list/main.min.js
wordpress/wp-content/plugins/private-google-calendars/lib/fullcalendar4/timegrid/main.min.js

Reviews

January 12, 2020
Simple, modern, elegant. Provides a Gutenberg block as it should be expected from a modern WordPress plugin. The developer is also very responsive and available to help.
December 18, 2019
This is by far the best google calendar plugin available today! The only culprit might be the fact that you can't use it without having access to a Google developer account.
December 11, 2019
For a long time I was looking for a Google calendar for my site until I got acquainted with this plug-in. So what google itself offers to display the calendar on the site today is not modern. And it is not possible to hang styles on it, since it is provided in the <iframe>. The same plugin offers to remake the calendar at your discretion. It's great. In my opinion he has a good future. I got instant support. The developer is very responsible.
Read all 11 reviews

Contributors & Developers

“Private Google Calendars” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

20200209

  • Small bug fix: check for empty string when expecting array in get_option() call.

20200117

  • Use wp_remote_get and wp_remote_post instead of file_get_contents. Thanks to @maikewng for his help in understanding the problem.

20200116

  • Bug fixed: when start and end time of event are the same, the event.end is null. Now I use the event.start in that case.

20200115

  • Bug when submitting settings where file select input was not correctly checked, now this check is disabled because we can also have public calendars.
  • Added a Plugin settings link to the plugin page.

20200114

  • You can now specify title and color for public calendars.
  • Bug in widget fixed: when no private calendar was selected in settings, all private calendars were displayed in the widget form.

20200113

  • Adding referer to public calendar calls to handle restrictions on API key.

20200112

  • Now also access to public calendars with an API key instead of more difficult to setup OAuth2
  • Small layout changes

20200102

  • Gutenberg block implemented (you can use this instead of the shortcode)

20191211

  • Hidepassed and hidefuture accept number of days as well
  • Loading spinner active after timeout, so it’s not visible immediately

20191210

  • Moment timezone plugin – you can now set the timezone for each calendar; by default local times are displayed

20191209

  • Show popup also for weeklist

20191205

  • Popups can be dragged

20191204

  • Bugfix

20191203

  • Bugfix

20191202

  • Added version query parameters to enqueued styles and scripts for caching purposes
  • Make creator, location, attendees and attachments, calendarname available for events
  • CSS classes added to popup to make override style possible

20191201

  • Bug: cast attributes from shortcode to int or boolean
  • Add CSS classes to time, title, description and link of event in popup
  • Removed title attribute from event

20191133

  • Now also possible to display public calendars like national holidays

20191132

  • New option: eventlink
  • Changed option: eventpopup
  • Tippyjs theme change
  • Font size changes

20191131

  • You can now hide passed or future events

20191129

  • Title and button text change

20191129

  • No borders around events
  • Remove small font size header and button text

20191128

  • Timegrid week working
  • Bug fixed: using same cache for multiple calendars with different calendar selections
  • CSS overrides for WP
  • Mobile responsive toolbar

20191125

  • Tippy tooltips (https://atomiks.github.io/tippyjs/)
  • WP CSS override for specific fullCalendar

20191124

  • Now possible to specify specific calendars in the shortcode, so it’s now possible to show different calendars on different sections of your website.
  • FullCalendar update to v4.

20190219

  • Possible to override calendar color with fullCalendar eventColor or eventBackgroundColor properties

20181225

  • Fullcalendar locales check

20181224

  • Make working with PHP 5.4 as in requirements: Arrays are not allowed in class constants.
  • Rewrite empty() calls on methods to make it work with PHP 5.4
  • You can now sub-select calendars per widget, so you can add multiple calendars
    as a widget, where each widget displays a different calendar.

20181222

  • Updated fullcalendar to 3.9.0
  • Tested with WordPress 5.0.2
  • Fixed path for fullcalendar.print.min.css
  • Removed moment.js file, because we use the WordPress one

20171009

  • First release