markdown - Markdown that has been entered in the relevant field. PHP Markdown must be installed for this to work. Can be true or false', GCE_TEXT_DOMAIN ); ?>
-
limit -
-
format - PHP date format string', GCE_TEXT_DOMAIN ); ?>
-
newwindow - true or false', GCE_TEXT_DOMAIN ); ?>
-
precision -
-
offset -
-
autolink - true or false', GCE_TEXT_DOMAIN ); ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/wp-content/plugins/google-calendar-events/admin/delete.php b/wp-content/plugins/google-calendar-events/admin/delete.php
deleted file mode 100644
index 1e43e73..0000000
--- a/wp-content/plugins/google-calendar-events/admin/delete.php
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/wp-content/plugins/google-calendar-events/admin/edit.php b/wp-content/plugins/google-calendar-events/admin/edit.php
deleted file mode 100644
index c90a542..0000000
--- a/wp-content/plugins/google-calendar-events/admin/edit.php
+++ /dev/null
@@ -1,389 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- http://www.google.com/calendar/feeds/your-email@gmail.com/public/full.', GCE_TEXT_DOMAIN); ?>
-
- http://www.google.com/calendar/feeds/your-email@gmail.com/private-d65741b037h695ff274247f90746b2ty/basic.', GCE_TEXT_DOMAIN); ?>
-
-
-
- UNIX timestamp in the text-box.', GCE_TEXT_DOMAIN); ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
- PHP date format. Leave this blank if you\'d rather stick with the default format for your blog.', GCE_TEXT_DOMAIN); ?>
-
-
-
- PHP date format. Again, leave this blank to stick with the default.', GCE_TEXT_DOMAIN); ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
- />
-
markdown - Markdown that has been entered in the relevant field. PHP Markdown must be installed for this to work. Can be true or false', GCE_TEXT_DOMAIN ); ?>
-
limit -
-
format - PHP date format string', GCE_TEXT_DOMAIN ); ?>
-
newwindow - true or false', GCE_TEXT_DOMAIN ); ?>
-
precision -
-
offset -
-
autolink - true or false', GCE_TEXT_DOMAIN ); ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- value="on" />
-
-
-
-
-
-
- value="on" />
-
-
-
-
-
-
-
-
-
-
- value="on" />
-
-
- value="on" />
-
-
-
-
-
-
\ No newline at end of file
diff --git a/wp-content/plugins/google-calendar-events/admin/main.php b/wp-content/plugins/google-calendar-events/admin/main.php
deleted file mode 100644
index 23333b4..0000000
--- a/wp-content/plugins/google-calendar-events/admin/main.php
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $event){ ?>
-
-
-
-
-
- | |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- google-calendar-events directory) and then enter its URL below.', GCE_TEXT_DOMAIN); ?>
-
-
-
-
-
-
-
-
- value="on" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- value="on" />
-
-
-
-
-
-
- value="on" />
-
-
-
-
-
-
-
- value="on" />
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/wp-content/plugins/google-calendar-events/admin/refresh.php b/wp-content/plugins/google-calendar-events/admin/refresh.php
deleted file mode 100644
index b74c32a..0000000
--- a/wp-content/plugins/google-calendar-events/admin/refresh.php
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/wp-content/plugins/google-calendar-events/assets/banner-772x250.jpg b/wp-content/plugins/google-calendar-events/assets/banner-772x250.jpg
new file mode 100644
index 0000000..bbe92b1
Binary files /dev/null and b/wp-content/plugins/google-calendar-events/assets/banner-772x250.jpg differ
diff --git a/wp-content/plugins/google-calendar-events/assets/gcal-icon-16x16.png b/wp-content/plugins/google-calendar-events/assets/gcal-icon-16x16.png
new file mode 100644
index 0000000..6524ff7
Binary files /dev/null and b/wp-content/plugins/google-calendar-events/assets/gcal-icon-16x16.png differ
diff --git a/wp-content/plugins/google-calendar-events/assets/icon-128x128.png b/wp-content/plugins/google-calendar-events/assets/icon-128x128.png
new file mode 100644
index 0000000..7466b61
Binary files /dev/null and b/wp-content/plugins/google-calendar-events/assets/icon-128x128.png differ
diff --git a/wp-content/plugins/google-calendar-events/assets/icon-256x256.png b/wp-content/plugins/google-calendar-events/assets/icon-256x256.png
new file mode 100644
index 0000000..7dceced
Binary files /dev/null and b/wp-content/plugins/google-calendar-events/assets/icon-256x256.png differ
diff --git a/wp-content/plugins/google-calendar-events/class-google-calendar-events-admin.php b/wp-content/plugins/google-calendar-events/class-google-calendar-events-admin.php
new file mode 100644
index 0000000..41de3b0
--- /dev/null
+++ b/wp-content/plugins/google-calendar-events/class-google-calendar-events-admin.php
@@ -0,0 +1,158 @@
+, Nick Young
+ * @license GPL-2.0+
+ * @link http://philderksen.com
+ * @copyright 2014 Phil Derksen
+ */
+
+
+class Google_Calendar_Events_Admin {
+
+ /**
+ * Instance of this class.
+ *
+ * @since 2.0.0
+ *
+ * @var object
+ */
+ protected static $instance = null;
+
+ protected $version = '';
+
+ /**
+ * Slug of the plugin screen.
+ *
+ * @since 2.0.0
+ *
+ * @var string
+ */
+ protected $plugin_screen_hook_suffix = null;
+
+ /**
+ * Initialize the plugin by loading admin scripts & styles and adding a
+ * settings page and menu.
+ *
+ * @since 2.0.0
+ */
+ private function __construct() {
+
+ $plugin = Google_Calendar_Events::get_instance();
+ $this->plugin_slug = $plugin->get_plugin_slug();
+
+ $this->version = $plugin->get_plugin_version();
+
+ add_filter( 'plugin_action_links_' . plugin_basename( plugin_dir_path( __FILE__ ) . $this->plugin_slug . '.php' ), array( $this, 'add_action_links' ) );
+
+ // Setup admin side constants
+ add_action( 'init', array( $this, 'define_admin_constants' ) );
+
+ // Add admin styles
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) );
+
+ // Add admin scripts
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
+
+ // Add the options page and menu item.
+ add_action( 'admin_menu', array( $this, 'add_plugin_admin_menu' ), 2 );
+ }
+
+ public function add_plugin_admin_menu() {
+ // Add Help submenu page
+ $this->plugin_screen_hook_suffix[] = add_submenu_page(
+ 'edit.php?post_type=gce_feed',
+ __( 'General Settings', 'gce' ),
+ __( 'General Settings', 'gce' ),
+ 'manage_options',
+ $this->plugin_slug . '_general_settings',
+ array( $this, 'display_admin_page' )
+ );
+ }
+
+ public function display_admin_page() {
+ include_once( 'views/admin/admin.php' );
+ }
+
+ /**
+ * Enqueue scripts for the admin area
+ *
+ * @since 2.0.0
+ */
+ public function enqueue_admin_scripts() {
+
+ wp_enqueue_script( 'jquery' );
+
+ wp_enqueue_script( 'jquery-ui-datepicker' );
+
+ wp_enqueue_script( 'gce-admin', plugins_url( 'js/admin.js', __FILE__ ), array( 'jquery' ), $this->version, true );
+ }
+
+ /**
+ * Enqueue styles for the admin area
+ *
+ * @since 2.0.0
+ */
+ public function enqueue_admin_styles() {
+
+ wp_enqueue_style( 'jquery-ui-datepicker-css', plugins_url( 'css/jquery-ui-1.10.4.custom.min.css', __FILE__ ), array(), $this->version );
+
+ wp_enqueue_style( 'gce-admin', plugins_url( 'css/admin.css', __FILE__ ), array(), $this->version, 'all' );
+ }
+
+ /**
+ * Define constants that will be used throughout admin specific code
+ *
+ * @since 2.0.0
+ */
+ public function define_admin_constants() {
+ if( ! defined( 'GCE_DIR' ) ) {
+ define( 'GCE_DIR', dirname( __FILE__ ) );
+ }
+ }
+
+ /**
+ * Return an instance of this class.
+ *
+ * @since 2.0.0
+ *
+ * @return object A single instance of this class.
+ */
+ public static function get_instance() {
+
+ // If the single instance hasn't been set, set it now.
+ if ( null == self::$instance ) {
+ self::$instance = new self;
+ }
+
+ return self::$instance;
+ }
+
+ /**
+ * Return plugin name
+ *
+ * @since 2.0.0
+ */
+ public function get_plugin_title() {
+ return __( 'Google Calendar Events', 'gce' );
+ }
+
+ /**
+ * Add settings action link to the plugins page.
+ *
+ * @since 2.0.0
+ */
+ public function add_action_links( $links ) {
+
+ return array_merge(
+ array(
+ 'feeds' => '' . __( 'Feeds', 'gce' ) . ''
+ //'settings' => '' . __( 'Settings', 'gce' ) . '',
+ ),
+ $links
+ );
+
+ }
+}
diff --git a/wp-content/plugins/google-calendar-events/class-google-calendar-events.php b/wp-content/plugins/google-calendar-events/class-google-calendar-events.php
new file mode 100644
index 0000000..4307deb
--- /dev/null
+++ b/wp-content/plugins/google-calendar-events/class-google-calendar-events.php
@@ -0,0 +1,223 @@
+, Nick Young
+ * @license GPL-2.0+
+ * @copyright 2014 Phil Derksen
+ */
+
+
+class Google_Calendar_Events {
+
+ /**
+ * Plugin version, used for cache-busting of style and script file references.
+ *
+ * @since 2.0.0
+ *
+ * @var string
+ */
+ protected $version = '2.0.1';
+
+ /**
+ * Unique identifier for the plugin.
+ *
+ * @since 2.0.0
+ *
+ * @var string
+ */
+ protected $plugin_slug = 'google-calendar-events';
+
+ /**
+ * Instance of this class.
+ *
+ * @since 2.0.0
+ *
+ * @var object
+ */
+ protected static $instance = null;
+
+ /**
+ * Initialize the plugin by setting localization and loading public scripts
+ * and styles.
+ *
+ * @since 2.0.0
+ */
+ private function __construct() {
+
+ $this->includes();
+
+ $old = get_option( 'gce_version' );
+
+ if( version_compare( $old, $this->version, '<' ) ) {
+ delete_option( 'gce_upgrade_has_run' );
+ }
+
+ if( false === get_option( 'gce_upgrade_has_run' ) ) {
+ $this->upgrade();
+ }
+
+
+ $this->setup_constants();
+
+ add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_public_scripts' ) );
+ add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_public_styles' ) );
+
+ // AJAX
+
+
+ // Load plugin text domain
+ add_action( 'plugins_loaded', array( $this, 'plugin_textdomain' ) );
+
+ }
+
+ /**
+ * Load the upgrade file
+ *
+ * @since 2.0.0
+ */
+ private function upgrade() {
+ include_once( 'includes/admin/upgrade.php' );
+ }
+
+ /**
+ * Setup public constants
+ *
+ * @since 2.0.0
+ */
+ public function setup_constants() {
+ if( ! defined( 'GCE_DIR' ) ) {
+ define( 'GCE_DIR', dirname( __FILE__ ) );
+ }
+
+ if( ! defined( 'GCE_PLUGIN_SLUG' ) ) {
+ define( 'GCE_PLUGIN_SLUG', $this->plugin_slug );
+ }
+ }
+
+ /**
+ * Include all necessary files
+ *
+ * @since 2.0.0
+ */
+ public static function includes() {
+ global $gce_options;
+
+ // First include common files between admin and public
+ include_once( 'includes/misc-functions.php' );
+ include_once( 'includes/gce-feed-cpt.php' );
+ include_once( 'includes/class-gce-feed.php' );
+ include_once( 'includes/class-gce-event.php' );
+ include_once( 'includes/shortcodes.php' );
+ include_once( 'includes/class-gce-display.php' );
+
+ include_once( 'views/widgets.php' );
+
+ // Now include files specifically for public or admin
+ if( is_admin() ) {
+ // Admin includes
+ include_once( 'includes/admin/admin-functions.php' );
+ } else {
+ // Public includes
+ }
+
+ // Setup our main settings options
+ include_once( 'includes/register-settings.php' );
+
+ $gce_options = gce_get_settings();
+ }
+
+ /**
+ * Load public facing scripts
+ *
+ * @since 2.0.0
+ */
+ public function enqueue_public_scripts() {
+
+ wp_enqueue_script( $this->plugin_slug . '-qtip', plugins_url( 'js/jquery-qtip.js', __FILE__ ), array( 'jquery' ), $this->version, true );
+ wp_enqueue_script( $this->plugin_slug . '-public', plugins_url( 'js/gce-script.js', __FILE__ ), array( 'jquery', $this->plugin_slug . '-qtip' ), $this->version, true );
+
+ wp_localize_script( $this->plugin_slug . '-public', 'gce',
+ array(
+ 'ajaxurl' => admin_url( 'admin-ajax.php' )
+ ) );
+ }
+
+ /*
+ * Load public facing styles
+ *
+ * @since 2.0.0
+ */
+ public function enqueue_public_styles() {
+ wp_enqueue_style( $this->plugin_slug . '-public', plugins_url( 'css/gce-style.css', __FILE__ ), array(), $this->version );
+ }
+
+ /**
+ * Return the plugin slug.
+ *
+ * @since 2.0.0
+ *
+ * @return Plugin version variable.
+ */
+ public function get_plugin_slug() {
+ return $this->plugin_slug;
+ }
+
+ /**
+ * Return the plugin version.
+ *
+ * @since 1.0.0
+ *
+ * @return Plugin slug variable.
+ */
+ public function get_plugin_version() {
+ return $this->version;
+ }
+
+ /**
+ * Return an instance of this class.
+ *
+ * @since 1.0.0
+ *
+ * @return object A single instance of this class.
+ */
+ public static function get_instance() {
+
+ // If the single instance hasn't been set, set it now.
+ if ( null == self::$instance ) {
+ self::$instance = new self;
+ }
+
+ return self::$instance;
+ }
+
+ /**
+ * Load the plugin text domain for translation.
+ *
+ * @since 2.0.0
+ */
+ public function plugin_textdomain() {
+ // Set filter for plugin's languages directory
+ $gce_lang_dir = dirname( plugin_basename( GCE_MAIN_FILE ) ) . '/languages/';
+ $gce_lang_dir = apply_filters( 'gce_languages_directory', $gce_lang_dir );
+
+ // Traditional WordPress plugin locale filter
+ $locale = apply_filters( 'plugin_locale', get_locale(), 'gce' );
+ $mofile = sprintf( '%1$s-%2$s.mo', 'gce', $locale );
+
+ // Setup paths to current locale file
+ $mofile_local = $gce_lang_dir . $mofile;
+ $mofile_global = WP_LANG_DIR . '/gce/' . $mofile;
+
+ if ( file_exists( $mofile_global ) ) {
+ load_textdomain( 'gce', $mofile_global );
+ } elseif ( file_exists( $mofile_local ) ) {
+ load_textdomain( 'gce', $mofile_local );
+ } else {
+ // Load the default language files
+ load_plugin_textdomain( 'gce', false, $gce_lang_dir );
+ }
+
+ }
+}
diff --git a/wp-content/plugins/google-calendar-events/css/admin.css b/wp-content/plugins/google-calendar-events/css/admin.css
new file mode 100644
index 0000000..b9052f5
--- /dev/null
+++ b/wp-content/plugins/google-calendar-events/css/admin.css
@@ -0,0 +1,52 @@
+/**
+ * Admin CSS file
+ *
+ * @package GCE
+ * @author Phil Derksen , Nick Young
+ * @license GPL-2.0+
+ * @copyright 2014 Phil Derksen
+ */
+
+.gce-meta-control {
+ margin-bottom: 15px;
+}
+
+.gce-meta-control label {
+ display: block;
+ font-weight: bold;
+}
+
+#gce-display-options-wrap .gce-meta-control label {
+ font-weight: normal;
+ margin-top: 10px;
+ margin-bottom: 5px;
+}
+
+#gce-display-options-wrap .gce-meta-control p label {
+ display: inline;
+}
+
+#gce-display-options-wrap .gce-meta-control label#gce-simple-display-label {
+ font-weight: bold;
+ color: #cb4d4d;
+}
+
+.gce-admin-hidden {
+ display: none;
+}
+
+#gce-display-options-wrap .gce-meta-control span.description {
+ display: block;
+ margin-top: 5px;
+}
+
+#gce-display-options-wrap .gce-meta-control span.description p {
+ margin-top: 5px;
+}
+
+#gce-admin-promo {
+ background-color: #fcf8e3;
+ border: 1px solid #faebbe;
+ color: #8a6d3b;
+ padding: 15px;
+}
diff --git a/wp-content/plugins/google-calendar-events/css/gce-old-style.css b/wp-content/plugins/google-calendar-events/css/gce-old-style.css
deleted file mode 100644
index 75e343d..0000000
--- a/wp-content/plugins/google-calendar-events/css/gce-old-style.css
+++ /dev/null
@@ -1,28 +0,0 @@
-.gce-page-grid .gce-calendar th{
- padding:0 !important;
-}
-
-.gce-page-grid .gce-calendar th abbr,
-.gce-widget-grid .gce-calendar th abbr{
- border-bottom:none !important;
-}
-
-.gce-page-list .gce-list p{
- margin:0 !important;
-}
-
-.gce-page-list .gce-list ul,
-.gce-widget-list .gce-list ul{
- margin:0 !important;
- padding:0 !important;
-}
-
-.gce-event-info .gce-tooltip-title{
- margin:5px !important;
-}
-
-.gce-event-info ul{
- padding:0 !important;
- margin:5px !important;
- list-style-type:none !important;
-}
\ No newline at end of file
diff --git a/wp-content/plugins/google-calendar-events/css/gce-style.css b/wp-content/plugins/google-calendar-events/css/gce-style.css
index fd36360..cc8b528 100644
--- a/wp-content/plugins/google-calendar-events/css/gce-style.css
+++ b/wp-content/plugins/google-calendar-events/css/gce-style.css
@@ -1,203 +1,222 @@
-/* PAGE GRID */
-
-.gce-page-grid .gce-calendar .gce-caption{ /* Caption at top of calendar */
- color:#333333;
- text-align:center;
-}
-
-.gce-page-grid .gce-calendar{ /* Main calendar table */
- width:100%;
- border-collapse:collapse;
- border:1px solid #CCCCCC;
- color:#CCCCCC;
-}
-
-.gce-page-grid .gce-calendar th{ /* Day headings (S, M etc.) */
- border:1px solid #CCCCCC;
- text-align:center;
- width:14.29%;
- padding:0;
-}
-
-.gce-page-grid .gce-calendar td{ /* Day table cells */
- border:1px solid #CCCCCC;
- text-align:center;
- height:80px;
- vertical-align:middle;
- padding:0;
-}
-
-.gce-page-grid .gce-calendar .gce-has-events{ /* Table cells with events */
- color:#333333;
- cursor:pointer;
-}
-
-.gce-page-grid .gce-calendar .gce-event-info{ /* Event information */
- display:none; /* Important! */
-}
-
-.gce-page-grid .gce-calendar .gce-day-number{ /* Day number span */
- font-size:2em;
-}
-
-.gce-page-grid .gce-calendar .gce-today{ /* Table cell that represents today */
- background-color:#DDDDDD;
-}
-
-.gce-page-grid .gce-calendar .gce-next,
-.gce-page-grid .gce-calendar .gce-prev{ /* Previous and next month links */
- cursor:pointer;
- display:inline-block;
- width:3%;
-}
-
-.gce-page-grid .gce-calendar .gce-month-title{ /* Month title */
- display:inline-block;
- width:90%;
-}
-
-.gce-page-grid .gce-calendar th abbr{ /* Day letter abbreviation */
- border-bottom:none;
-}
-
-/* PAGE LIST */
-
-.gce-page-list .gce-list p{ /* Each piece of information in the list */
- margin:0;
-}
-
-.gce-page-list .gce-list p span,
-.gce-page-list .gce-list div span{ /* The text displayed before each piece of info, 'Starts:' for example */
- color:#999999;
-}
-
-.gce-page-list .gce-list .gce-list-event{ /* The event title */
- background-color:#DDDDDD;
-}
-
-.gce-page-list .gce-list .gce-list-title{ /* The title (not the same as event title) */
- font-weight:bold;
-}
-
-.gce-page-list .gce-list ul{
- list-style-type:none;
- margin:0;
- padding:0;
-}
-
-/* WIDGET GRID */
-
-.gce-widget-grid .gce-calendar .gce-caption{
- text-align:center;
-}
-
-.gce-widget-grid .gce-calendar{ /* Main calendar table */
- width:100%;
- border:1px solid #CCCCCC;
- border-collapse:collapse;
-}
-
-.gce-widget-grid .gce-calendar th{ /* Day headings (S, M etc.) */
- width:14.29%;
- border:1px solid #CCCCCC;
- text-align:center;
-}
-
-.gce-widget-grid .gce-calendar td{ /* Day table cells */
- color:#CCCCCC;
- width:14.29%;
- border:1px solid #CCCCCC;
- text-align:center;
-}
-
-.gce-widget-grid .gce-calendar .gce-has-events{ /* Table cells with events */
- cursor:pointer;
- color:#666666;
-}
-
-.gce-widget-grid .gce-calendar .gce-today{ /* Table cell that represents today */
- background-color:#DDDDDD;
-}
-
-.gce-widget-grid .gce-calendar .gce-event-info{ /* Event information */
- display:none; /* Important! */
-}
-
-.gce-widget-grid .gce-calendar .gce-next,
-.gce-widget-grid .gce-calendar .gce-prev{ /* Prev and next month links */
- cursor:pointer;
- display:inline-block;
- width:5%;
-}
-
-.gce-widget-grid .gce-calendar .gce-month-title{ /* Month title in caption at top of table */
- display:inline-block;
- width:80%;
-}
-
-.gce-widget-grid .gce-calendar th abbr{ /* Day name abbreviations */
- border-bottom:none;
-}
-
-/* WIDGET LIST */
-
-.gce-widget-list .gce-list p{ /* Each piece of information in the list */
- margin:0;
-}
-
-.gce-widget-list .gce-list p span,
-.gce-widget-list .gce-list div span{ /* The text displayed before each piece of info, 'Starts:' for example */
- color:#999999;
-}
-
-.gce-widget-list .gce-list .gce-list-event{ /* The event title */
- background-color:#DDDDDD;
-}
-
-.gce-widget-list .gce-list .gce-list-title{ /* The title (not the same as event title) */
- font-weight:bold;
-}
-
-.gce-widget-list .gce-list ul{
- list-style-type:none;
- margin:0;
- padding:0;
-}
-
-/* TOOLTIP */
-
-.gce-event-info{ /* Tooltip container */
- background-color:#FFFFFF;
- border:1px solid #333333;
- max-width:300px;
-}
-
-.gce-event-info .gce-tooltip-title{ /* 'Events on...' text */
- margin:5px;
- font-weight:bold;
- font-size:1.2em;
-}
-
-.gce-event-info ul{ /* Events list */
- padding:0;
- margin:5px;
- list-style-type:none;
-}
-
-.gce-event-info ul li{ /* Event list item */
- margin:10px 0 0 0;
-}
-
-.gce-event-info ul li p{ /* Each piece of information */
- margin:0;
-}
-
-.gce-event-info ul li p span,
-.gce-event-info ul li div span{ /* The text displayed before each piece of info, 'Starts:' for example */
- color:#999999;
-}
-
-.gce-event-info .gce-tooltip-event{ /* The event title */
- background-color:#DDDDDD;
- font-weight:bold;
-}
\ No newline at end of file
+/**
+ * Public facing CSS file
+ *
+ * @package GCE
+ * @author Phil Derksen , Nick Young
+ * @license GPL-2.0+
+ * @copyright 2014 Phil Derksen
+ */
+
+/* PAGE GRID */
+
+.gce-page-grid .gce-calendar .gce-caption{ /* Caption at top of calendar */
+ color:#333333;
+ text-align:center;
+}
+
+.gce-page-grid .gce-calendar{ /* Main calendar table */
+ width:100%;
+ border-collapse:collapse;
+ border:1px solid #CCCCCC;
+ color:#CCCCCC;
+}
+
+.gce-page-grid .gce-calendar th{ /* Day headings (S, M etc.) */
+ border:1px solid #CCCCCC;
+ text-align:center;
+ width:14.29%;
+ padding:0;
+}
+
+.gce-page-grid .gce-calendar td{ /* Day table cells */
+ border:1px solid #CCCCCC;
+ text-align:center;
+ height:80px;
+ vertical-align:middle;
+ padding:0;
+}
+
+.gce-page-grid .gce-calendar .gce-has-events{ /* Table cells with events */
+ color:#333333;
+ cursor:pointer;
+}
+
+.gce-page-grid .gce-calendar .gce-event-info{ /* Event information */
+ display:none; /* Important! */
+}
+
+.gce-page-grid .gce-calendar .gce-day-number{ /* Day number span */
+ font-size:2em;
+}
+
+.gce-page-grid .gce-calendar .gce-today{ /* Table cell that represents today */
+ background-color:#DDDDDD;
+}
+
+.gce-page-grid .gce-calendar .gce-next,
+.gce-page-grid .gce-calendar .gce-prev{ /* Previous and next month links */
+ cursor:pointer;
+ display:inline-block;
+ width:5%;
+ white-space: nowrap;
+}
+
+.gce-page-grid .gce-calendar .gce-prev{
+ float: left;
+}
+
+.gce-page-grid .gce-calendar .gce-month-title{ /* Month title */
+ display:inline-block;
+ width:80%;
+}
+
+.gce-page-grid .gce-calendar th abbr{ /* Day letter abbreviation */
+ border-bottom:none;
+}
+
+/* PAGE LIST */
+
+.gce-page-list .gce-list p{ /* Each piece of information in the list */
+ margin:0;
+}
+
+.gce-page-list .gce-list p span,
+.gce-page-list .gce-list div span{ /* The text displayed before each piece of info, 'Starts:' for example */
+ color:#999999;
+}
+
+.gce-page-list .gce-list .gce-list-event{ /* The event title */
+ background-color:#DDDDDD;
+}
+
+.gce-page-list .gce-list .gce-list-title{ /* The title (not the same as event title) */
+ font-weight:bold;
+}
+
+.gce-page-list .gce-list ul{
+ list-style-type:none;
+ margin:0;
+ padding:0;
+}
+
+/* WIDGET GRID */
+
+.gce-widget-grid .gce-calendar .gce-caption{
+ text-align:center;
+}
+
+.gce-widget-grid .gce-calendar{ /* Main calendar table */
+ width:100%;
+ border:1px solid #CCCCCC;
+ border-collapse:collapse;
+}
+
+.gce-widget-grid .gce-calendar th{ /* Day headings (S, M etc.) */
+ width:14.29%;
+ border:1px solid #CCCCCC;
+ text-align:center;
+}
+
+.gce-widget-grid .gce-calendar td{ /* Day table cells */
+ color:#CCCCCC;
+ width:14.29%;
+ border:1px solid #CCCCCC;
+ text-align:center;
+}
+
+.gce-widget-grid .gce-calendar .gce-has-events{ /* Table cells with events */
+ cursor:pointer;
+ color:#666666;
+}
+
+.gce-widget-grid .gce-calendar .gce-today{ /* Table cell that represents today */
+ background-color:#DDDDDD;
+}
+
+.gce-widget-grid .gce-calendar .gce-event-info{ /* Event information */
+ display:none; /* Important! */
+}
+
+.gce-widget-grid .gce-calendar .gce-next,
+.gce-widget-grid .gce-calendar .gce-prev{ /* Prev and next month links */
+ cursor:pointer;
+ display:inline-block;
+ width:5%;
+ white-space: nowrap;
+}
+
+.gce-widget-grid .gce-calendar .gce-prev{
+ float: left;
+}
+
+.gce-widget-grid .gce-calendar .gce-month-title{ /* Month title in caption at top of table */
+ display:inline-block;
+ width:80%;
+}
+
+.gce-widget-grid .gce-calendar th abbr{ /* Day name abbreviations */
+ border-bottom:none;
+}
+
+/* WIDGET LIST */
+
+.gce-widget-list .gce-list p{ /* Each piece of information in the list */
+ margin:0;
+}
+
+.gce-widget-list .gce-list p span,
+.gce-widget-list .gce-list div span{ /* The text displayed before each piece of info, 'Starts:' for example */
+ color:#999999;
+}
+
+.gce-widget-list .gce-list .gce-list-event{ /* The event title */
+ background-color:#DDDDDD;
+}
+
+.gce-widget-list .gce-list .gce-list-title{ /* The title (not the same as event title) */
+ font-weight:bold;
+}
+
+.gce-widget-list .gce-list ul{
+ list-style-type:none;
+ margin:0;
+ padding:0;
+}
+
+/* TOOLTIP */
+
+.gce-event-info{ /* Tooltip container */
+ background-color:#FFFFFF;
+ border:1px solid #333333;
+ max-width:300px;
+}
+
+.gce-event-info .gce-tooltip-title{ /* 'Events on...' text */
+ margin:5px;
+ font-weight:bold;
+ font-size:1.2em;
+}
+
+.gce-event-info ul{ /* Events list */
+ padding:0;
+ margin:5px;
+ list-style-type:none;
+}
+
+.gce-event-info ul li{ /* Event list item */
+ margin:10px 0 0 0;
+}
+
+.gce-event-info ul li p{ /* Each piece of information */
+ margin:0;
+}
+
+.gce-event-info ul li p span,
+.gce-event-info ul li div span{ /* The text displayed before each piece of info, 'Starts:' for example */
+ color:#999999;
+}
+
+.gce-event-info .gce-tooltip-event{ /* The event title */
+ background-color:#DDDDDD;
+ font-weight:bold;
+}
diff --git a/wp-content/plugins/google-calendar-events/css/images/animated-overlay.gif b/wp-content/plugins/google-calendar-events/css/images/animated-overlay.gif
new file mode 100644
index 0000000..d441f75
Binary files /dev/null and b/wp-content/plugins/google-calendar-events/css/images/animated-overlay.gif differ
diff --git a/wp-content/plugins/google-calendar-events/css/images/ui-bg_flat_0_aaaaaa_40x100.png b/wp-content/plugins/google-calendar-events/css/images/ui-bg_flat_0_aaaaaa_40x100.png
new file mode 100644
index 0000000..4fa0418
Binary files /dev/null and b/wp-content/plugins/google-calendar-events/css/images/ui-bg_flat_0_aaaaaa_40x100.png differ
diff --git a/wp-content/plugins/google-calendar-events/css/images/ui-bg_flat_75_ffffff_40x100.png b/wp-content/plugins/google-calendar-events/css/images/ui-bg_flat_75_ffffff_40x100.png
new file mode 100644
index 0000000..cb911e7
Binary files /dev/null and b/wp-content/plugins/google-calendar-events/css/images/ui-bg_flat_75_ffffff_40x100.png differ
diff --git a/wp-content/plugins/google-calendar-events/css/images/ui-bg_glass_55_fbf9ee_1x400.png b/wp-content/plugins/google-calendar-events/css/images/ui-bg_glass_55_fbf9ee_1x400.png
new file mode 100644
index 0000000..44b629d
Binary files /dev/null and b/wp-content/plugins/google-calendar-events/css/images/ui-bg_glass_55_fbf9ee_1x400.png differ
diff --git a/wp-content/plugins/google-calendar-events/css/images/ui-bg_glass_65_ffffff_1x400.png b/wp-content/plugins/google-calendar-events/css/images/ui-bg_glass_65_ffffff_1x400.png
new file mode 100644
index 0000000..fc96e91
Binary files /dev/null and b/wp-content/plugins/google-calendar-events/css/images/ui-bg_glass_65_ffffff_1x400.png differ
diff --git a/wp-content/plugins/google-calendar-events/css/images/ui-bg_glass_75_dadada_1x400.png b/wp-content/plugins/google-calendar-events/css/images/ui-bg_glass_75_dadada_1x400.png
new file mode 100644
index 0000000..20fbc66
Binary files /dev/null and b/wp-content/plugins/google-calendar-events/css/images/ui-bg_glass_75_dadada_1x400.png differ
diff --git a/wp-content/plugins/google-calendar-events/css/images/ui-bg_glass_75_e6e6e6_1x400.png b/wp-content/plugins/google-calendar-events/css/images/ui-bg_glass_75_e6e6e6_1x400.png
new file mode 100644
index 0000000..b0abea7
Binary files /dev/null and b/wp-content/plugins/google-calendar-events/css/images/ui-bg_glass_75_e6e6e6_1x400.png differ
diff --git a/wp-content/plugins/google-calendar-events/css/images/ui-bg_glass_95_fef1ec_1x400.png b/wp-content/plugins/google-calendar-events/css/images/ui-bg_glass_95_fef1ec_1x400.png
new file mode 100644
index 0000000..f595883
Binary files /dev/null and b/wp-content/plugins/google-calendar-events/css/images/ui-bg_glass_95_fef1ec_1x400.png differ
diff --git a/wp-content/plugins/google-calendar-events/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/wp-content/plugins/google-calendar-events/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png
new file mode 100644
index 0000000..98a2431
Binary files /dev/null and b/wp-content/plugins/google-calendar-events/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png differ
diff --git a/wp-content/plugins/google-calendar-events/css/images/ui-icons_222222_256x240.png b/wp-content/plugins/google-calendar-events/css/images/ui-icons_222222_256x240.png
new file mode 100644
index 0000000..c1cb117
Binary files /dev/null and b/wp-content/plugins/google-calendar-events/css/images/ui-icons_222222_256x240.png differ
diff --git a/wp-content/plugins/google-calendar-events/css/images/ui-icons_2e83ff_256x240.png b/wp-content/plugins/google-calendar-events/css/images/ui-icons_2e83ff_256x240.png
new file mode 100644
index 0000000..84b601b
Binary files /dev/null and b/wp-content/plugins/google-calendar-events/css/images/ui-icons_2e83ff_256x240.png differ
diff --git a/wp-content/plugins/google-calendar-events/css/images/ui-icons_454545_256x240.png b/wp-content/plugins/google-calendar-events/css/images/ui-icons_454545_256x240.png
new file mode 100644
index 0000000..b6db1ac
Binary files /dev/null and b/wp-content/plugins/google-calendar-events/css/images/ui-icons_454545_256x240.png differ
diff --git a/wp-content/plugins/google-calendar-events/css/images/ui-icons_888888_256x240.png b/wp-content/plugins/google-calendar-events/css/images/ui-icons_888888_256x240.png
new file mode 100644
index 0000000..feea0e2
Binary files /dev/null and b/wp-content/plugins/google-calendar-events/css/images/ui-icons_888888_256x240.png differ
diff --git a/wp-content/plugins/google-calendar-events/css/images/ui-icons_cd0a0a_256x240.png b/wp-content/plugins/google-calendar-events/css/images/ui-icons_cd0a0a_256x240.png
new file mode 100644
index 0000000..ed5b6b0
Binary files /dev/null and b/wp-content/plugins/google-calendar-events/css/images/ui-icons_cd0a0a_256x240.png differ
diff --git a/wp-content/plugins/google-calendar-events/css/jquery-ui-1.10.4.custom.min.css b/wp-content/plugins/google-calendar-events/css/jquery-ui-1.10.4.custom.min.css
new file mode 100644
index 0000000..ffbd04d
--- /dev/null
+++ b/wp-content/plugins/google-calendar-events/css/jquery-ui-1.10.4.custom.min.css
@@ -0,0 +1,7 @@
+/*! jQuery UI - v1.10.4 - 2014-05-14
+* http://jqueryui.com
+* Includes: jquery.ui.core.css, jquery.ui.datepicker.css, jquery.ui.theme.css
+* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
+* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
+
+.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff url("images/ui-bg_flat_75_ffffff_40x100.png") 50% 50% repeat-x;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;color:#222;font-weight:bold}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #999;background:#dadada url("images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#212121;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url("images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url("images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-state-default .ui-icon{background-image:url("images/ui-icons_888888_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("images/ui-icons_454545_256x240.png")}.ui-state-active .ui-icon{background-image:url("images/ui-icons_454545_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("images/ui-icons_2e83ff_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_cd0a0a_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px}
\ No newline at end of file
diff --git a/wp-content/plugins/google-calendar-events/google-calendar-events.php b/wp-content/plugins/google-calendar-events/google-calendar-events.php
index 754b033..585506d 100644
--- a/wp-content/plugins/google-calendar-events/google-calendar-events.php
+++ b/wp-content/plugins/google-calendar-events/google-calendar-events.php
@@ -1,719 +1,60 @@
-, Nick Young
- * @license GPL-2.0+
- * @link http://philderksen.com
- * @copyright 2014 Phil Derksen
- *
- * @wordpress-plugin
- * Plugin Name: Google Calendar Events
- * Plugin URI: http://philderksen.com/google-calendar-events-version-2/
- * Description: Parses Google Calendar feeds and displays the events as a calendar grid or list on a page, post or widget.
- * Version: 0.7.3.1
- * Author: Phil Derksen
- * Author URI: http://philderksen.com
- * License: GPL-2.0+
- * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
- */
-
-define( 'GCE_PLUGIN_NAME', str_replace( '.php', '', basename( __FILE__ ) ) );
-define( 'GCE_TEXT_DOMAIN', 'google-calendar-events' );
-define( 'GCE_OPTIONS_NAME', 'gce_options' );
-define( 'GCE_GENERAL_OPTIONS_NAME', 'gce_general' );
-define( 'GCE_VERSION', '0.7.3' );
-
-if ( ! class_exists( 'Google_Calendar_Events' ) ) {
- class Google_Calendar_Events {
- function __construct() {
-
- register_activation_hook( __FILE__, array( $this, 'activate_plugin' ) );
-
- register_deactivation_hook( __FILE__, array( $this, 'deactivate_plugin' ) );
-
- add_action( 'init', array( $this, 'init_plugin' ) );
- add_action( 'wp_ajax_gce_ajax', array( $this, 'gce_ajax' ) );
- add_action( 'wp_ajax_nopriv_gce_ajax', array( $this, 'gce_ajax' ) );
- add_action( 'widgets_init', array( $this, 'add_widget' ) );
-
- //No point doing any of this if currently processing an AJAX request
- if ( ! defined( 'DOING_AJAX' ) || !DOING_AJAX ) {
- add_action( 'admin_menu', array( $this, 'setup_admin' ) );
- add_action( 'admin_init', array( $this, 'init_admin' ) );
- add_action( 'wp_enqueue_scripts', array( $this, 'add_styles' ) );
- add_action( 'wp_enqueue_scripts', array( $this, 'add_scripts' ) );
- add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'add_settings_link' ) );
- add_shortcode( 'google-calendar-events', array( $this, 'shortcode_handler' ) );
-
- if( false === get_option( 'gce_show_upgrade_notice' ) ) {
- add_action( 'admin_notices', array( $this, 'show_upgrade_notice' ) );
- }
- }
- }
-
- // Show an upgrade warning notice to users for the 2.0.0 release
- function show_upgrade_notice() {
-
- if ( ! empty( $_REQUEST['gce-dismiss-install-nag'] ) ) {
- add_option( 'gce_show_upgrade_notice', 1 );
- remove_action( 'admin_notices', array( $this, 'show_upgrade_notice' ) );
- return;
- }
-
- include_once( 'inc/upgrade-notice.php' );
- }
-
- function deactivate_plugin(){
- delete_option( 'gce_show_upgrade_notice' );
- }
-
- //PHP 5.2 is required (json_decode), so if PHP version is lower then 5.2, display an error message and deactivate the plugin
- function activate_plugin(){
- if( version_compare( PHP_VERSION, '5.2', '<' ) ) {
- if( is_admin() && ( ! defined('DOING_AJAX') || ! DOING_AJAX ) ) {
- require_once ABSPATH . '/wp-admin/includes/plugin.php';
- deactivate_plugins( basename( __FILE__ ) );
- wp_die( 'Google Calendar Events requires the server on which your site resides to be running PHP 5.2 or higher. As of version 3.2, WordPress itself will also have this requirement. You should get in touch with your web hosting provider and ask them to update PHP.
Back to Plugins' );
- }
- }
- }
-
- //If any new options have been added between versions, this will update any saved feeds with defaults for new options (shouldn't overwrite anything saved)
- function update_settings() {
- //If there are some plugin options in the database, but no version info, then this must be an upgrade from version 0.5 or below, so add flag that will provide user with option to clear old transients
- if ( get_option( GCE_OPTIONS_NAME ) && ! get_option( 'gce_version' ) )
- add_option( 'gce_clear_old_transients', true );
-
- add_option( 'gce_version', GCE_VERSION );
-
- add_option( GCE_OPTIONS_NAME );
- add_option( GCE_GENERAL_OPTIONS_NAME );
-
- //Get feed options
- $options = get_option( GCE_OPTIONS_NAME );
-
- if ( ! empty( $options ) ) {
- foreach ( $options as $key => $saved_feed_options ) {
- $defaults = array(
- 'id' => 1,
- 'title' => '',
- 'url' => '',
- 'retrieve_from' => 'today',
- 'retrieve_from_value' => 0,
- 'retrieve_until' => 'any',
- 'retrieve_until_value' => 0,
- 'max_events' => 25,
- 'date_format' => '',
- 'time_format' => '',
- 'timezone' => 'default',
- 'cache_duration' => 43200,
- 'multiple_day' => 'false',
- 'display_start' => 'time',
- 'display_end' => 'time-date',
- 'display_location' => '',
- 'display_desc' => '',
- 'display_link' => 'on',
- 'display_start_text' => 'Starts:',
- 'display_end_text' => 'Ends:',
- 'display_location_text' => 'Location:',
- 'display_desc_text' => 'Description:',
- 'display_desc_limit' => '',
- 'display_link_text' => 'More details',
- 'display_link_target' => '',
- 'display_separator' => ', ',
- 'use_builder' => 'false',
- 'builder' => ''
- );
-
- //If necessary, copy saved behaviour of old show_past_events and day_limit options into the new from / until options
- if ( isset( $saved_feed_options['show_past_events'] ) ) {
- if ( 'true' == $saved_feed_options['show_past_events'] ) {
- $saved_feed_options['retrieve_from'] = 'month-start';
- } else {
- $saved_feed_options['retrieve_from'] = 'today';
- }
- }
-
- if ( isset( $saved_feed_options['day_limit'] ) && '' != $saved_feed_options['day_limit'] ) {
- $saved_feed_options['retrieve_until'] = 'today';
- $saved_feed_options['retrieve_until_value'] = (int) $saved_feed_options['day_limit'] * 86400;
- }
-
- //Update old display_start / display_end values
- if ( ! isset( $saved_feed_options['display_start'] ) )
- $saved_feed_options['display_start'] = 'none';
- elseif ( 'on' == $saved_feed_options['display_start'] )
- $saved_feed_options['display_start'] = 'time';
-
- if( ! isset( $saved_feed_options['display_end'] ) )
- $saved_feed_options['display_end'] = 'none';
- elseif ( 'on' == $saved_feed_options['display_end'] )
- $saved_feed_options['display_end'] = 'time-date';
-
- //Merge saved options with defaults
- foreach ( $saved_feed_options as $option_name => $option ) {
- $defaults[$option_name] = $saved_feed_options[$option_name];
- }
-
- $options[$key] = $defaults;
- }
- }
-
- //Save feed options
- update_option( GCE_OPTIONS_NAME, $options );
-
- //Get general options
- $options = get_option( GCE_GENERAL_OPTIONS_NAME );
-
- $defaults = array(
- 'stylesheet' => '',
- 'javascript' => false,
- 'loading' => 'Loading...',
- 'error' => 'Events cannot currently be displayed, sorry! Please check back later.',
- 'fields' => true,
- 'old_stylesheet' => false,
- 'save_settings' => true
- );
-
- $old_stylesheet_option = get_option( 'gce_stylesheet' );
-
- //If old custom stylesheet option was set, add it to general options, then delete old option
- if( false !== $old_stylesheet_option ) {
- $defaults['stylesheet'] = $old_stylesheet_option;
- delete_option( 'gce_stylesheet' );
- } elseif ( isset($options['stylesheet'] ) ) {
- $defaults['stylesheet'] = $options['stylesheet'];
- }
-
- if ( isset($options['javascript'] ) )
- $defaults['javascript'] = $options['javascript'];
-
- if ( isset( $options['loading'] ) )
- $defaults['loading'] = $options['loading'];
-
- if ( isset($options['error'] ) )
- $defaults['error'] = $options['error'];
-
- if ( isset($options['fields'] ) )
- $defaults['fields'] = $options['fields'];
-
- if( isset( $options['old_stylesheet'] ) )
- $defaults['old_stylesheet'] = $options['old_stylesheet'];
-
- if( isset( $options['save_settings'] ) )
- $defaults['save_settings'] = $options['save_settings'];
-
- //Save general options
- update_option( GCE_GENERAL_OPTIONS_NAME, $defaults );
- }
-
- function init_plugin() {
- //Load text domain for i18n
- load_plugin_textdomain( GCE_TEXT_DOMAIN, false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
- }
-
- //Adds 'Settings' link to main WordPress Plugins page
- function add_settings_link( $links ) {
- array_unshift( $links, '' . __( 'Settings', GCE_TEXT_DOMAIN ) . '' );
- return $links;
- }
-
- //Setup admin settings page
- function setup_admin(){
- global $gce_settings_page;
-
- $gce_settings_page = add_options_page( 'Google Calendar Events', 'Google Calendar Events', 'manage_options', basename( __FILE__ ), array( $this, 'admin_page' ) );
-
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
- }
-
- //Add admin JavaScript (to GCE settings page only)
- function enqueue_admin_scripts( $hook_suffix ) {
- global $gce_settings_page;
-
- if ( $gce_settings_page == $hook_suffix )
- wp_enqueue_script( 'gce_scripts', WP_PLUGIN_URL . '/' . GCE_PLUGIN_NAME . '/js/gce-admin-script.js', array( 'jquery' ) );
- }
-
- //Prints admin settings page
- function admin_page() {
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- update_settings();
-
- //If the message about old transients was displayed, check authority and intention, and then either clear transients or clear flag
- if ( isset( $_GET['gce_action'] ) && current_user_can( 'manage_options' ) ) {
- switch ( $_GET['gce_action'] ) {
- case 'clear_old_transients':
- check_admin_referer( 'gce_action_clear_old_transients' );
- $this->clear_old_transients();
- add_settings_error( 'gce_options', 'gce_cleared_old_transients', __( 'Old cached data cleared.', GCE_TEXT_DOMAIN ), 'updated' );
- break;
- case 'ignore_old_transients':
- check_admin_referer( 'gce_action_ignore_old_transients' );
- delete_option( 'gce_clear_old_transients' );
- }
- }
-
- register_setting( 'gce_options', 'gce_options', array( $this, 'validate_feed_options' ) );
- register_setting( 'gce_general', 'gce_general', array( $this, 'validate_general_options' ) );
-
- require_once 'admin/add.php';
- require_once 'admin/edit.php';
- require_once 'admin/delete.php';
- require_once 'admin/refresh.php';
- }
-
- //Clears any expired transients from the database
- function clear_old_transients() {
- global $wpdb;
-
- //Retrieve names of all transients
- $transients = $wpdb->get_results( "SELECT option_name FROM $wpdb->options WHERE option_name LIKE '%transient%' AND option_name NOT LIKE '%transient_timeout%'" );
-
- if ( ! empty( $transients ) ) {
- foreach ( $transients as $transient ) {
- //Attempt to retrieve the transient. If it has expired, it will be deleted
- get_transient( str_replace( '_transient_', '', $transient->option_name ) );
- }
- }
-
- //Remove the flag
- delete_option( 'gce_clear_old_transients' );
- }
-
- //Register the widget
- function add_widget() {
- require_once 'widget/gce-widget.php';
- return register_widget( 'GCE_Widget' );
- }
-
- //Check / validate submitted feed options data before being stored
- function validate_feed_options( $input ) {
- //Get saved options
- $options = get_option( GCE_OPTIONS_NAME );
-
- if ( isset( $input['submit_delete'] ) ) {
- //If delete button was clicked, delete feed from options array and remove associated transients
- unset( $options[$input['id']] );
- $this->delete_feed_transients( (int) $input['id'] );
- add_settings_error( 'gce_options', 'gce_deleted', __( sprintf('Feed %s deleted.', absint( $input['id'] ) ), GCE_TEXT_DOMAIN ), 'updated' );
- } elseif ( isset($input['submit_refresh'] ) ) {
- //If refresh button was clicked, delete transients associated with feed
- $this->delete_feed_transients( (int) $input['id'] );
- add_settings_error( 'gce_options', 'gce_refreshed', __( sprintf('Cached data for feed %s cleared.', absint( $input['id'] ) ), GCE_TEXT_DOMAIN ), 'updated' );
- } else {
- //Otherwise, validate options and add / update them
-
- //Check id is positive integer
- $id = absint( $input['id'] );
- //Escape title text
- $title = esc_html( $input['title'] );
- //Escape feed url
- $url = esc_url( $input['url'] );
-
- //Array of valid options for retrieve_from and retrieve_until settings
- $valid_retrieve_options = array( 'now', 'today', 'week', 'month-start', 'month-end', 'any', 'date' );
-
- $retrieve_from = 'today';
- $retrieve_from_value = 0;
-
- //Ensure retrieve_from is valid
- if( in_array( $input['retrieve_from'], $valid_retrieve_options ) ) {
- $retrieve_from = $input['retrieve_from'];
- $retrieve_from_value = (int) $input['retrieve_from_value'];
- }
-
- $retrieve_until = 'any';
- $retrieve_until_value = 0;
-
- //Ensure retrieve_until is valid
- if ( in_array( $input['retrieve_until'], $valid_retrieve_options ) ) {
- $retrieve_until = $input['retrieve_until'];
- $retrieve_until_value = (int) $input['retrieve_until_value'];
- }
-
- //Check max events is a positive integer. If absint returns 0, reset to default (25)
- $max_events = ( 0 == absint($input['max_events'] ) ) ? 25 : absint( $input['max_events'] );
-
- $date_format = wp_filter_kses( $input['date_format'] );
- $time_format = wp_filter_kses( $input['time_format'] );
-
- //Escape timezone
- $timezone = esc_html( $input['timezone'] );
-
- //Make sure cache duration is a positive integer or 0. If user has typed 0, leave as 0 but if 0 is returned from absint, set to default (43200)
- $cache_duration = $input['cache_duration'];
- if ( '0' != $cache_duration )
- $cache_duration = ( 0 == absint( $cache_duration ) ) ? 43200 : absint( $cache_duration );
-
- $multiple_day = ( isset( $input['multiple_day'] ) ) ? 'true' : 'false';
-
- $display_start = esc_html( $input['display_start'] );
- $display_end = esc_html( $input['display_end'] );
-
- //Display options must be 'on' or null
- $display_location = ( isset( $input['display_location'] ) ) ? 'on' : null;
- $display_desc = ( isset( $input['display_desc'] ) ) ? 'on' : null;
- $display_link = ( isset( $input['display_link'] ) ) ? 'on' : null;
- $display_link_target = ( isset( $input['display_link_target'] ) ) ? 'on' : null;
-
- //Filter display text
- $display_start_text = wp_filter_kses( $input['display_start_text'] );
- $display_end_text = wp_filter_kses( $input['display_end_text'] );
- $display_location_text = wp_filter_kses( $input['display_location_text'] );
- $display_desc_text = wp_filter_kses( $input['display_desc_text'] );
- $display_link_text = wp_filter_kses( $input['display_link_text'] );
-
- $display_separator = wp_filter_kses( $input['display_separator'] );
-
- $display_desc_limit = ( 0 == absint( $input['display_desc_limit'] ) ) ? '' : absint( $input['display_desc_limit'] );
-
- $use_builder = ( 'false' == $input['use_builder'] ) ? 'false' : 'true';
- $builder = wp_kses_post( $input['builder'] );
-
- //Fill options array with validated values
- $options[$id] = array(
- 'id' => $id,
- 'title' => $title,
- 'url' => $url,
- 'retrieve_from' => $retrieve_from,
- 'retrieve_until' => $retrieve_until,
- 'retrieve_from_value' => $retrieve_from_value,
- 'retrieve_until_value' => $retrieve_until_value,
- 'max_events' => $max_events,
- 'date_format' => $date_format,
- 'time_format' => $time_format,
- 'timezone' => $timezone,
- 'cache_duration' => $cache_duration,
- 'multiple_day' => $multiple_day,
- 'display_start' => $display_start,
- 'display_end' => $display_end,
- 'display_location' => $display_location,
- 'display_desc' => $display_desc,
- 'display_link' => $display_link,
- 'display_start_text' => $display_start_text,
- 'display_end_text' => $display_end_text,
- 'display_location_text' => $display_location_text,
- 'display_desc_text' => $display_desc_text,
- 'display_desc_limit' => $display_desc_limit,
- 'display_link_text' => $display_link_text,
- 'display_link_target' => $display_link_target,
- 'display_separator' => $display_separator,
- 'use_builder' => $use_builder,
- 'builder' => $builder
- );
-
- if ( isset( $input['submit_add'] ) )
- add_settings_error( 'gce_options', 'gce_added', __( sprintf( 'Feed %s added.', absint( $input['id'] ) ), GCE_TEXT_DOMAIN ), 'updated' );
- else
- add_settings_error( 'gce_options', 'gce_edited', __( sprintf( 'Settings for feed %s updated.', absint( $input['id'] ) ), GCE_TEXT_DOMAIN ), 'updated' );
- }
-
- return $options;
- }
-
- //Validate submitted general options
- function validate_general_options( $input ) {
- $options = get_option(GCE_GENERAL_OPTIONS_NAME);
-
- $options['stylesheet'] = esc_url( $input['stylesheet'] );
- $options['javascript'] = ( isset( $input['javascript'] ) ) ? true : false;
- $options['loading'] = esc_html( $input['loading'] );
- $options['error'] = wp_filter_kses( $input['error'] );
- $options['fields'] = ( isset( $input['fields'] ) ) ? true : false;
- $options['old_stylesheet'] = ( isset( $input['old_stylesheet'] ) ) ? true : false;
- $options['save_settings'] = ( isset( $input['save_settings'] ) ) ? true : false;
-
- add_settings_error( 'gce_general', 'gce_general_updated', __( 'General options updated.', GCE_TEXT_DOMAIN ), 'updated' );
-
- return $options;
- }
-
- //Delete all transients (cached feed data) associated with feed specified
- function delete_feed_transients( $id ) {
- delete_transient( 'gce_feed_' . $id );
- delete_transient( 'gce_feed_' . $id . '_url' );
- }
-
- //Handles the shortcode stuff
- function shortcode_handler( $atts ) {
- $options = get_option( GCE_OPTIONS_NAME );
-
- //Check that any feeds have been added
- if ( is_array( $options ) && ! empty( $options ) ) {
- extract( shortcode_atts( array(
- 'id' => '',
- 'type' => 'grid',
- 'title' => null,
- 'max' => 0,
- 'order' => 'asc'
- ), $atts ) );
-
- $no_feeds_exist = true;
- $feed_ids = array();
-
- if ( '' != $id ) {
- //Break comma delimited list of feed ids into array
- $feed_ids = explode( ',', str_replace( ' ', '', $id ) );
-
- //Check each id is an integer, if not, remove it from the array
- foreach ( $feed_ids as $key => $feed_id ) {
- if ( 0 == absint( $feed_id ) )
- unset( $feed_ids[$key] );
- }
-
- //If at least one of the feed ids entered exists, set no_feeds_exist to false
- foreach ( $feed_ids as $feed_id ) {
- if ( isset($options[$feed_id] ) )
- $no_feeds_exist = false;
- }
- } else {
- foreach ( $options as $feed ) {
- $feed_ids[] = $feed['id'];
- }
-
- $no_feeds_exist = false;
- }
-
- //Ensure max events is a positive integer
- $max_events = absint( $max );
-
- //Ensure sort order is asc or desc
- $sort_order = ( 'desc' == $order ) ? 'desc' : 'asc';
-
- //Check that at least one valid feed id has been entered
- if ( empty( $feed_ids ) || $no_feeds_exist ) {
- return __( 'No valid Feed IDs have been entered for this shortcode. Please check that you have entered the IDs correctly and that the Feeds have not been deleted.', GCE_TEXT_DOMAIN );
- } else {
- //Turns feed_ids back into string of feed ids delimited by '-' ('1-2-3-4' for example)
- $feed_ids = implode( '-', $feed_ids );
-
- //If title has been omitted from shortcode, set title_text to null, otherwise set to title (even if empty string)
- $title_text = ( false === $title ) ? null : $title;
-
- switch ( $type ) {
- case 'grid':
- return gce_print_grid( $feed_ids, $title_text, $max_events );
- case 'ajax':
- return gce_print_grid( $feed_ids, $title_text, $max_events, true );
- case 'list':
- return gce_print_list( $feed_ids, $title_text, $max_events, $sort_order );
- case 'list-grouped':
- return gce_print_list( $feed_ids, $title_text, $max_events, $sort_order, true );
- }
- }
- } else {
- return __( 'No feeds have been added yet. You can add a feed in the Google Calendar Events settings.', GCE_TEXT_DOMAIN );
- }
- }
-
- //Adds the required CSS
- function add_styles() {
- wp_enqueue_style( 'gce_styles', WP_PLUGIN_URL . '/' . GCE_PLUGIN_NAME . '/css/gce-style.css' );
-
- $options = get_option( GCE_GENERAL_OPTIONS_NAME );
-
- //If old stylesheet option is enabled, enqueue old styles
- if ( $options['old_stylesheet'] )
- wp_enqueue_style( 'gce_old_styles', WP_PLUGIN_URL . '/' . GCE_PLUGIN_NAME . '/css/gce-old-style.css' );
-
- //If user has entered a URL to a custom stylesheet, enqueue it too
- if( '' != $options['stylesheet'] )
- wp_enqueue_style( 'gce_custom_styles', $options['stylesheet'] );
- }
-
- //Adds the required scripts
- function add_scripts() {
- $options = get_option( GCE_GENERAL_OPTIONS_NAME );
- $add_to_footer = (bool) $options['javascript'];
-
- wp_enqueue_script( 'jquery' );
- wp_enqueue_script( 'gce_jquery_qtip', WP_PLUGIN_URL . '/' . GCE_PLUGIN_NAME . '/js/jquery-qtip.js', array( 'jquery' ), null, $add_to_footer );
- wp_enqueue_script( 'gce_scripts', WP_PLUGIN_URL . '/' . GCE_PLUGIN_NAME . '/js/gce-script.js', array( 'jquery' ), null, $add_to_footer );
- wp_localize_script( 'gce_scripts', 'GoogleCalendarEvents', array(
- 'ajaxurl' => admin_url( 'admin-ajax.php', is_ssl() ? 'https' : 'http' ),
- 'loading' => $options['loading']
- ) );
- }
-
- //AJAX stuffs
- function gce_ajax() {
- if ( isset( $_GET['gce_feed_ids'] ) ) {
- $ids = $_GET['gce_feed_ids'];
- $title = $_GET['gce_title_text'];
- $max = $_GET['gce_max_events'];
- $month = $_GET['gce_month'];
- $year = $_GET['gce_year'];
-
- $title = ( 'null' == $title ) ? null : $title;
-
- if ( 'page' == $_GET['gce_type'] ) {
- //The page grid markup to be returned via AJAX
- echo gce_print_grid( $ids, $title, $max, true, $month, $year );
- } elseif ( 'widget' == $_GET['gce_type'] ) {
- $widget = esc_html( $_GET['gce_widget_id'] );
-
- //The widget grid markup to be returned via AJAX
- gce_widget_content_grid( $ids, $title, $max, $widget, true, $month, $year );
- }
- }
- die();
- }
- }
-}
-
-function gce_print_list( $feed_ids, $title_text, $max_events, $sort_order, $grouped = false ) {
- require_once 'inc/gce-parser.php';
-
- $ids = explode( '-', $feed_ids );
-
- //Create new GCE_Parser object, passing array of feed id(s)
- $list = new GCE_Parser( $ids, $title_text, $max_events, $sort_order );
-
- $num_errors = $list->get_num_errors();
-
- //If there are less errors than feeds parsed, at least one feed must have parsed successfully so continue to display the list
- if ( $num_errors < count( $ids ) ) {
- $markup = '
' . $list->get_list( $grouped ) . '
';
-
- //If there was at least one error, return the list markup with error messages (for admins only)
- if ( $num_errors > 0 && current_user_can( 'manage_options' ) )
- return $list->error_messages() . $markup;
-
- //Otherwise just return the list markup
- return $markup;
- } else {
- //If current user is an admin, display an error message explaining problem(s). Otherwise, display a 'nice' error messsage
- if ( current_user_can( 'manage_options' ) ) {
- return $list->error_messages();
- } else {
- $options = get_option( GCE_GENERAL_OPTIONS_NAME );
- return wp_kses_post( $options['error'] );
- }
- }
-}
-
-function gce_print_grid( $feed_ids, $title_text, $max_events, $ajaxified = false, $month = null, $year = null ) {
- require_once 'inc/gce-parser.php';
-
- $ids = explode( '-', $feed_ids );
-
- //Create new GCE_Parser object, passing array of feed id(s) returned from gce_get_feed_ids()
- $grid = new GCE_Parser( $ids, $title_text, $max_events );
-
- $num_errors = $grid->get_num_errors();
-
- //If there are less errors than feeds parsed, at least one feed must have parsed successfully so continue to display the grid
- if ( $num_errors < count( $ids ) ) {
- $feed_ids = esc_attr( $feed_ids );
- $title_text = isset( $title_text ) ? esc_html( $title_text) : 'null';
-
- $markup = '
';
- }
-
- //Returns array of days with events, with sub-arrays of events for that day
- function get_event_days() {
- $event_days = array();
-
- //Total number of events retrieved
- $count = count( $this->merged_feed_data );
-
- //If maximum events to display is 0 (unlimited) set $max to 1, otherwise use maximum of events specified by user
- $max = ( 0 == $this->max_events_display ) ? 1 : $this->max_events_display;
-
- //Loop through entire array of events, or until maximum number of events to be displayed has been reached
- for ( $i = 0; $i < $count && $max > 0; $i++ ) {
- $event = $this->merged_feed_data[$i];
-
- //Check that event ends, or starts (or both) within the required date range. This prevents all-day events from before / after date range from showing up.
- if ( $event->get_end_time() > $event->get_feed()->get_feed_start() && $event->get_start_time() < $event->get_feed()->get_feed_end() ) {
- foreach ( $event->get_days() as $day ) {
- $event_days[$day][] = $event;
- }
-
- //If maximum events to display isn't 0 (unlimited) decrement $max counter
- if ( 0 != $this->max_events_display )
- $max--;
- }
- }
-
- return $event_days;
- }
-
- //Returns grid markup
- function get_grid ( $year = null, $month = null, $ajaxified = false ) {
- require_once 'php-calendar.php';
-
- $time_now = current_time( 'timestamp' );
-
- //If year and month have not been passed as paramaters, use current month and year
- if( ! isset( $year ) )
- $year = date( 'Y', $time_now );
-
- if( ! isset( $month ) )
- $month = date( 'm', $time_now );
-
- //Get timestamps for the start and end of current month
- $current_month_start = mktime( 0, 0, 0, date( 'm', $time_now ), 1, date( 'Y', $time_now ) );
- $current_month_end = mktime( 0, 0, 0, date( 'm', $time_now ) + 1, 1, date( 'Y', $time_now ) );
-
- //Get timestamps for the start and end of the month to be displayed in the grid
- $display_month_start = mktime( 0, 0, 0, $month, 1, $year );
- $display_month_end = mktime( 0, 0, 0, $month + 1, 1, $year );
-
- //It should always be possible to navigate to the current month, even if it doesn't have any events
- //So, if the display month is before the current month, set $nav_next to true, otherwise false
- //If the display month is after the current month, set $nav_prev to true, otherwise false
- $nav_next = ( $display_month_start < $current_month_start );
- $nav_prev = ( $display_month_start >= $current_month_end );
-
- //Get events data
- $event_days = $this->get_event_days();
-
- //If event_days is empty, then there are no events in the feed(s), so set ajaxified to false (Prevents AJAX calendar from allowing to endlessly click through months with no events)
- if ( empty( $event_days ) )
- $ajaxified = false;
-
- $today = mktime( 0, 0, 0, date( 'm', $time_now ), date( 'd', $time_now ), date( 'Y', $time_now ) );
-
- $i = 1;
-
- foreach ( $event_days as $key => $event_day ) {
- //If event day is in the month and year specified (by $month and $year)
- if ( $key >= $display_month_start && $key < $display_month_end ) {
- //Create array of CSS classes. Add gce-has-events
- $css_classes = array( 'gce-has-events' );
-
- //Create markup for display
- $markup = '
';
-
- //If title option has been set for display, add it
- if ( isset( $this->title ) )
- $markup .= '
';
-
- //Add CSS class for the feed from which this event comes. If there are multiple events from the same feed on the same day, the CSS class will only be added once.
- $css_classes['feed-' . $feed_id] = 'gce-feed-' . $feed_id;
-
- $i++;
- }
-
- $markup .= '
';
-
- //If number of CSS classes is greater than 2 ('gce-has-events' plus one specific feed class) then there must be events from multiple feeds on this day, so add gce-multiple CSS class
- if ( count( $css_classes ) > 2 )
- $css_classes[] = 'gce-multiple';
-
- //If event day is today, add gce-today CSS class, otherwise add past or future class
- if ( $key == $today )
- $css_classes[] = 'gce-today gce-today-has-events';
- elseif ( $key < $today )
- $css_classes[] = 'gce-day-past';
- else
- $css_classes[] = 'gce-day-future';
-
- //Change array entry to array of link href, CSS classes, and markup for use in gce_generate_calendar (below)
- $event_days[$key] = array( null, implode( ' ', $css_classes ), $markup );
- } elseif ( $key < $display_month_start ) {
- //This day is before the display month, so set $nav_prev to true. Remove the day from $event_days, as it's no use for displaying this month
- $nav_prev = true;
- unset( $event_days[$key] );
- } else {
- //This day is after the display month, so set $nav_next to true. Remove the day from $event_days, as it's no use for displaying this month
- $nav_next = true;
- unset( $event_days[$key] );
- }
- }
-
- //Ensures that gce-today CSS class is added even if there are no events for 'today'. A bit messy :(
- if ( ! isset( $event_days[$today] ) )
- $event_days[$today] = array( null, 'gce-today gce-today-no-events', null );
-
- $pn = array();
-
- //Only add previous / next functionality if AJAX grid is enabled
- if ( $ajaxified ) {
- //If there are events to display in a previous month, add previous month link
- $prev_key = ( $nav_prev ) ? '«' : ' ';
- $prev = ( $nav_prev ) ? date( 'm-Y', mktime( 0, 0, 0, $month - 1, 1, $year ) ) : null;
-
- //If there are events to display in a future month, add next month link
- $next_key = ( $nav_next ) ? '»' : ' ';
- $next = ( $nav_next ) ? date( 'm-Y', mktime( 0, 0, 0, $month + 1, 1, $year ) ) : null;
-
- //Array of previous and next link stuff for use in gce_generate_calendar (below)
- $pn = array( $prev_key => $prev, $next_key => $next );
- }
-
- //Generate the calendar markup and return it
- return gce_generate_calendar( $year, $month, $event_days, 1, null, $this->start_of_week, $pn );
- }
-
- function get_list( $grouped = false ) {
- $time_now = current_time( 'timestamp' );
-
- $event_days = $this->get_event_days();
-
- //If event_days is empty, there are no events in the feed(s), so return a message indicating this
- if( empty( $event_days) )
- return '
' . __( 'There are currently no events to display.', GCE_TEXT_DOMAIN ) . '
';
-
- foreach ( $event_days as $key => $event_day ) {
- //If this is a grouped list, add the date title and begin the nested list for this day
- if ( $grouped ) {
- $markup .=
- '
';
+
+ //Add CSS class for the feed from which this event comes. If there are multiple events from the same feed on the same day, the CSS class will only be added once.
+ $css_classes['feed-' . $feed_id] = 'gce-feed-' . $feed_id;
+
+ $i++;
+ }
+
+ $markup .= '
';
+
+ //If number of CSS classes is greater than 2 ('gce-has-events' plus one specific feed class) then there must be events from multiple feeds on this day, so add gce-multiple CSS class
+ if ( count( $css_classes ) > 2 )
+ $css_classes[] = 'gce-multiple';
+
+ //If event day is today, add gce-today CSS class, otherwise add past or future class
+ if ( $key == $today ) {
+ $css_classes[] = 'gce-today gce-today-has-events';
+ } elseif ( $key < $today ) {
+ $css_classes[] = 'gce-day-past';
+ } else {
+ $css_classes[] = 'gce-day-future';
+ }
+
+ //Change array entry to array of link href, CSS classes, and markup for use in gce_generate_calendar (below)
+ $event_days[$key] = array( null, implode( ' ', $css_classes ), $markup );
+ } elseif ( $key < $display_month_start ) {
+ //This day is before the display month, so set $nav_prev to true. Remove the day from $event_days, as it's no use for displaying this month
+ $nav_prev = true;
+ unset( $event_days[$key] );
+ } else {
+ //This day is after the display month, so set $nav_next to true. Remove the day from $event_days, as it's no use for displaying this month
+ $nav_next = true;
+ unset( $event_days[$key] );
+ }
+ }
+
+ //Ensures that gce-today CSS class is added even if there are no events for 'today'. A bit messy :(
+ if ( ! isset( $event_days[$today] ) )
+ $event_days[$today] = array( null, 'gce-today gce-today-no-events', null );
+
+ $pn = array();
+
+ // Add previous / next functionality
+ //If there are events to display in a previous month, add previous month link
+ $prev_key = ( $nav_prev ) ? '«' : ' ';
+ $prev = ( $nav_prev ) ? date( 'm-Y', mktime( 0, 0, 0, $month - 1, 1, $year ) ) : null;
+
+ //If there are events to display in a future month, add next month link
+ $next_key = ( $nav_next ) ? '»' : ' ';
+ $next = ( $nav_next ) ? date( 'm-Y', mktime( 0, 0, 0, $month + 1, 1, $year ) ) : null;
+
+ //Array of previous and next link stuff for use in gce_generate_calendar (below)
+ $pn = array( $prev_key => $prev, $next_key => $next );
+
+
+ $start_day = get_option( 'start_of_week' );
+
+ //Generate the calendar markup and return it
+ return gce_generate_calendar( $year, $month, $event_days, 1, null, $start_day, $pn, $widget );
+ }
+
+ /**
+ * Return the markup for the 'List' display
+ *
+ * @since 2.0.0
+ */
+ public function get_list( $grouped = false ) {
+ $time_now = current_time( 'timestamp' );
+
+ // Get all the event days
+ $event_days = $this->get_event_days();
+
+ //If event_days is empty, there are no events in the feed(s), so return a message indicating this
+ if( empty( $event_days) ) {
+ return '
' . __( 'There are currently no events to display.', 'gce' ) . '
';
+
+ foreach ( $event_days as $key => $event_day ) {
+ //If this is a grouped list, add the date title and begin the nested list for this day
+ if ( $grouped ) {
+ $markup .=
+ '
';
+
+ $i++;
+ }
+
+ //If this is a grouped list, close the nested list for this day
+ if ( $grouped ) {
+ $markup .= '
';
+ }
+ }
+
+ $markup .= '
';
+
+ return $markup;
+ }
+}
diff --git a/wp-content/plugins/google-calendar-events/inc/gce-event.php b/wp-content/plugins/google-calendar-events/includes/class-gce-event.php
similarity index 74%
rename from wp-content/plugins/google-calendar-events/inc/gce-event.php
rename to wp-content/plugins/google-calendar-events/includes/class-gce-event.php
index e0765b5..2352e35 100644
--- a/wp-content/plugins/google-calendar-events/inc/gce-event.php
+++ b/wp-content/plugins/google-calendar-events/includes/class-gce-event.php
@@ -1,527 +1,541 @@
-id = $id;
- $this->title = $title;
- $this->description = $description;
- $this->location = $location;
- $this->start_time = $start_time;
- $this->end_time = $end_time;
- $this->link = $link;
-
- //Calculate which day type this event is (SWD = single whole day, SPD = single part day, MWD = multiple whole day, MPD = multiple part day)
- if ( ( $start_time + 86400 ) <= $end_time ) {
- if ( ( $start_time + 86400 ) == $end_time ) {
- $this->day_type = 'SWD';
- } else {
- if ( ( '12:00 am' == date( 'g:i a', $start_time ) ) && ( '12:00 am' == date( 'g:i a', $end_time ) ) ) {
- $this->day_type = 'MWD';
- } else {
- $this->day_type = 'MPD';
- }
- }
- } else {
- $this->day_type = 'SPD';
- }
- }
-
- function set_feed( $feed ) {
- $this->feed = $feed;
- }
-
- function get_feed() {
- return $this->feed;
- }
-
- function get_start_time() {
- return $this->start_time;
- }
-
- function get_end_time() {
- return $this->end_time;
- }
-
- function get_day_type() {
- return $this->day_type;
- }
-
- //Returns an array of days (as UNIX timestamps) that this events spans
- function get_days() {
- //Round start date to nearest day
- $start_time = mktime( 0, 0, 0, date( 'm', $this->start_time ), date( 'd', $this->start_time ) , date( 'Y', $this->start_time ) );
-
- $days = array();
-
- //If multiple day events should be handled, and this event is a multi-day event, add multiple day event to required days
- if ( $this->feed->get_multi_day() && ( 'MPD' == $this->day_type || 'MWD' == $this->day_type ) ) {
- $on_next_day = true;
- $next_day = $start_time;
-
- while ( $on_next_day ) {
- //If the end time of the event is after 00:00 on the next day (therefore, not doesn't end on this day)
- if ( $this->end_time > $next_day ) {
- //If $next_day is within the event retrieval date range (specified by retrieve events from / until settings)
- if ( $next_day >= $this->feed->get_feed_start() && $next_day < $this->feed->get_feed_end() ) {
- $days[] = $next_day;
- }
- } else {
- $on_next_day = false;
- }
- $next_day += 86400;
- }
- } else {
- //Add event into array of events for that day
- $days[] = $start_time;
- }
-
- return $days;
- }
-
- //Returns the markup for this event, so that it can be used in the construction of a grid / list
- function get_event_markup( $display_type, $num_in_day, $num ) {
- //Set the display type (either tooltip or list)
- $this->type = $display_type;
-
- //Set which number event this is in day (first in day etc)
- $this->num_in_day = $num_in_day;
-
- //Set the position of this event in array of events currently being processed
- $this->pos = $num;
-
- $this->time_now = current_time( 'timestamp' );
-
- //Use the builder or the old display options to create the markup, depending on user choice
- if ( $this->feed->get_use_builder() )
- return $this->use_builder();
-
- return $this->use_old_display_options();
- }
-
- //Return the event markup using the builder
- function use_builder() {
- //Array of valid shortcodes
- $shortcodes = array(
- //Event / feed information shortcodes
-
- 'event-title', //The event title
- 'start-time', //The start time of the event (uses the time format from the feed options, if it is set. Otherwise uses the default WordPress time format)
- 'start-date', //The start date of the event (uses the date format from the feed options, if it is set. Otherwise uses the default WordPress date format)
- 'start-custom', //The start time / date of the event (uses a custom PHP date format, specified in the 'format' attribute)
- 'start-human', //The difference between the start time of the event and the time now, in human-readable format, such as '1 hour', '4 days', '15 mins'
- 'end-time', //The end time of the event (uses the time format from the feed options, if it is set. Otherwise uses the default WordPress time format)
- 'end-date', //The end date of the event (uses the date format from the feed options, if it is set. Otherwise uses the default WordPress date format)
- 'end-custom', //The end time / date of the event (uses a custom PHP date format, specified in the 'format' attribute)
- 'end-human', //The difference between the end time of the event and the time now, in human-readable format, such as '1 hour', '4 days', '15 mins'
- 'location', //The event location
- 'description', //The event deescription (number of words can be limited by the 'limit' attribute)
- 'link', //Anything within this shortcode (including further shortcodes) will be linked to the Google Calendar page for this event
- 'url', //The raw link URL to the Google Calendar page for this event (can be used to construct more customized links)
- 'feed-id', //The ID of this feed (Can be useful for constructing feed specific CSS classes)
- 'feed-title', //The feed title
- 'maps-link', //Anything within this shortcode (including further shortcodes) will be linked to a Google Maps page based on whatever is specified for the event location
- 'length', //How long the events lasts, in human-readable format
- 'event-num', //The position of the event in the current list, or the position of the event in the current month (for grids)
- 'event-id', //The event UID (unique identifier assigned by Google)
- 'cal-id', //The calendar ID
-
- //Anything between the opening and closing tags of the following logical shortcodes (including further shortcodes) will only be displayed if:
-
- 'if-all-day', //This is an all-day event
- 'if-not-all-day', //This is not an all-day event
- 'if-title', //The event has a title
- 'if-description', //The event has a description
- 'if-location', //The event has a location
- 'if-tooltip', //The current display type is 'tooltip'
- 'if-list', //The current display type is 'list'
- 'if-now', //The event is taking place now (after the start time, but before the end time)
- 'if-not-now', //The event is not taking place now (may have ended or not yet started)
- 'if-started', //The event has started (and even if it has ended)
- 'if-not-started', //The event has not yet started
- 'if-ended', //The event has ended
- 'if-not-ended', //The event has not ended (and even if it hasn't started)
- 'if-first', //The event is the first in the day
- 'if-not-first', //The event is not the first in the day
- 'if-multi-day', //The event spans multiple days
- 'if-single-day' //The event does not span multiple days
- );
-
- $this->regex = '/(.?)\[(' . implode( '|', $shortcodes ) . ')\b(.*?)(?:(\/))?\](?:(.+?)\[\/\2\])?(.?)/s';
-
- return $this->look_for_shortcodes( $this->feed->get_builder() );
- }
-
- //Look through the EDB markup for shortcodes
- function look_for_shortcodes( $markup ) {
- return preg_replace_callback( $this->regex, array( $this, 'process_shortcode' ), $markup );
- }
-
- //Parse a shortcode, returning the appropriate event information
- //Much of this code is 'borrowed' from WordPress' own shortcode handling stuff!
- function process_shortcode( $m ) {
- if ( '[' == $m[1] && ']' == $m[6] )
- return substr( $m[0], 1, -1 );
-
- //Extract any attributes contained in the shortcode
- extract( shortcode_atts( array(
- 'newwindow' => 'false',
- 'format' => '',
- 'limit' => '0',
- 'html' => 'false',
- 'markdown' => 'false',
- 'precision' => '1',
- 'offset' => '0',
- 'autolink' => 'true'
- ), shortcode_parse_atts( $m[3] ) ) );
-
- //Sanitize the attributes
- $newwindow = ( 'true' === $newwindow );
- $format = esc_attr( $format );
- $limit = absint( $limit );
- $html = ( 'true' === $html );
- $markdown = ( 'true' === $markdown );
- $precision = absint( $precision );
- $offset = intval( $offset );
- $autolink = ( 'true' === $autolink );
-
- //Do the appropriate stuff depending on which shortcode we're looking at. See valid shortcode list (above) for explanation of each shortcode
- switch ( $m[2] ) {
- case 'event-title':
- $title = esc_html( trim( $this->title ) );
-
- if ( $markdown && function_exists( 'Markdown' ) )
- $title = Markdown( $title );
-
- if ( $html )
- $title = wp_kses_post( html_entity_decode( $title ) );
-
- return $m[1] . $title . $m[6];
-
- case 'start-time':
- return $m[1] . date_i18n( $this->feed->get_time_format(), $this->start_time + $offset ) . $m[6];
-
- case 'start-date':
- return $m[1] . date_i18n( $this->feed->get_date_format(), $this->start_time + $offset ) . $m[6];
-
- case 'start-custom':
- return $m[1] . date_i18n( $format, $this->start_time + $offset ) . $m[6];
-
- case 'start-human':
- return $m[1] . $this->gce_human_time_diff( $this->start_time + $offset, $this->time_now, $precision ) . $m[6];
-
- case 'end-time':
- return $m[1] . date_i18n( $this->feed->get_time_format(), $this->end_time + $offset ) . $m[6];
-
- case 'end-date':
- return $m[1] . date_i18n( $this->feed->get_date_format(), $this->end_time + $offset ) . $m[6];
-
- case 'end-custom':
- return $m[1] . date_i18n( $format, $this->end_time + $offset ) . $m[6];
-
- case 'end-human':
- return $m[1] . $this->gce_human_time_diff( $this->end_time + $offset, $this->time_now, $precision ) . $m[6];
-
- case 'location':
- $location = esc_html( trim( $this->location ) );
-
- if ( $markdown && function_exists( 'Markdown' ) )
- $location = Markdown( $location );
-
- if ( $html )
- $location = wp_kses_post( html_entity_decode( $location ) );
-
- return $m[1] . $location . $m[6];
-
- case 'description':
- $description = esc_html( trim( $this->description ) );
-
- //If a word limit has been set, trim the description to the required length
- if ( 0 != $limit ) {
- preg_match( '/([\S]+\s*){0,' . $limit . '}/', esc_html( $this->description ), $description );
- $description = trim( $description[0] );
- }
-
- if ( $markdown || $html ) {
- if ( $markdown && function_exists( 'Markdown' ) )
- $description = Markdown( $description );
-
- if ( $html )
- $description = wp_kses_post( html_entity_decode( $description ) );
- }else{
- //Otherwise, preserve line breaks
- $description = nl2br( $description );
-
- //Make URLs clickable if required
- if ( $autolink )
- $description = make_clickable( $description );
- }
-
- return $m[1] . $description . $m[6];
-
- case 'link':
- $new_window = ( $newwindow ) ? ' target="_blank"' : '';
- return $m[1] . '' . $this->look_for_shortcodes( $m[5] ) . '' . $m[6];
-
- case 'url':
- return $m[1] . esc_url( $this->link . '&ctz=' . $this->feed->get_timezone() ) . $m[6];
-
- case 'feed-id':
- return $m[1] . intval( $this->feed->get_feed_id() ) . $m[6];
-
- case 'feed-title':
- return $m[1] . esc_html( $this->feed->get_feed_title() ) . $m[6];
-
- case 'maps-link':
- $new_window = ( $newwindow ) ? ' target="_blank"' : '';
- return $m[1] . '' . $this->look_for_shortcodes( $m[5] ) . '' . $m[6];
-
- case 'length':
- return $m[1] . $this->gce_human_time_diff( $this->start_time, $this->end_time, $precision ) . $m[6];
-
- case 'event-num':
- return $m[1] . intval( $this->pos ) . $m[6];
-
- case 'event-id':
- return $m[1] . esc_html( $this->id ) . $m[6];
-
- case 'cal-id':
- $cal_id = explode( '/', $this->feed->get_feed_url() );
- return $m[1] . esc_html( $cal_id[5] ) . $m[6];
-
- case 'if-all-day':
- if ( 'SWD' == $this->day_type || 'MWD' == $this->day_type )
- return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
-
- return '';
-
- case 'if-not-all-day':
- if ( 'SPD' == $this->day_type || 'MPD' == $this->day_type )
- return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
-
- return '';
-
- case 'if-title':
- if ( '' != $this->title )
- return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
-
- return '';
-
- case 'if-description':
- if ( '' != $this->description )
- return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
-
- return '';
-
- case 'if-location':
- if ( '' != $this->location )
- return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
-
- return '';
-
- case 'if-tooltip':
- if ( 'tooltip' == $this->type )
- return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
-
- return '';
-
- case 'if-list':
- if ( 'list' == $this->type )
- return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
-
- return '';
-
- case 'if-now':
- if ( $this->time_now >= $this->start_time && $this->time_now < $this->end_time )
- return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
-
- return '';
-
- case 'if-not-now':
- if ( $this->end_time < $this->time_now || $this->start_time > $this->time_now )
- return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
-
- return '';
-
- case 'if-started':
- if ( $this->start_time < $this->time_now )
- return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
-
- return '';
-
- case 'if-not-started':
- if ( $this->start_time > $this->time_now )
- return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
-
- return '';
-
- case 'if-ended':
- if ( $this->end_time < $this->time_now )
- return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
-
- return '';
-
- case 'if-not-ended':
- if ( $this->end_time > $this->time_now )
- return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
-
- return '';
-
- case 'if-first':
- if ( 0 == $this->num_in_day )
- return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
-
- return '';
-
- case 'if-not-first':
- if ( 0 != $this->num_in_day )
- return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
-
- return '';
-
- case 'if-multi-day':
- if ( 'MPD' == $this->day_type || 'MWD' == $this->day_type )
- return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
-
- return '';
-
- case 'if-single-day':
- if ( 'SPD' == $this->day_type || 'SWD' == $this->day_type )
- return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
-
- return '';
- }
- }
-
- //Return the event markup using the old display options
- function use_old_display_options() {
- $display_options = $this->feed->get_display_options();
-
- $markup = '
' . esc_html( $this->title ) . '
';
-
- $start_end = array();
-
- //If start date / time should be displayed, set up array of start date and time
- if ( 'none' != $display_options['display_start'] ) {
- $sd = $this->start_time;
- $start_end['start'] = array(
- 'time' => date_i18n( $this->feed->get_time_format(), $sd ),
- 'date' => date_i18n( $this->feed->get_date_format(), $sd )
- );
- }
-
- //If end date / time should be displayed, set up array of end date and time
- if ( 'none' != $display_options['display_end'] ) {
- $ed = $this->end_time;
- $start_end['end'] = array(
- 'time' => date_i18n( $this->feed->get_time_format(), $ed ),
- 'date' => date_i18n( $this->feed->get_date_format(), $ed )
- );
- }
-
- //Add the correct start / end, date / time information to $markup
- foreach ( $start_end as $start_or_end => $info ) {
- $markup .= '
';
-
- return $markup;
- }
-
- //Returns the difference between two times in human-readable format. Based on a patch for human_time_diff posted in the WordPress trac (http://core.trac.wordpress.org/ticket/9272) by Viper007Bond
- function gce_human_time_diff( $from, $to = '', $limit = 1 ) {
- $units = array(
- 31556926 => array( __( '%s year', GCE_TEXT_DOMAIN ), __( '%s years', GCE_TEXT_DOMAIN ) ),
- 2629744 => array( __( '%s month', GCE_TEXT_DOMAIN ), __( '%s months', GCE_TEXT_DOMAIN ) ),
- 604800 => array( __( '%s week', GCE_TEXT_DOMAIN ), __( '%s weeks', GCE_TEXT_DOMAIN ) ),
- 86400 => array( __( '%s day', GCE_TEXT_DOMAIN ), __( '%s days', GCE_TEXT_DOMAIN ) ),
- 3600 => array( __( '%s hour', GCE_TEXT_DOMAIN ), __( '%s hours', GCE_TEXT_DOMAIN ) ),
- 60 => array( __( '%s min', GCE_TEXT_DOMAIN ), __( '%s mins', GCE_TEXT_DOMAIN ) ),
- );
-
- if ( empty( $to ) )
- $to = time();
-
- $from = (int) $from;
- $to = (int) $to;
- $diff = (int) abs( $to - $from );
-
- $items = 0;
- $output = array();
-
- foreach ( $units as $unitsec => $unitnames ) {
- if ( $items >= $limit )
- break;
-
- if ( $diff < $unitsec )
- continue;
-
- $numthisunits = floor( $diff / $unitsec );
- $diff = $diff - ( $numthisunits * $unitsec );
- $items++;
-
- if ( $numthisunits > 0 )
- $output[] = sprintf( _n( $unitnames[0], $unitnames[1], $numthisunits ), $numthisunits );
- }
-
- $seperator = _x( ', ', 'human_time_diff' );
-
- if ( ! empty( $output ) ) {
- return implode( $seperator, $output );
- } else {
- $smallest = array_pop( $units );
- return sprintf( $smallest[0], 1 );
- }
- }
-}
-?>
\ No newline at end of file
+, Nick Young
+ * @license GPL-2.0+
+ * @copyright 2014 Phil Derksen
+ */
+
+class GCE_Event {
+
+ public $feed;
+
+ /**
+ * Class constructor
+ *
+ * @since 2.0.0
+ */
+ function __construct( GCE_Feed $feed, $id, $title, $description, $location, $start_time, $end_time, $link ) {
+
+ $this->feed = $feed;
+ $this->id = $id;
+ $this->title = $title;
+ $this->description = $description;
+ $this->location = $location;
+ $this->start_time = $start_time;
+ $this->end_time = $end_time;
+ $this->link = $link;
+
+ //Calculate which day type this event is (SWD = single whole day, SPD = single part day, MWD = multiple whole day, MPD = multiple part day)
+ if ( ( $start_time + 86400 ) <= $end_time ) {
+ if ( ( $start_time + 86400 ) == $end_time ) {
+ $this->day_type = 'SWD';
+ } else {
+ if ( ( '12:00 am' == date( 'g:i a', $start_time ) ) && ( '12:00 am' == date( 'g:i a', $end_time ) ) ) {
+ $this->day_type = 'MWD';
+ } else {
+ $this->day_type = 'MPD';
+ }
+ }
+ } else {
+ $this->day_type = 'SPD';
+ }
+ }
+
+ /**
+ * Returns an array of days (as UNIX timestamps) that this events spans
+ *
+ * @since 2.0.0
+ */
+ function get_days() {
+ //Round start date to nearest day
+ $start_time = mktime( 0, 0, 0, date( 'm', $this->start_time ), date( 'd', $this->start_time ) , date( 'Y', $this->start_time ) );
+
+ $days = array();
+
+ //If multiple day events should be handled, and this event is a multi-day event, add multiple day event to required days
+ if ( $this->feed->multiple_day_events && ( 'MPD' == $this->day_type || 'MWD' == $this->day_type ) ) {
+ $on_next_day = true;
+ $next_day = $start_time;
+
+ while ( $on_next_day ) {
+ //If the end time of the event is after 00:00 on the next day (therefore, not doesn't end on this day)
+ if ( $this->end_time > $next_day ) {
+ //If $next_day is within the event retrieval date range (specified by retrieve events from / until settings)
+ if ( $next_day >= $this->feed->start && $next_day < $this->feed->end ) {
+ $days[] = $next_day;
+ }
+ } else {
+ $on_next_day = false;
+ }
+ $next_day += 86400;
+ }
+ } else {
+ //Add event into array of events for that day
+ $days[] = $start_time;
+ }
+
+ return $days;
+ }
+
+ /**
+ * Returns the markup for this event, so that it can be used in the construction of a grid / list
+ *
+ * @since 2.0.0
+ */
+ function get_event_markup( $display_type, $num_in_day, $num ) {
+
+
+
+
+ //Set the display type (either tooltip or list)
+ $this->type = $display_type;
+
+ //Set which number event this is in day (first in day etc)
+ $this->num_in_day = $num_in_day;
+
+ //Set the position of this event in array of events currently being processed
+ $this->pos = $num;
+
+ $this->time_now = current_time( 'timestamp' );
+
+ // First check if we use the builder or not
+ $use_simple = get_post_meta( $this->feed->id, 'gce_display_simple', true );
+
+ if( empty( $use_simple ) ) {
+ return $this->use_builder();
+ }
+
+ // Setup the markup to return
+ //$display_options = get_option( 'gce_settings_general' );
+
+ $display_options['display_start'] = get_post_meta( $this->feed->id, 'gce_display_start', true );
+ $display_options['display_start_text'] = get_post_meta( $this->feed->id, 'gce_display_start_text', true );
+ $display_options['display_end'] = get_post_meta( $this->feed->id, 'gce_display_end', true );
+ $display_options['display_end_text'] = get_post_meta( $this->feed->id, 'gce_display_end_text', true );
+ $display_options['display_location'] = get_post_meta( $this->feed->id, 'gce_display_location', true );
+ $display_options['display_location_text'] = get_post_meta( $this->feed->id, 'gce_display_location_text', true );
+ $display_options['display_desc'] = get_post_meta( $this->feed->id, 'gce_display_description', true );
+ $display_options['display_desc_text'] = get_post_meta( $this->feed->id, 'gce_display_description_text', true );
+ $display_options['display_desc_limit'] = get_post_meta( $this->feed->id, 'gce_display_description_max', true );
+ $display_options['display_link'] = get_post_meta( $this->feed->id, 'gce_display_link', true );
+ $display_options['display_link_text'] = get_post_meta( $this->feed->id, 'gce_display_link_text', true );
+ $display_options['display_separator'] = get_post_meta( $this->feed->id, 'gce_display_separator', true );
+ $display_options['display_link_target'] = get_post_meta( $this->feed->id, 'gce_display_link_tab', true );
+
+ $markup = '
' . esc_html( $this->title ) . '
';
+
+ $start_end = array();
+
+ //If start date / time should be displayed, set up array of start date and time
+ if ( ! empty( $display_options['display_start'] ) && 'none' != $display_options['display_start'] ) {
+ $sd = $this->start_time;
+ $start_end['start'] = array(
+ 'time' => date_i18n( $this->feed->time_format, $sd ),
+ 'date' => date_i18n( $this->feed->date_format, $sd )
+ );
+ }
+
+ //If end date / time should be displayed, set up array of end date and time
+ if ( ! empty( $display_options['display_end'] ) && 'none' != $display_options['display_end'] ) {
+ $ed = $this->end_time;
+ $start_end['end'] = array(
+ 'time' => date_i18n( $this->feed->time_format, $ed ),
+ 'date' => date_i18n( $this->feed->date_format, $ed )
+ );
+ }
+
+ //Add the correct start / end, date / time information to $markup
+ foreach ( $start_end as $start_or_end => $info ) {
+ $markup .= '
";
-
- if ( $day_name_length ) { #if the day names should be shown ($day_name_length > 0)
- #if day_name_length is >3, the full name of the day will be printed
- foreach ( $day_names as $d ) {
- $calendar .= '
";
+
+ if ( $day_name_length ) { #if the day names should be shown ($day_name_length > 0)
+ #if day_name_length is >3, the full name of the day will be printed
+ foreach ( $day_names as $d ) {
+ $calendar .= '