Version Description
Download this release
Release Info
Developer | jbutkus |
Plugin | All-in-One Event Calendar |
Version | 2.3.1 |
Comparing to | |
See all releases |
Code changes from version 2.3.0 to 2.3.1
- all-in-one-event-calendar.php +1 -1
- app/config/constants.php +1 -1
- app/controller/export.php +0 -193
- assets/icon-128x128.png +0 -0
- assets/icon-256x256.png +0 -0
- language/all-in-one-event-calendar.mo +0 -0
- language/all-in-one-event-calendar.po +5 -5
- language/all-in-one-event-calendar.pot +4 -4
- lib/calendar-feed/ics.php +1 -1
- lib/edd/updater.php +0 -91
- readme.txt +6 -1
- vendor/edd/EDD_SL_Plugin_Updater.php +0 -161
all-in-one-event-calendar.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: A calendar system with month, week, day, agenda views, upcoming events widget, color-coded categories, recurrence, and import/export of .ics feeds.
|
6 |
* Author: Time.ly Network Inc.
|
7 |
* Author URI: http://time.ly/
|
8 |
-
* Version: 2.3.
|
9 |
* Text Domain: all-in-one-event-calendar
|
10 |
* Domain Path: /language
|
11 |
*/
|
5 |
* Description: A calendar system with month, week, day, agenda views, upcoming events widget, color-coded categories, recurrence, and import/export of .ics feeds.
|
6 |
* Author: Time.ly Network Inc.
|
7 |
* Author URI: http://time.ly/
|
8 |
+
* Version: 2.3.1
|
9 |
* Text Domain: all-in-one-event-calendar
|
10 |
* Domain Path: /language
|
11 |
*/
|
app/config/constants.php
CHANGED
@@ -50,7 +50,7 @@ function ai1ec_initiate_constants( $ai1ec_base_dir, $ai1ec_base_url ) {
|
|
50 |
// = Plugin Version =
|
51 |
// ==================
|
52 |
if ( ! defined( 'AI1EC_VERSION' ) ) {
|
53 |
-
define( 'AI1EC_VERSION', '2.3.
|
54 |
}
|
55 |
|
56 |
// ================
|
50 |
// = Plugin Version =
|
51 |
// ==================
|
52 |
if ( ! defined( 'AI1EC_VERSION' ) ) {
|
53 |
+
define( 'AI1EC_VERSION', '2.3.1' );
|
54 |
}
|
55 |
|
56 |
// ================
|
app/controller/export.php
DELETED
@@ -1,193 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Ai1ec_Export_Controller extends Ai1ec_Base {
|
4 |
-
|
5 |
-
/**
|
6 |
-
* export_location function
|
7 |
-
*
|
8 |
-
* @param array $data
|
9 |
-
* @param bool $update
|
10 |
-
*
|
11 |
-
* @return void
|
12 |
-
**/
|
13 |
-
public function export_location( $data, $update = false ) {
|
14 |
-
// if there is no data to send, return
|
15 |
-
if (
|
16 |
-
empty( $data['venue'] ) &&
|
17 |
-
empty( $data['country'] ) &&
|
18 |
-
empty( $data['address'] ) &&
|
19 |
-
empty( $data['city'] ) &&
|
20 |
-
empty( $data['province'] ) &&
|
21 |
-
empty( $data['postal_code'] ) &&
|
22 |
-
empty( $data['latitude'] ) &&
|
23 |
-
empty( $data['longitude'] )
|
24 |
-
) {
|
25 |
-
return;
|
26 |
-
}
|
27 |
-
|
28 |
-
// For this remote call we need to remove cUrl, because the minimum timeout
|
29 |
-
// of cUrl is 1 second. This causes Facebook import to fail when importing
|
30 |
-
// many events (even from just a few friends). A timeout greater than 0.05s
|
31 |
-
// will be a great hindrance to performance.
|
32 |
-
add_filter( 'use_curl_transport', array( $this, 'remove_curl' ) );
|
33 |
-
|
34 |
-
// Send data using post to locations API.
|
35 |
-
wp_remote_post( AI1EC_LOCATIONS_API,
|
36 |
-
array(
|
37 |
-
'body' => array(
|
38 |
-
'venue' => $data['venue'],
|
39 |
-
'country' => $data['country'],
|
40 |
-
'address' => $data['address'],
|
41 |
-
'city' => $data['city'],
|
42 |
-
'province' => $data['province'],
|
43 |
-
'postal_code' => $data['postal_code'],
|
44 |
-
'latitude' => $data['latitude'],
|
45 |
-
'longitude' => $data['longitude'],
|
46 |
-
'update' => $update,
|
47 |
-
),
|
48 |
-
'timeout' => 0.01,
|
49 |
-
'blocking' => false,
|
50 |
-
)
|
51 |
-
);
|
52 |
-
|
53 |
-
// Revert cUrl setting to what it was.
|
54 |
-
remove_filter( 'use_curl_transport', array( $this, 'remove_curl' ) );
|
55 |
-
}
|
56 |
-
|
57 |
-
/**
|
58 |
-
* Simple function that returns false, intended for the use_curl_transport
|
59 |
-
* filter to disable the use of cUrl.
|
60 |
-
*
|
61 |
-
* @return boolean
|
62 |
-
*/
|
63 |
-
public function remove_curl() {
|
64 |
-
return false;
|
65 |
-
}
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Statistics collection cron.
|
69 |
-
*
|
70 |
-
* @return void
|
71 |
-
*/
|
72 |
-
public function n_cron() {
|
73 |
-
$xguard = $this->_registry->get( 'compatibility.xguard' );
|
74 |
-
$guard_name = 'n_cron';
|
75 |
-
|
76 |
-
// Acquire Cron
|
77 |
-
if ( ! $xguard->acquire( $guard_name ) ) {
|
78 |
-
return null;
|
79 |
-
}
|
80 |
-
$dbi = $this->_registry->get( 'dbi.dbi' );
|
81 |
-
$ai1ec_settings = $this->_registry->get( 'model.settings' );
|
82 |
-
|
83 |
-
$query = 'SELECT COUNT( ID ) as num_events
|
84 |
-
FROM ' . $dbi->get_table_name( 'posts' ) . '
|
85 |
-
WHERE post_type = \'' . AI1EC_POST_TYPE . '\'
|
86 |
-
AND post_status = \'publish\'';
|
87 |
-
$n_events = $dbi->get_var( $query );
|
88 |
-
|
89 |
-
$query = 'SELECT COUNT( ID ) FROM ' . $dbi->get_table_name( 'users' );
|
90 |
-
$n_users = $dbi->get_var( $query );
|
91 |
-
|
92 |
-
$categories = $tags = array();
|
93 |
-
$term_list = get_terms(
|
94 |
-
'events_categories',
|
95 |
-
array( 'hide_empty' => false )
|
96 |
-
);
|
97 |
-
foreach ( $term_list as $term ) {
|
98 |
-
if ( isset( $term->name ) ) {
|
99 |
-
$categories[] = $term->name;
|
100 |
-
}
|
101 |
-
}
|
102 |
-
$term_list = get_terms(
|
103 |
-
'events_tags',
|
104 |
-
array( 'hide_empty' => false )
|
105 |
-
);
|
106 |
-
foreach ( $term_list as $term ) {
|
107 |
-
if ( isset( $term->name ) ) {
|
108 |
-
$tags[] = $term->name;
|
109 |
-
}
|
110 |
-
}
|
111 |
-
$fs_method = 'UNKNOWN';
|
112 |
-
global $wp_filesystem;
|
113 |
-
if ( is_object( $wp_filesystem ) && isset( $wp_filesystem->method ) ) {
|
114 |
-
$fs_method = $wp_filesystem->method;
|
115 |
-
}
|
116 |
-
$options = $this->_registry->get( 'model.option' );
|
117 |
-
$data = array(
|
118 |
-
'n_users' => $n_users,
|
119 |
-
'n_events' => $n_events,
|
120 |
-
'categories' => $categories,
|
121 |
-
'tags' => $tags,
|
122 |
-
'blog_name' => get_bloginfo( 'name' ),
|
123 |
-
'cal_url' => get_permalink(
|
124 |
-
$ai1ec_settings->get( 'calendar_page_id' )
|
125 |
-
),
|
126 |
-
'ics_url' => AI1EC_EXPORT_URL,
|
127 |
-
'php_version' => phpversion(),
|
128 |
-
'mysql_version' => $this->_registry->get( 'dbi.dbi' )
|
129 |
-
->db_version(),
|
130 |
-
'wp_version' => get_bloginfo( 'version' ),
|
131 |
-
'wp_lang' => get_bloginfo( 'language' ),
|
132 |
-
'wp_url' => home_url(),
|
133 |
-
'timezone' => $this->_registry->get( 'date.timezone' )
|
134 |
-
->get_default_timezone(),
|
135 |
-
'privacy' => $options->get( 'blog_public' ),
|
136 |
-
'plugin_version' => AI1EC_VERSION,
|
137 |
-
'addons' => $this->_get_addons(),
|
138 |
-
'wp_filesystem' => $fs_method,
|
139 |
-
'wp_debug' => WP_DEBUG,
|
140 |
-
'ai1ec_debug' => AI1EC_DEBUG,
|
141 |
-
'active_theme' => $options->get(
|
142 |
-
'ai1ec_template',
|
143 |
-
AI1EC_DEFAULT_THEME_NAME
|
144 |
-
),
|
145 |
-
);
|
146 |
-
// send request
|
147 |
-
wp_remote_post(
|
148 |
-
AI1EC_STATS_API,
|
149 |
-
array(
|
150 |
-
'body' => $data,
|
151 |
-
)
|
152 |
-
);
|
153 |
-
|
154 |
-
// Release lock
|
155 |
-
$xguard->release( $guard_name );
|
156 |
-
}
|
157 |
-
|
158 |
-
/**
|
159 |
-
* Return a map of add-ons installed on site.
|
160 |
-
*
|
161 |
-
* Map contains following keys for each entry:
|
162 |
-
* - v - version of add-on;
|
163 |
-
* - u - plugin URI (if non-official add-on is used);
|
164 |
-
* - a - bool flag to indicate if plugin is active.
|
165 |
-
*
|
166 |
-
* @return array Map of add-ons.
|
167 |
-
*/
|
168 |
-
protected function _get_addons() {
|
169 |
-
$addons = array();
|
170 |
-
if ( ! function_exists( 'get_plugins' ) ) {
|
171 |
-
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
172 |
-
}
|
173 |
-
$all_plugins = get_plugins();
|
174 |
-
foreach ( $all_plugins as $plugin => $options ) {
|
175 |
-
$addons[$plugin] = array(
|
176 |
-
'v' => $options['Version'],
|
177 |
-
'u' => $options['PluginURI'],
|
178 |
-
'a' => is_plugin_active( $plugin ),
|
179 |
-
);
|
180 |
-
}
|
181 |
-
return $addons;
|
182 |
-
}
|
183 |
-
|
184 |
-
/**
|
185 |
-
* Send stats if user agrees by clicking on the optin pointer
|
186 |
-
*/
|
187 |
-
public function track_optin() {
|
188 |
-
$send_stats = $_POST['tracking'] === 'true';
|
189 |
-
$settings = $this->_registry->get( 'model.settings' );
|
190 |
-
$settings->set( 'allow_statistics', $send_stats );
|
191 |
-
$settings->set( 'show_tracking_popup', false );
|
192 |
-
}
|
193 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/icon-128x128.png
DELETED
Binary file
|
assets/icon-256x256.png
DELETED
Binary file
|
language/all-in-one-event-calendar.mo
CHANGED
Binary file
|
language/all-in-one-event-calendar.po
CHANGED
@@ -2,13 +2,13 @@
|
|
2 |
# This file is distributed under the same license as the All-in-One Event Calendar by Time.ly package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: All-in-One Event Calendar by Time.ly 2.3.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/all-in-one-event-calendar\n"
|
7 |
-
"POT-Creation-Date: 2015-08-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"PO-Revision-Date: 2015-08-19
|
12 |
"Last-Translator: Timely <support@time.ly>\n"
|
13 |
"Language-Team:\n"
|
14 |
|
@@ -2898,9 +2898,9 @@ msgstr "Today background"
|
|
2898 |
msgid "All-in-One Event Calendar by Time.ly"
|
2899 |
msgstr "All-in-One Event Calendar by Time.ly"
|
2900 |
|
2901 |
-
#. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.3.
|
2902 |
#. Plugin URI of the plugin/theme
|
2903 |
-
#. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.3.
|
2904 |
#. Author URI of the plugin/theme
|
2905 |
msgid "http://time.ly/"
|
2906 |
msgstr "http://time.ly/"
|
2 |
# This file is distributed under the same license as the All-in-One Event Calendar by Time.ly package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: All-in-One Event Calendar by Time.ly 2.3.1\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/all-in-one-event-calendar\n"
|
7 |
+
"POT-Creation-Date: 2015-08-19 10:17:47+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2015-08-19 18:17+0800\n"
|
12 |
"Last-Translator: Timely <support@time.ly>\n"
|
13 |
"Language-Team:\n"
|
14 |
|
2898 |
msgid "All-in-One Event Calendar by Time.ly"
|
2899 |
msgstr "All-in-One Event Calendar by Time.ly"
|
2900 |
|
2901 |
+
#. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.3.1) #-#-#-#-#
|
2902 |
#. Plugin URI of the plugin/theme
|
2903 |
+
#. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.3.1) #-#-#-#-#
|
2904 |
#. Author URI of the plugin/theme
|
2905 |
msgid "http://time.ly/"
|
2906 |
msgstr "http://time.ly/"
|
language/all-in-one-event-calendar.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the All-in-One Event Calendar by Time.ly package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: All-in-One Event Calendar by Time.ly 2.3.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/all-in-one-event-calendar\n"
|
7 |
-
"POT-Creation-Date: 2015-08-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -2684,9 +2684,9 @@ msgstr ""
|
|
2684 |
msgid "All-in-One Event Calendar by Time.ly"
|
2685 |
msgstr ""
|
2686 |
|
2687 |
-
#. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.3.
|
2688 |
#. Plugin URI of the plugin/theme
|
2689 |
-
#. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.3.
|
2690 |
#. Author URI of the plugin/theme
|
2691 |
msgid "http://time.ly/"
|
2692 |
msgstr ""
|
2 |
# This file is distributed under the same license as the All-in-One Event Calendar by Time.ly package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: All-in-One Event Calendar by Time.ly 2.3.1\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/all-in-one-event-calendar\n"
|
7 |
+
"POT-Creation-Date: 2015-08-19 10:17:47+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
2684 |
msgid "All-in-One Event Calendar by Time.ly"
|
2685 |
msgstr ""
|
2686 |
|
2687 |
+
#. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.3.1) #-#-#-#-#
|
2688 |
#. Plugin URI of the plugin/theme
|
2689 |
+
#. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.3.1) #-#-#-#-#
|
2690 |
#. Author URI of the plugin/theme
|
2691 |
msgid "http://time.ly/"
|
2692 |
msgstr ""
|
lib/calendar-feed/ics.php
CHANGED
@@ -448,7 +448,7 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
|
|
448 |
|
449 |
$args = array(
|
450 |
'feed_url' => $row->feed_url,
|
451 |
-
'feed_name' => $row->feed_name
|
452 |
'event_category' => implode( ', ', $categories ),
|
453 |
'categories_ids' => $row->feed_category,
|
454 |
'tags' => stripslashes(
|
448 |
|
449 |
$args = array(
|
450 |
'feed_url' => $row->feed_url,
|
451 |
+
'feed_name' => ! empty( $row->feed_name ) ? $row->feed_name : $row->feed_url,
|
452 |
'event_category' => implode( ', ', $categories ),
|
453 |
'categories_ids' => $row->feed_category,
|
454 |
'tags' => stripslashes(
|
lib/edd/updater.php
DELETED
@@ -1,91 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* EDD_SL_Plugin_Updater wrapper.
|
4 |
-
*
|
5 |
-
* @instantiator new
|
6 |
-
*
|
7 |
-
* @author Time.ly Network Inc.
|
8 |
-
* @since 2.2
|
9 |
-
* @package AI1EC
|
10 |
-
* @subpackage AI1EC.Lib.Edd
|
11 |
-
|
12 |
-
*/
|
13 |
-
class Ai1ec_EDD_SL_Plugin_Updater extends EDD_SL_Plugin_Updater {
|
14 |
-
|
15 |
-
/**
|
16 |
-
* @var string API URL.
|
17 |
-
*/
|
18 |
-
protected $_timely_api_url;
|
19 |
-
|
20 |
-
/**
|
21 |
-
* @var array|null API data.
|
22 |
-
*/
|
23 |
-
protected $_timely_api_data;
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Class constructor.
|
27 |
-
*
|
28 |
-
* @param string $_api_url The URL pointing to the custom API endpoint.
|
29 |
-
* @param string $_plugin_file Path to the plugin file.
|
30 |
-
* @param array $_api_data Optional data to send with API calls.
|
31 |
-
*
|
32 |
-
* @return Ai1ec_EDD_SL_Plugin_Updater
|
33 |
-
*/
|
34 |
-
public function __construct( $_api_url, $_plugin_file, $_api_data = null ) {
|
35 |
-
$this->_timely_api_data = $_api_data;
|
36 |
-
$_api_url = $this->_modify_api_url(
|
37 |
-
$_api_url,
|
38 |
-
$_plugin_file,
|
39 |
-
$_api_data
|
40 |
-
);
|
41 |
-
$this->_timely_api_url = $_api_url;
|
42 |
-
parent::__construct( $_api_url, $_plugin_file, $_api_data );
|
43 |
-
$this->_timely_api_url = trailingslashit( $this->_timely_api_url );
|
44 |
-
}
|
45 |
-
|
46 |
-
/**
|
47 |
-
* WP hook handler.
|
48 |
-
*
|
49 |
-
* @param array $args Request arguments.
|
50 |
-
* @param string $url URL.
|
51 |
-
*
|
52 |
-
* @return array Modified arguments.
|
53 |
-
*/
|
54 |
-
public function http_request_args( $args, $url ) {
|
55 |
-
if (
|
56 |
-
$url !== $this->_timely_api_url ||
|
57 |
-
! isset( $args['body']['edd_action'] ) ||
|
58 |
-
'get_version' !== $args['body']['edd_action']
|
59 |
-
) {
|
60 |
-
return $args;
|
61 |
-
}
|
62 |
-
$args['method'] = 'GET';
|
63 |
-
unset( $args['body'] );
|
64 |
-
return $args;
|
65 |
-
}
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Modifies API URL.
|
69 |
-
*
|
70 |
-
* @param string $_api_url API URL.
|
71 |
-
* @param string $_plugin_file Plugin file.
|
72 |
-
* @param array $_api_data API data.
|
73 |
-
*
|
74 |
-
* @return string Modified URL.
|
75 |
-
*/
|
76 |
-
protected function _modify_api_url( $_api_url, $_plugin_file, $_api_data ) {
|
77 |
-
$slug = basename( $_plugin_file, '.php' );
|
78 |
-
$api_params = array(
|
79 |
-
'edd_action' => 'get_version',
|
80 |
-
'license' => $_api_data['license'],
|
81 |
-
'item_name' => urlencode( $_api_data['item_name'] ),
|
82 |
-
'slug' => $slug,
|
83 |
-
'author' => urlencode( $_api_data['author'] ),
|
84 |
-
'url' => site_url(),
|
85 |
-
);
|
86 |
-
return add_query_arg(
|
87 |
-
$api_params,
|
88 |
-
trailingslashit( $_api_url )
|
89 |
-
);
|
90 |
-
}
|
91 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ calendar, ical, iCalendar, all-in-one, events sync, events widget,
|
|
5 |
calendar widget
|
6 |
Requires WordPress at least: 3.5
|
7 |
Tested up to: 4.2
|
8 |
-
Stable tag: 2.3.
|
9 |
License: GNU General Public License, version 3 (GPL-3.0)
|
10 |
|
11 |
A calendar system with many views, upcoming events widget, color-coded
|
@@ -137,6 +137,11 @@ https://vimeo.com/135004810
|
|
137 |
|
138 |
== Changelog ==
|
139 |
|
|
|
|
|
|
|
|
|
|
|
140 |
= Version 2.3.0 =
|
141 |
* Some custom recurrence rules (having multiple definitions) weren't
|
142 |
correctly processed
|
5 |
calendar widget
|
6 |
Requires WordPress at least: 3.5
|
7 |
Tested up to: 4.2
|
8 |
+
Stable tag: 2.3.1
|
9 |
License: GNU General Public License, version 3 (GPL-3.0)
|
10 |
|
11 |
A calendar system with many views, upcoming events widget, color-coded
|
137 |
|
138 |
== Changelog ==
|
139 |
|
140 |
+
= Version 2.3.1 =
|
141 |
+
* Fixing piece of code that was incompatible with PHP versions prior
|
142 |
+
to 5.3 while we strive to provide good experience to all WordPress
|
143 |
+
users
|
144 |
+
|
145 |
= Version 2.3.0 =
|
146 |
* Some custom recurrence rules (having multiple definitions) weren't
|
147 |
correctly processed
|
vendor/edd/EDD_SL_Plugin_Updater.php
DELETED
@@ -1,161 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// uncomment this line for testing
|
4 |
-
//set_site_transient( 'update_plugins', null );
|
5 |
-
|
6 |
-
/**
|
7 |
-
* Allows plugins to use their own update API.
|
8 |
-
*
|
9 |
-
* @author Pippin Williamson
|
10 |
-
* @version 1.1
|
11 |
-
*/
|
12 |
-
class EDD_SL_Plugin_Updater {
|
13 |
-
private $api_url = '';
|
14 |
-
private $api_data = array();
|
15 |
-
private $name = '';
|
16 |
-
private $slug = '';
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Class constructor.
|
20 |
-
*
|
21 |
-
* @uses plugin_basename()
|
22 |
-
* @uses hook()
|
23 |
-
*
|
24 |
-
* @param string $_api_url The URL pointing to the custom API endpoint.
|
25 |
-
* @param string $_plugin_file Path to the plugin file.
|
26 |
-
* @param array $_api_data Optional data to send with API calls.
|
27 |
-
* @return void
|
28 |
-
*/
|
29 |
-
function __construct( $_api_url, $_plugin_file, $_api_data = null ) {
|
30 |
-
$this->api_url = trailingslashit( $_api_url );
|
31 |
-
$this->api_data = urlencode_deep( $_api_data );
|
32 |
-
$this->name = plugin_basename( $_plugin_file );
|
33 |
-
$this->slug = basename( $_plugin_file, '.php');
|
34 |
-
$this->version = $_api_data['version'];
|
35 |
-
|
36 |
-
// Set up hooks.
|
37 |
-
$this->hook();
|
38 |
-
}
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Set up Wordpress filters to hook into WP's update process.
|
42 |
-
*
|
43 |
-
* @uses add_filter()
|
44 |
-
*
|
45 |
-
* @return void
|
46 |
-
*/
|
47 |
-
private function hook() {
|
48 |
-
add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'pre_set_site_transient_update_plugins_filter' ) );
|
49 |
-
add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
|
50 |
-
add_filter( 'http_request_args', array( $this, 'http_request_args' ), 10, 2 );
|
51 |
-
}
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Check for Updates at the defined API endpoint and modify the update array.
|
55 |
-
*
|
56 |
-
* This function dives into the update api just when Wordpress creates its update array,
|
57 |
-
* then adds a custom API call and injects the custom plugin data retrieved from the API.
|
58 |
-
* It is reassembled from parts of the native Wordpress plugin update code.
|
59 |
-
* See wp-includes/update.php line 121 for the original wp_update_plugins() function.
|
60 |
-
*
|
61 |
-
* @uses api_request()
|
62 |
-
*
|
63 |
-
* @param array $_transient_data Update array build by Wordpress.
|
64 |
-
* @return array Modified update array with custom plugin data.
|
65 |
-
*/
|
66 |
-
function pre_set_site_transient_update_plugins_filter( $_transient_data ) {
|
67 |
-
|
68 |
-
|
69 |
-
if( empty( $_transient_data ) ) return $_transient_data;
|
70 |
-
|
71 |
-
$to_send = array( 'slug' => $this->slug );
|
72 |
-
|
73 |
-
$api_response = $this->api_request( 'plugin_latest_version', $to_send );
|
74 |
-
|
75 |
-
if( false !== $api_response && is_object( $api_response ) && isset( $api_response->new_version ) ) {
|
76 |
-
if( version_compare( $this->version, $api_response->new_version, '<' ) )
|
77 |
-
$_transient_data->response[$this->name] = $api_response;
|
78 |
-
}
|
79 |
-
return $_transient_data;
|
80 |
-
}
|
81 |
-
|
82 |
-
|
83 |
-
/**
|
84 |
-
* Updates information on the "View version x.x details" page with custom data.
|
85 |
-
*
|
86 |
-
* @uses api_request()
|
87 |
-
*
|
88 |
-
* @param mixed $_data
|
89 |
-
* @param string $_action
|
90 |
-
* @param object $_args
|
91 |
-
* @return object $_data
|
92 |
-
*/
|
93 |
-
function plugins_api_filter( $_data, $_action = '', $_args = null ) {
|
94 |
-
if ( ( $_action != 'plugin_information' ) || !isset( $_args->slug ) || ( $_args->slug != $this->slug ) ) return $_data;
|
95 |
-
|
96 |
-
$to_send = array( 'slug' => $this->slug );
|
97 |
-
|
98 |
-
$api_response = $this->api_request( 'plugin_information', $to_send );
|
99 |
-
if ( false !== $api_response ) $_data = $api_response;
|
100 |
-
|
101 |
-
return $_data;
|
102 |
-
}
|
103 |
-
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Disable SSL verification in order to prevent download update failures
|
107 |
-
*
|
108 |
-
* @param array $args
|
109 |
-
* @param string $url
|
110 |
-
* @return object $array
|
111 |
-
*/
|
112 |
-
function http_request_args( $args, $url ) {
|
113 |
-
// If it is an https request and we are performing a package download, disable ssl verification
|
114 |
-
if( strpos( $url, 'https://' ) !== false && strpos( $url, 'edd_action=package_download' ) ) {
|
115 |
-
$args['sslverify'] = false;
|
116 |
-
}
|
117 |
-
return $args;
|
118 |
-
}
|
119 |
-
|
120 |
-
/**
|
121 |
-
* Calls the API and, if successfull, returns the object delivered by the API.
|
122 |
-
*
|
123 |
-
* @uses get_bloginfo()
|
124 |
-
* @uses wp_remote_post()
|
125 |
-
* @uses is_wp_error()
|
126 |
-
*
|
127 |
-
* @param string $_action The requested action.
|
128 |
-
* @param array $_data Parameters for the API action.
|
129 |
-
* @return false||object
|
130 |
-
*/
|
131 |
-
private function api_request( $_action, $_data ) {
|
132 |
-
|
133 |
-
global $wp_version;
|
134 |
-
|
135 |
-
$data = array_merge( $this->api_data, $_data );
|
136 |
-
|
137 |
-
if( $data['slug'] != $this->slug )
|
138 |
-
return;
|
139 |
-
|
140 |
-
if( empty( $data['license'] ) )
|
141 |
-
return;
|
142 |
-
|
143 |
-
$api_params = array(
|
144 |
-
'edd_action' => 'get_version',
|
145 |
-
'license' => $data['license'],
|
146 |
-
'name' => $data['item_name'],
|
147 |
-
'slug' => $this->slug,
|
148 |
-
'author' => $data['author']
|
149 |
-
);
|
150 |
-
$request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
|
151 |
-
|
152 |
-
if ( ! is_wp_error( $request ) ):
|
153 |
-
$request = json_decode( wp_remote_retrieve_body( $request ) );
|
154 |
-
if( $request && isset( $request->sections ) )
|
155 |
-
$request->sections = maybe_unserialize( $request->sections );
|
156 |
-
return $request;
|
157 |
-
else:
|
158 |
-
return false;
|
159 |
-
endif;
|
160 |
-
}
|
161 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|