Version Description
Download this release
Release Info
Developer | pderksen |
Plugin | Simple Calendar – Google Calendar Plugin |
Version | 2.0.0-beta1 |
Comparing to | |
See all releases |
Code changes from version 0.7.2.1 to 2.0.0-beta1
- admin/add.php +0 -399
- admin/delete.php +0 -39
- admin/edit.php +0 -416
- admin/main.php +0 -119
- admin/refresh.php +0 -40
- assets/icon-128x128.png +0 -0
- assets/icon-256x256.png +0 -0
- class-google-calendar-events-admin.php +154 -0
- class-google-calendar-events.php +208 -0
- css/admin.css +47 -0
- css/gce-old-style.css +0 -28
- css/gce-style.css +211 -202
- css/images/animated-overlay.gif +0 -0
- css/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- css/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- css/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- css/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- css/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- css/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- css/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- css/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- css/images/ui-icons_222222_256x240.png +0 -0
- css/images/ui-icons_2e83ff_256x240.png +0 -0
- css/images/ui-icons_454545_256x240.png +0 -0
- css/images/ui-icons_888888_256x240.png +0 -0
- css/images/ui-icons_cd0a0a_256x240.png +0 -0
- css/jquery-ui-1.10.4.custom.min.css +7 -0
- google-calendar-events.php +60 -710
- inc/gce-feed.php +0 -273
- inc/gce-parser.php +0 -372
- includes/admin/admin-functions.php +62 -0
- includes/admin/upgrade.php +244 -0
- includes/class-gce-display.php +259 -0
- inc/gce-event.php → includes/class-gce-event.php +539 -556
- includes/class-gce-feed.php +271 -0
- includes/gce-feed-cpt.php +289 -0
- includes/misc-functions.php +117 -0
- {inc → includes}/php-calendar.php +82 -82
- includes/register-settings.php +157 -0
- includes/shortcodes.php +79 -0
- index.php +1 -0
- js/admin.js +41 -0
- js/gce-admin-script.js +0 -29
- js/gce-script.js +57 -44
- languages/google-calendar-events-de_DE.mo +0 -0
- languages/google-calendar-events-de_DE.po +0 -1016
- languages/google-calendar-events-hu_HU.mo +0 -0
- languages/google-calendar-events-hu_HU.po +0 -500
- languages/google-calendar-events.pot +0 -1053
- license.txt +339 -288
- readme.txt +208 -154
- screenshot-1.jpg +0 -0
- screenshot-2.jpg +0 -0
- screenshot-3.jpg +0 -0
- uninstall.php +69 -21
- views/admin/admin.php +39 -0
- views/admin/display-options-meta.php +112 -0
- views/admin/gce-feed-meta-display.php +226 -0
- views/admin/gce-feed-sidebar-help.php +27 -0
- {admin → views/admin}/timezone-choices.php +443 -429
- views/widgets.php +198 -0
- widget/gce-widget.php +0 -250
admin/add.php
DELETED
@@ -1,399 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
//Redirect to the main plugin options page if form has been submitted
|
3 |
-
if(isset($_GET['page']) && GCE_PLUGIN_NAME == $_GET['page'] && isset($_GET['action'])){
|
4 |
-
if ( 'add' == $_GET['action'] && isset( $_GET['updated'] ) )
|
5 |
-
wp_redirect( admin_url( 'options-general.php?page=' . GCE_PLUGIN_NAME . '.php&updated=added' ) );
|
6 |
-
}
|
7 |
-
|
8 |
-
add_settings_section( 'gce_add', __( 'Add a Feed', GCE_TEXT_DOMAIN ), 'gce_add_main_text', 'add_feed' );
|
9 |
-
//Unique ID //Title //Function //Page //Section ID
|
10 |
-
add_settings_field( 'gce_add_id_field', __( 'Feed ID', GCE_TEXT_DOMAIN ), 'gce_add_id_field', 'add_feed', 'gce_add' );
|
11 |
-
add_settings_field( 'gce_add_title_field', __( 'Feed Title', GCE_TEXT_DOMAIN ), 'gce_add_title_field', 'add_feed', 'gce_add' );
|
12 |
-
add_settings_field( 'gce_add_url_field', __( 'Feed URL', GCE_TEXT_DOMAIN ), 'gce_add_url_field', 'add_feed', 'gce_add' );
|
13 |
-
add_settings_field( 'gce_add_retrieve_from_field', __( 'Retrieve events from', GCE_TEXT_DOMAIN ), 'gce_add_retrieve_from_field', 'add_feed', 'gce_add' );
|
14 |
-
add_settings_field( 'gce_add_retrieve_until_field', __( 'Retrieve events until', GCE_TEXT_DOMAIN ), 'gce_add_retrieve_until_field', 'add_feed', 'gce_add' );
|
15 |
-
add_settings_field( 'gce_add_max_events_field', __( 'Maximum number of events to retrieve', GCE_TEXT_DOMAIN ), 'gce_add_max_events_field', 'add_feed', 'gce_add' );
|
16 |
-
add_settings_field( 'gce_add_date_format_field', __( 'Date format', GCE_TEXT_DOMAIN ), 'gce_add_date_format_field', 'add_feed', 'gce_add' );
|
17 |
-
add_settings_field( 'gce_add_time_format_field', __( 'Time format', GCE_TEXT_DOMAIN ), 'gce_add_time_format_field', 'add_feed', 'gce_add' );
|
18 |
-
add_settings_field( 'gce_add_timezone_field', __( 'Timezone adjustment', GCE_TEXT_DOMAIN ), 'gce_add_timezone_field', 'add_feed', 'gce_add' );
|
19 |
-
add_settings_field( 'gce_add_cache_duration_field', __( 'Cache duration', GCE_TEXT_DOMAIN ), 'gce_add_cache_duration_field', 'add_feed', 'gce_add' );
|
20 |
-
add_settings_field( 'gce_add_query_field', __( 'Search query', GCE_TEXT_DOMAIN ), 'gce_add_query_field', 'add_feed', 'gce_add' );
|
21 |
-
add_settings_field( 'gce_add_multiple_field', __( 'Show multiple day events on each day?', GCE_TEXT_DOMAIN ), 'gce_add_multiple_field', 'add_feed', 'gce_add' );
|
22 |
-
add_settings_field( 'gce_add_expand_recurring_field', __( 'Expand recurring events?', GCE_TEXT_DOMAIN ), 'gce_add_expand_recurring_field', 'add_feed', 'gce_add' );
|
23 |
-
|
24 |
-
add_settings_section( 'gce_add_display', __( 'Display Options', GCE_TEXT_DOMAIN ), 'gce_add_display_main_text', 'add_display' );
|
25 |
-
add_settings_field( 'gce_add_use_builder_field', __( 'Select display customization method', GCE_TEXT_DOMAIN ), 'gce_add_use_builder_field', 'add_display', 'gce_add_display' );
|
26 |
-
|
27 |
-
add_settings_section( 'gce_add_builder', __( 'Event Display Builder' ), 'gce_add_builder_main_text', 'add_builder' );
|
28 |
-
add_settings_field( 'gce_add_builder_field', __( 'Event display builder HTML and shortcodes', GCE_TEXT_DOMAIN ), 'gce_add_builder_field', 'add_builder', 'gce_add_builder' );
|
29 |
-
|
30 |
-
add_settings_section( 'gce_add_simple_display', __('Simple Display Options'), 'gce_add_simple_display_main_text', 'add_simple_display' );
|
31 |
-
add_settings_field( 'gce_add_display_start_field', __( 'Display start time / date?', GCE_TEXT_DOMAIN ), 'gce_add_display_start_field', 'add_simple_display', 'gce_add_simple_display' );
|
32 |
-
add_settings_field( 'gce_add_display_end_field', __( 'Display end time / date?', GCE_TEXT_DOMAIN ), 'gce_add_display_end_field', 'add_simple_display', 'gce_add_simple_display' );
|
33 |
-
add_settings_field( 'gce_add_display_separator_field', __( 'Separator text / characters', GCE_TEXT_DOMAIN ), 'gce_add_display_separator_field', 'add_simple_display', 'gce_add_simple_display' );
|
34 |
-
add_settings_field( 'gce_add_display_location_field', __( 'Display location?', GCE_TEXT_DOMAIN ), 'gce_add_display_location_field', 'add_simple_display', 'gce_add_simple_display' );
|
35 |
-
add_settings_field( 'gce_add_display_desc_field', __( 'Display description?', GCE_TEXT_DOMAIN ), 'gce_add_display_desc_field', 'add_simple_display', 'gce_add_simple_display' );
|
36 |
-
add_settings_field( 'gce_add_display_link_field', __( 'Display link to event?', GCE_TEXT_DOMAIN ), 'gce_add_display_link_field', 'add_simple_display', 'gce_add_simple_display' );
|
37 |
-
|
38 |
-
//Main text
|
39 |
-
function gce_add_main_text() {
|
40 |
-
?>
|
41 |
-
<p><?php _e( 'Enter the feed details below, then click the Add Feed button.', GCE_TEXT_DOMAIN ); ?></p>
|
42 |
-
<?php
|
43 |
-
}
|
44 |
-
|
45 |
-
//ID
|
46 |
-
function gce_add_id_field() {
|
47 |
-
$options = get_option( GCE_OPTIONS_NAME );
|
48 |
-
$id = 1;
|
49 |
-
if ( !empty( $options ) ) { //If there are no saved feeds
|
50 |
-
//Go to last saved feed
|
51 |
-
end( $options );
|
52 |
-
//Set id to last feed id + 1
|
53 |
-
$id = key( $options ) + 1;
|
54 |
-
}
|
55 |
-
|
56 |
-
?>
|
57 |
-
<input type="text" disabled="disabled" value="<?php echo $id; ?>" size="3" />
|
58 |
-
<input type="hidden" name="gce_options[id]" value="<?php echo $id; ?>" />
|
59 |
-
<?php
|
60 |
-
}
|
61 |
-
|
62 |
-
//Title
|
63 |
-
function gce_add_title_field() {
|
64 |
-
?>
|
65 |
-
<span class="description"><?php _e( 'Anything you like. \'Upcoming Club Events\', for example.', GCE_TEXT_DOMAIN ); ?></span>
|
66 |
-
<br />
|
67 |
-
<input type="text" name="gce_options[title]" size="50" />
|
68 |
-
<?php
|
69 |
-
}
|
70 |
-
|
71 |
-
//URL
|
72 |
-
function gce_add_url_field() {
|
73 |
-
?>
|
74 |
-
<span class="description"><?php _e( 'This will probably be something like:', GCE_TEXT_DOMAIN ); ?> <code>http://www.google.com/calendar/feeds/your-email@gmail.com/public/basic</code>.</span>
|
75 |
-
<br />
|
76 |
-
<span class="description"><?php _e( 'or:', GCE_TEXT_DOMAIN ); ?> <code>http://www.google.com/calendar/feeds/your-email@gmail.com/private-d65741b037h695ff274247f90746b2ty/basic</code>.</span>
|
77 |
-
<br />
|
78 |
-
<input type="text" name="gce_options[url]" size="100" class="required" />
|
79 |
-
<?php
|
80 |
-
}
|
81 |
-
|
82 |
-
//Retrieve events from
|
83 |
-
function gce_add_retrieve_from_field() {
|
84 |
-
?>
|
85 |
-
<span class="description">
|
86 |
-
<?php _e( 'The point in time at which to start retrieving events. Use the text-box to specify an additional offset from you chosen start point. The offset should be provided in seconds (3600 = 1 hour, 86400 = 1 day) and can be negative. If you have selected the \'Specific date / time\' option, enter a', GCE_TEXT_DOMAIN ); ?>
|
87 |
-
<a href="http://www.timestampgenerator.com" target="_blank"><?php _e( 'UNIX timestamp', GCE_TEXT_DOMAIN ); ?></a>
|
88 |
-
<?php _e( 'in the text-box.', GCE_TEXT_DOMAIN ); ?>
|
89 |
-
</span>
|
90 |
-
<br />
|
91 |
-
<select name="gce_options[retrieve_from]">
|
92 |
-
<option value="now"><?php _e( 'Now', GCE_TEXT_DOMAIN ); ?></option>
|
93 |
-
<option value="today" selected="selected"><?php _e( '00:00 today', GCE_TEXT_DOMAIN ); ?></option>
|
94 |
-
<option value="week"><?php _e( 'Start of current week', GCE_TEXT_DOMAIN ); ?></option>
|
95 |
-
<option value="month-start"><?php _e( 'Start of current month', GCE_TEXT_DOMAIN ); ?></option>
|
96 |
-
<option value="month-end"><?php _e( 'End of current month', GCE_TEXT_DOMAIN ); ?></option>
|
97 |
-
<option value="any"><?php _e( 'The beginning of time', GCE_TEXT_DOMAIN ); ?></option>
|
98 |
-
<option value="date"><?php _e( 'Specific date / time', GCE_TEXT_DOMAIN ); ?></option>
|
99 |
-
</select>
|
100 |
-
<input type="text" name="gce_options[retrieve_from_value]" value="0" />
|
101 |
-
<?php
|
102 |
-
}
|
103 |
-
|
104 |
-
//Retrieve events until
|
105 |
-
function gce_add_retrieve_until_field() {
|
106 |
-
?>
|
107 |
-
<span class="description"><?php _e( 'The point in time at which to stop retrieving events. The instructions for the above option also apply here.', GCE_TEXT_DOMAIN ); ?></span>
|
108 |
-
<br />
|
109 |
-
<select name="gce_options[retrieve_until]">
|
110 |
-
<option value="now"><?php _e( 'Now', GCE_TEXT_DOMAIN ); ?></option>
|
111 |
-
<option value="today"><?php _e( '00:00 today', GCE_TEXT_DOMAIN ); ?></option>
|
112 |
-
<option value="week"><?php _e( 'Start of current week', GCE_TEXT_DOMAIN ); ?></option>
|
113 |
-
<option value="month-start"><?php _e( 'Start of current month', GCE_TEXT_DOMAIN ); ?></option>
|
114 |
-
<option value="month-end"><?php _e( 'End of current month', GCE_TEXT_DOMAIN ); ?></option>
|
115 |
-
<option value="any" selected="selected"><?php _e( 'The end of time', GCE_TEXT_DOMAIN ); ?></option>
|
116 |
-
<option value="date"><?php _e( 'Specific date / time', GCE_TEXT_DOMAIN ); ?></option>
|
117 |
-
|
118 |
-
</select>
|
119 |
-
<input type="text" name="gce_options[retrieve_until_value]" value="0" />
|
120 |
-
<?php
|
121 |
-
}
|
122 |
-
|
123 |
-
//Max events
|
124 |
-
function gce_add_max_events_field() {
|
125 |
-
?>
|
126 |
-
<span class="description"><?php _e( 'Set this to a few more than you actually want to display (due to caching and timezone issues). The exact number to display can be configured per shortcode / widget.', GCE_TEXT_DOMAIN ); ?></span>
|
127 |
-
<br />
|
128 |
-
<input type="text" name="gce_options[max_events]" value="25" size="3" />
|
129 |
-
<?php
|
130 |
-
}
|
131 |
-
|
132 |
-
//Date format
|
133 |
-
function gce_add_date_format_field(){
|
134 |
-
?>
|
135 |
-
<span class="description"><?php _e( 'In <a href="http://php.net/manual/en/function.date.php" target="_blank">PHP date format</a>. Leave this blank if you\'d rather stick with the default format for your blog.', GCE_TEXT_DOMAIN ); ?></span>
|
136 |
-
<br />
|
137 |
-
<input type="text" name="gce_options[date_format]" />
|
138 |
-
<?php
|
139 |
-
}
|
140 |
-
|
141 |
-
//Time format
|
142 |
-
function gce_add_time_format_field(){
|
143 |
-
?>
|
144 |
-
<span class="description"><?php _e( 'In <a href="http://php.net/manual/en/function.date.php" target="_blank">PHP date format</a>. Again, leave this blank to stick with the default.', GCE_TEXT_DOMAIN ); ?></span>
|
145 |
-
<br />
|
146 |
-
<input type="text" name="gce_options[time_format]" />
|
147 |
-
<?php
|
148 |
-
}
|
149 |
-
|
150 |
-
//Timezone offset
|
151 |
-
function gce_add_timezone_field() {
|
152 |
-
require_once 'timezone-choices.php';
|
153 |
-
$timezone_list = gce_get_timezone_choices();
|
154 |
-
//Set selected="selected" for default option
|
155 |
-
$timezone_list = str_replace( '<option value="default">Default</option>', '<option value="default" selected="selected">Default</option>', $timezone_list );
|
156 |
-
?>
|
157 |
-
<span class="description"><?php _e( 'If you are having problems with dates and times displaying in the wrong timezone, select a city in your required timezone here.', GCE_TEXT_DOMAIN ); ?></span>
|
158 |
-
<br />
|
159 |
-
<?php echo $timezone_list; ?>
|
160 |
-
<?php
|
161 |
-
}
|
162 |
-
|
163 |
-
//Cache duration
|
164 |
-
function gce_add_cache_duration_field() {
|
165 |
-
?>
|
166 |
-
<span class="description"><?php _e( 'The length of time, in seconds, to cache the feed (43200 = 12 hours). If this feed changes regularly, you may want to reduce the cache duration.', GCE_TEXT_DOMAIN ); ?></span>
|
167 |
-
<br />
|
168 |
-
<input type="text" name="gce_options[cache_duration]" value="43200" />
|
169 |
-
<?php
|
170 |
-
}
|
171 |
-
|
172 |
-
//Query
|
173 |
-
function gce_add_query_field() {
|
174 |
-
?>
|
175 |
-
<span class="description"><?php _e( 'Search query.', GCE_TEXT_DOMAIN ); ?></span>
|
176 |
-
<br />
|
177 |
-
<input type="text" name="gce_options[query]" size="50" />
|
178 |
-
<?php
|
179 |
-
}
|
180 |
-
|
181 |
-
//Multiple day events
|
182 |
-
function gce_add_multiple_field() {
|
183 |
-
?>
|
184 |
-
<span class="description"><?php _e( 'Show events that span multiple days on each day that they span, rather than just the first day.', GCE_TEXT_DOMAIN ); ?></span>
|
185 |
-
<br />
|
186 |
-
<input type="checkbox" name="gce_options[multiple_day]" value="true" />
|
187 |
-
<br /><br />
|
188 |
-
<?php
|
189 |
-
}
|
190 |
-
|
191 |
-
//Expand recurring
|
192 |
-
function gce_add_expand_recurring_field() {
|
193 |
-
?>
|
194 |
-
<span class="description"><?php _e( 'Expand recurring events?', GCE_TEXT_DOMAIN ); ?></span>
|
195 |
-
<br />
|
196 |
-
<input type="checkbox" name="gce_options[expand_recurring]" value="true" checked="checked" />
|
197 |
-
<br /><br />
|
198 |
-
<?php
|
199 |
-
}
|
200 |
-
|
201 |
-
|
202 |
-
//Display options
|
203 |
-
function gce_add_display_main_text() {
|
204 |
-
?>
|
205 |
-
<p><?php _e( 'These settings control what information will be displayed for this feed in the tooltip (for grids), or in a list.', GCE_TEXT_DOMAIN ); ?></p>
|
206 |
-
<?php
|
207 |
-
}
|
208 |
-
|
209 |
-
function gce_add_use_builder_field() {
|
210 |
-
?>
|
211 |
-
<span class="description"><?php _e( 'It is recommended that you use the event display builder option, as it provides much more flexibility than the simple display options. The event display builder can do everything the simple display options can, plus lots more!', GCE_TEXT_DOMAIN ); ?></span>
|
212 |
-
<br />
|
213 |
-
<select name="gce_options[use_builder]">
|
214 |
-
<option value="true" selected="selected"><?php _e( 'Event display builder', GCE_TEXT_DOMAIN ); ?></option>
|
215 |
-
<option value="false"><?php _e( 'Simple display options', GCE_TEXT_DOMAIN ); ?></option>
|
216 |
-
</select>
|
217 |
-
<?php
|
218 |
-
}
|
219 |
-
|
220 |
-
//Event display builder
|
221 |
-
function gce_add_builder_main_text() {
|
222 |
-
?>
|
223 |
-
<p class="gce-event-builder">
|
224 |
-
<?php _e( 'Use the event display builder to customize how event information will be displayed in the grid tooltips and in lists. Use HTML and the shortcodes (explained below) to display the information you require. A basic example display format is provided as a starting point. For more information, take a look at the', GCE_TEXT_DOMAIN ); ?>
|
225 |
-
<a href="http://www.rhanney.co.uk/plugins/google-calendar-events/event-display-builder" target="_blank"><?php _e( 'event display builder guide', GCE_TEXT_DOMAIN ); ?></a>
|
226 |
-
</p>
|
227 |
-
<?php
|
228 |
-
}
|
229 |
-
|
230 |
-
function gce_add_builder_field() {
|
231 |
-
?>
|
232 |
-
<textarea name="gce_options[builder]" rows="10" cols="80">
|
233 |
-
<div class="gce-list-event gce-tooltip-event">[event-title]</div>
|
234 |
-
<div><span>Starts:</span> [start-time]</div>
|
235 |
-
<div><span>Ends:</span> [end-date] - [end-time]</div>
|
236 |
-
[if-location]<div><span>Location:</span> [location]</div>[/if-location]
|
237 |
-
[if-description]<div><span>Description:</span> [description]</div>[/if-description]
|
238 |
-
<div>[link newwindow="true"]More details...[/link]</div>
|
239 |
-
</textarea>
|
240 |
-
<br />
|
241 |
-
<p style="margin-top:20px;">
|
242 |
-
<?php _e( '(More information on all of the below shortcodes and attributes, and working examples, can be found in the', GCE_TEXT_DOMAIN ); ?>
|
243 |
-
<a href="http://www.rhanney.co.uk/plugins/google-calendar-events/event-display-builder" target="_blank"><?php _e( 'event display builder guide', GCE_TEXT_DOMAIN ); ?></a>)
|
244 |
-
</p>
|
245 |
-
<h4><?php _e( 'Event information shortcodes:', GCE_TEXT_DOMAIN ); ?></h4>
|
246 |
-
<ul>
|
247 |
-
<li><code>[event-title]</code><span class="description"> - <?php _e( 'The event title (possible attributes: <code>html</code>, <code>markdown</code>)', GCE_TEXT_DOMAIN ); ?></span></li>
|
248 |
-
<li><code>[start-time]</code><span class="description"> - <?php _e( 'The event start time. Will use the time format specified in the above settings', GCE_TEXT_DOMAIN ); ?></span></li>
|
249 |
-
<li><code>[start-date]</code><span class="description"> - <?php _e( 'The event start date. Will use the date format specified in the above settings', GCE_TEXT_DOMAIN ); ?></span></li>
|
250 |
-
<li><code>[start-custom]</code><span class="description"> - <?php _e( 'The event start date / time. Will use the format specified in the <code>format</code> attribute (possible attributes: <code>format</code>)', GCE_TEXT_DOMAIN ); ?></span></li>
|
251 |
-
<li><code>[start-human]</code><span class="description"> - <?php _e( '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\' (possible attributes: <code>precision</code>)', GCE_TEXT_DOMAIN ); ?></span></li>
|
252 |
-
<li><code>[end-time]</code><span class="description"> - <?php _e( 'The event end time. Will use the time format specified in the above settings', GCE_TEXT_DOMAIN ); ?></span></li>
|
253 |
-
<li><code>[end-date]</code><span class="description"> - <?php _e( 'The event end date. Will use the date format specified in the above settings', GCE_TEXT_DOMAIN ); ?></span></li>
|
254 |
-
<li><code>[end-custom]</code><span class="description"> - <?php _e( 'The event end date / time. Will use the format specified in the <code>format</code> attribute (possible attributes: <code>format</code>)', GCE_TEXT_DOMAIN ); ?></span></li>
|
255 |
-
<li><code>[end-human]</code><span class="description"> - <?php _e( 'The difference between the end time of the event and the time now, in human-readable format (possible attributes: <code>precision</code>)', GCE_TEXT_DOMAIN ); ?></span></li>
|
256 |
-
<li><code>[location]</code><span class="description"> - <?php _e( 'The event location (possible attributes: <code>html</code>, <code>markdown</code>)', GCE_TEXT_DOMAIN ); ?></span></li>
|
257 |
-
<li><code>[maps-link]…[/maps-link]</code><span class="description"> - <?php _e( 'Anything between the opening and closing shortcode tags (inlcuding further shortcodes) will be linked to Google Maps, using the event location as a search parameter (possible attributes: <code>newwindow</code>)', GCE_TEXT_DOMAIN ); ?></span></li>
|
258 |
-
<li><code>[description]</code><span class="description"> - <?php _e( 'The event description (possible attributes: <code>html</code>, <code>markdown</code>, <code>limit</code>)', GCE_TEXT_DOMAIN ); ?></span></li>
|
259 |
-
<li><code>[link]…[/link]</code><span class="description"> - <?php _e( 'Anything between the opening and closing shortcode tags (inlcuding further shortcodes) will be linked to the Google Calendar page for the event (possible attributes: <code>newwindow</code>)', GCE_TEXT_DOMAIN ); ?></span></li>
|
260 |
-
<li><code>[url]</code><span class="description"> - <?php _e( 'The raw URL to the Google Calendar page for the event', GCE_TEXT_DOMAIN ); ?></span></li>
|
261 |
-
<li><code>[length]</code><span class="description"> - <?php _e( 'The length of the event, in human-readable format (possible attributes: <code>precision</code>)', GCE_TEXT_DOMAIN ); ?></span></li>
|
262 |
-
<li><code>[event-num]</code><span class="description"> - <?php _e( 'The position of the event in the current list, or the position of the event in the current month (for grids)', GCE_TEXT_DOMAIN ); ?></span></li>
|
263 |
-
<li><code>[event-id]</code><span class="description"> - <?php _e( 'The event UID (a unique identifier assigned to the event by Google)', GCE_TEXT_DOMAIN ); ?></span></li>
|
264 |
-
</ul>
|
265 |
-
<h4><?php _e( 'Feed information shortcodes:', GCE_TEXT_DOMAIN ); ?></h4>
|
266 |
-
<ul>
|
267 |
-
<li><code>[feed-title]</code><span class="description"> - <?php _e( 'The title of the feed from which the event comes', GCE_TEXT_DOMAIN ); ?></span></li>
|
268 |
-
<li><code>[feed-id]</code><span class="description"> - <?php _e( 'The ID of the feed from which the event comes', GCE_TEXT_DOMAIN ); ?></span></li>
|
269 |
-
<li><code>[cal-id]</code><span class="description"> - <?php _e( 'The calendar ID (a unique identifier assigned to the calendar by Google)', GCE_TEXT_DOMAIN ); ?></span></li>
|
270 |
-
</ul>
|
271 |
-
<h4><?php _e( 'Conditional shortcodes:', GCE_TEXT_DOMAIN ); ?></h4>
|
272 |
-
<p class="description" style="margin-bottom:18px;"><?php _e( 'Anything entered between the opening and closing tags of each of the following shortcodes will only be displayed if its condition (below) is met.', GCE_TEXT_DOMAIN ); ?></p>
|
273 |
-
<ul>
|
274 |
-
<li><code>[if-all-day]…[/if-all-day]</code><span class="description"> - <?php _e( 'The event is an all-day event', GCE_TEXT_DOMAIN ); ?></span></li>
|
275 |
-
<li><code>[if-not-all-day]…[/if-not-all-day]</code><span class="description"> - <?php _e( 'The event is not an all-day event', GCE_TEXT_DOMAIN ); ?></span></li>
|
276 |
-
<li><code>[if-title]…[/if-title]</code><span class="description"> - <?php _e( 'The event has a title', GCE_TEXT_DOMAIN ); ?></span></li>
|
277 |
-
<li><code>[if-description]…[/if-description]</code><span class="description"> - <?php _e( 'The event has a description', GCE_TEXT_DOMAIN ); ?></span></li>
|
278 |
-
<li><code>[if-location]…[/if-location]</code><span class="description"> - <?php _e( 'The event has a location', GCE_TEXT_DOMAIN ); ?></span></li>
|
279 |
-
<li><code>[if-tooltip]…[/if-tooltip]</code><span class="description"> - <?php _e( 'The event is to be displayed in a tooltip (not a list)', GCE_TEXT_DOMAIN ); ?></span></li>
|
280 |
-
<li><code>[if-list]…[/if-list]</code><span class="description"> - <?php _e( 'The event is to be displayed in a list (not a tooltip)', GCE_TEXT_DOMAIN ); ?></span></li>
|
281 |
-
<li><code>[if-now]…[/if-now]</code><span class="description"> - <?php _e( 'The event is taking place now (after the start time, but before the end time)', GCE_TEXT_DOMAIN ); ?></span></li>
|
282 |
-
<li><code>[if-not-now]…[/if-not-now]</code><span class="description"> - <?php _e( 'The event is not taking place now (may have ended or not yet started)', GCE_TEXT_DOMAIN ); ?></span></li>
|
283 |
-
<li><code>[if-started]…[/if-started]</code><span class="description"> - <?php _e( 'The event has started (even if it has also ended)', GCE_TEXT_DOMAIN ); ?></span></li>
|
284 |
-
<li><code>[if-not-started]…[/if-not-started]</code><span class="description"> - <?php _e( 'The event has not started', GCE_TEXT_DOMAIN ); ?></span></li>
|
285 |
-
<li><code>[if-ended]…[/if-ended]</code><span class="description"> - <?php _e( 'The event has ended', GCE_TEXT_DOMAIN ); ?></span></li>
|
286 |
-
<li><code>[if-not-ended]…[/if-not-ended]</code><span class="description"> - <?php _e( 'The event has not ended (even if it hasn\'t started)', GCE_TEXT_DOMAIN ); ?></span></li>
|
287 |
-
<li><code>[if-first]…[/if-first]</code><span class="description"> - <?php _e( 'The event is the first of the day', GCE_TEXT_DOMAIN ); ?></span></li>
|
288 |
-
<li><code>[if-not-first]…[/if-not-first]</code><span class="description"> - <?php _e( 'The event is not the first of the day', GCE_TEXT_DOMAIN ); ?></span></li>
|
289 |
-
<li><code>[if-multi-day]…[/if-multi-day]</code><span class="description"> - <?php _e( 'The event spans multiple days', GCE_TEXT_DOMAIN ); ?></span></li>
|
290 |
-
<li><code>[if-single-day]…[/if-single-day]</code><span class="description"> - <?php _e( 'The event does not span multiple days', GCE_TEXT_DOMAIN ); ?></span></li>
|
291 |
-
<li><code>[if-recurring]…[/if-recurring]</code><span class="description"> - <?php _e( 'The event is recurring', GCE_TEXT_DOMAIN ); ?></span></li>
|
292 |
-
<li><code>[if-not-recurring]…[/if-not-recurring]</code><span class="description"> - <?php _e( 'The event is not recurring', GCE_TEXT_DOMAIN ); ?></span></li>
|
293 |
-
</ul>
|
294 |
-
<h4><?php _e( 'Attributes:', GCE_TEXT_DOMAIN ); ?></h4>
|
295 |
-
<p class="description" style="margin-bottom:18px;"><?php _e( 'The possible attributes mentioned above are explained here:', GCE_TEXT_DOMAIN ); ?></p>
|
296 |
-
<ul>
|
297 |
-
<li><code>html</code><span class="description"> - <?php _e( 'Whether or not to parse HTML that has been entered in the relevant field. Can be <code>true</code> or <code>false</code>', GCE_TEXT_DOMAIN ); ?></span></li>
|
298 |
-
<li><code>markdown</code><span class="description"> - <?php _e( 'Whether or not to parse <a href="http://daringfireball.net/projects/markdown" target="_blank">Markdown</a> that has been entered in the relevant field. <a href="http://michelf.com/projects/php-markdown" target="_blank">PHP Markdown</a> must be installed for this to work. Can be <code>true</code> or <code>false</code>', GCE_TEXT_DOMAIN ); ?></span></li>
|
299 |
-
<li><code>limit</code><span class="description"> - <?php _e( 'The word limit for the field. Should be specified as a positive integer', GCE_TEXT_DOMAIN ); ?></span></li>
|
300 |
-
<li><code>format</code><span class="description"> - <?php _e( 'The date / time format to use. Should specified as a <a href="http://php.net/manual/en/function.date.php" target="_blank">PHP date format</a> string', GCE_TEXT_DOMAIN ); ?></span></li>
|
301 |
-
<li><code>newwindow</code><span class="description"> - <?php _e( 'Whether or not the link should open in a new window / tab. Can be <code>true</code> or <code>false</code>', GCE_TEXT_DOMAIN ); ?></span></li>
|
302 |
-
<li><code>precision</code><span class="description"> - <?php _e( 'How precise to be when displaying a time difference in human-readable format. Should be specified as a positive integer', GCE_TEXT_DOMAIN ); ?></span></li>
|
303 |
-
<li><code>offset</code><span class="description"> - <?php _e( 'An offset (in seconds) to apply to start / end times before display. Should be specified as a (positive or negative) integer', GCE_TEXT_DOMAIN ); ?></span></li>
|
304 |
-
<li><code>autolink</code><span class="description"> - <?php _e( 'Whether or not to automatically convert URLs in the description to links. Can be <code>true</code> or <code>false</code>', GCE_TEXT_DOMAIN ); ?></span></li>
|
305 |
-
</ul>
|
306 |
-
<?php
|
307 |
-
}
|
308 |
-
|
309 |
-
//Simple display options
|
310 |
-
function gce_add_simple_display_main_text() {
|
311 |
-
?>
|
312 |
-
<p class="gce-simple-display-options"><?php _e( 'You can use some HTML in the text fields, but ensure it is valid or things might go wonky. Text fields can be empty too.', GCE_TEXT_DOMAIN ); ?></p>
|
313 |
-
<?php
|
314 |
-
}
|
315 |
-
|
316 |
-
function gce_add_display_start_field() {
|
317 |
-
?>
|
318 |
-
<span class="description"><?php _e( 'Select how to display the start date / time.', GCE_TEXT_DOMAIN ); ?></span>
|
319 |
-
<br />
|
320 |
-
<select name="gce_options[display_start]">
|
321 |
-
<option value="none"><?php _e( 'Don\'t display start time or date', GCE_TEXT_DOMAIN ); ?></option>
|
322 |
-
<option value="time" selected="selected"><?php _e( 'Display start time', GCE_TEXT_DOMAIN ); ?></option>
|
323 |
-
<option value="date"><?php _e( 'Display start date', GCE_TEXT_DOMAIN ); ?></option>
|
324 |
-
<option value="time-date"><?php _e( 'Display start time and date (in that order)', GCE_TEXT_DOMAIN ); ?></option>
|
325 |
-
<option value="date-time"><?php _e( 'Display start date and time (in that order)', GCE_TEXT_DOMAIN ); ?></option>
|
326 |
-
</select>
|
327 |
-
<br /><br />
|
328 |
-
<span class="description"><?php _e( 'Text to display before the start time.', GCE_TEXT_DOMAIN ); ?></span>
|
329 |
-
<br />
|
330 |
-
<input type="text" name="gce_options[display_start_text]" value="Starts:" />
|
331 |
-
<?php
|
332 |
-
}
|
333 |
-
|
334 |
-
function gce_add_display_end_field() {
|
335 |
-
?>
|
336 |
-
<span class="description"><?php _e( 'Select how to display the end date / time.', GCE_TEXT_DOMAIN ); ?></span>
|
337 |
-
<br />
|
338 |
-
<select name="gce_options[display_end]">
|
339 |
-
<option value="none"><?php _e( 'Don\'t display end time or date', GCE_TEXT_DOMAIN ); ?></option>
|
340 |
-
<option value="time"><?php _e( 'Display end time', GCE_TEXT_DOMAIN ); ?></option>
|
341 |
-
<option value="date"><?php _e( 'Display end date', GCE_TEXT_DOMAIN ); ?></option>
|
342 |
-
<option value="time-date" selected="selected"><?php _e( 'Display end time and date (in that order)', GCE_TEXT_DOMAIN ); ?></option>
|
343 |
-
<option value="date-time"><?php _e( 'Display end date and time (in that order)', GCE_TEXT_DOMAIN ); ?></option>
|
344 |
-
</select>
|
345 |
-
<br /><br />
|
346 |
-
<span class="description"><?php _e( 'Text to display before the end time.', GCE_TEXT_DOMAIN ); ?></span>
|
347 |
-
<br />
|
348 |
-
<input type="text" name="gce_options[display_end_text]" value="Ends:" />
|
349 |
-
<?php
|
350 |
-
}
|
351 |
-
|
352 |
-
function gce_add_display_separator_field() {
|
353 |
-
?>
|
354 |
-
<span class="description"><?php _e( 'If you have chosen to display both the time and date above, enter the text / characters to display between the time and date here (including any spaces).', GCE_TEXT_DOMAIN ); ?></span>
|
355 |
-
<br />
|
356 |
-
<input type="text" name="gce_options[display_separator]" value=", " />
|
357 |
-
<?php
|
358 |
-
}
|
359 |
-
|
360 |
-
function gce_add_display_location_field() {
|
361 |
-
?>
|
362 |
-
<input type="checkbox" name="gce_options[display_location]" value="on" />
|
363 |
-
<span class="description"><?php _e( 'Show the location of events?', GCE_TEXT_DOMAIN ); ?></span>
|
364 |
-
<br /><br />
|
365 |
-
<span class="description"><?php _e( 'Text to display before the location.', GCE_TEXT_DOMAIN ); ?></span>
|
366 |
-
<br />
|
367 |
-
<input type="text" name="gce_options[display_location_text]" value="Location:" />
|
368 |
-
<?php
|
369 |
-
}
|
370 |
-
|
371 |
-
function gce_add_display_desc_field() {
|
372 |
-
?>
|
373 |
-
<input type="checkbox" name="gce_options[display_desc]" value="on" />
|
374 |
-
<span class="description"><?php _e( 'Show the description of events? (URLs in the description will be made into links).', GCE_TEXT_DOMAIN ); ?></span>
|
375 |
-
<br /><br />
|
376 |
-
<span class="description"><?php _e( 'Text to display before the description.', GCE_TEXT_DOMAIN ); ?></span>
|
377 |
-
<br />
|
378 |
-
<input type="text" name="gce_options[display_desc_text]" value="Description:" />
|
379 |
-
<br /><br />
|
380 |
-
<span class="description"><?php _e( 'Maximum number of words to show from description. Leave blank for no limit.', GCE_TEXT_DOMAIN ); ?></span>
|
381 |
-
<br />
|
382 |
-
<input type="text" name="gce_options[display_desc_limit]" size="3" />
|
383 |
-
<?php
|
384 |
-
}
|
385 |
-
|
386 |
-
function gce_add_display_link_field() {
|
387 |
-
?>
|
388 |
-
<input type="checkbox" name="gce_options[display_link]" value="on" checked="checked" />
|
389 |
-
<span class="description"><?php _e( 'Show a link to the Google Calendar page for an event?', GCE_TEXT_DOMAIN ); ?></span>
|
390 |
-
<br />
|
391 |
-
<input type="checkbox" name="gce_options[display_link_target]" value="on" />
|
392 |
-
<span class="description"><?php _e( 'Links open in a new window / tab?', GCE_TEXT_DOMAIN ); ?></span>
|
393 |
-
<br /><br />
|
394 |
-
<span class="description"><?php _e( 'The link text to be displayed.', GCE_TEXT_DOMAIN ); ?></span>
|
395 |
-
<br />
|
396 |
-
<input type="text" name="gce_options[display_link_text]" value="More details" />
|
397 |
-
<?php
|
398 |
-
}
|
399 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/delete.php
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
//Redirect to the main plugin options page if form has been submitted
|
3 |
-
if(isset($_GET['page']) && GCE_PLUGIN_NAME == $_GET['page'] && isset($_GET['action'])){
|
4 |
-
if($_GET['action'] == 'delete' && isset($_GET['updated'])){
|
5 |
-
wp_redirect(admin_url('options-general.php?page=' . GCE_PLUGIN_NAME . '.php&updated=deleted'));
|
6 |
-
}
|
7 |
-
}
|
8 |
-
|
9 |
-
add_settings_section('gce_delete', __('Delete Feed', GCE_TEXT_DOMAIN), 'gce_delete_main_text', 'delete_feed');
|
10 |
-
//Unique ID //Title //Function //Page //Section ID
|
11 |
-
add_settings_field('gce_delete_id_field', __('Feed ID', GCE_TEXT_DOMAIN), 'gce_delete_id_field', 'delete_feed', 'gce_delete');
|
12 |
-
add_settings_field('gce_delete_title_field', __('Feed Title', GCE_TEXT_DOMAIN), 'gce_delete_title_field', 'delete_feed', 'gce_delete');
|
13 |
-
|
14 |
-
//Main text
|
15 |
-
function gce_delete_main_text(){
|
16 |
-
?>
|
17 |
-
<p><?php _e('Are you want you want to delete this feed? (Remember to remove / adjust any widgets or shortcodes associated with this feed).', GCE_TEXT_DOMAIN); ?></p>
|
18 |
-
<?php
|
19 |
-
}
|
20 |
-
|
21 |
-
//ID
|
22 |
-
function gce_delete_id_field(){
|
23 |
-
$options = get_option(GCE_OPTIONS_NAME);
|
24 |
-
$options = $options[$_GET['id']];
|
25 |
-
?>
|
26 |
-
<input type="text" disabled="disabled" value="<?php echo $options['id']; ?>" size="3" />
|
27 |
-
<input type="hidden" name="gce_options[id]" value="<?php echo $options['id']; ?>" />
|
28 |
-
<?php
|
29 |
-
}
|
30 |
-
|
31 |
-
//Title
|
32 |
-
function gce_delete_title_field(){
|
33 |
-
$options = get_option(GCE_OPTIONS_NAME);
|
34 |
-
$options = $options[$_GET['id']];
|
35 |
-
?>
|
36 |
-
<input type="text" name="gce_options[title]" disabled="disabled" value="<?php echo $options['title']; ?>" size="50" />
|
37 |
-
<?php
|
38 |
-
}
|
39 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/edit.php
DELETED
@@ -1,416 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
//Redirect to the main plugin options page if form has been submitted
|
3 |
-
if(isset($_GET['page']) && GCE_PLUGIN_NAME == $_GET['page'] && isset($_GET['action'])){
|
4 |
-
if($_GET['action'] == 'edit' && isset($_GET['updated'])){
|
5 |
-
wp_redirect(admin_url('options-general.php?page=' . GCE_PLUGIN_NAME . '.php&updated=edited'));
|
6 |
-
}
|
7 |
-
}
|
8 |
-
|
9 |
-
add_settings_section('gce_edit', __('Edit Feed', GCE_TEXT_DOMAIN), 'gce_edit_main_text', 'edit_feed');
|
10 |
-
//Unique ID //Title //Function //Page //Section ID
|
11 |
-
add_settings_field('gce_edit_id_field', __('Feed ID', GCE_TEXT_DOMAIN), 'gce_edit_id_field', 'edit_feed', 'gce_edit');
|
12 |
-
add_settings_field('gce_edit_title_field', __('Feed Title', GCE_TEXT_DOMAIN), 'gce_edit_title_field', 'edit_feed', 'gce_edit');
|
13 |
-
add_settings_field('gce_edit_url_field', __('Feed URL', GCE_TEXT_DOMAIN), 'gce_edit_url_field', 'edit_feed', 'gce_edit');
|
14 |
-
add_settings_field('gce_edit_retrieve_from_field', __('Retrieve events from', GCE_TEXT_DOMAIN), 'gce_edit_retrieve_from_field', 'edit_feed', 'gce_edit');
|
15 |
-
add_settings_field('gce_edit_retrieve_until_field', __('Retrieve events until', GCE_TEXT_DOMAIN), 'gce_edit_retrieve_until_field', 'edit_feed', 'gce_edit');
|
16 |
-
add_settings_field('gce_edit_max_events_field', __('Maximum number of events to retrieve', GCE_TEXT_DOMAIN), 'gce_edit_max_events_field', 'edit_feed', 'gce_edit');
|
17 |
-
add_settings_field('gce_edit_date_format_field', __('Date format', GCE_TEXT_DOMAIN), 'gce_edit_date_format_field', 'edit_feed', 'gce_edit');
|
18 |
-
add_settings_field('gce_edit_time_format_field', __('Time format', GCE_TEXT_DOMAIN), 'gce_edit_time_format_field', 'edit_feed', 'gce_edit');
|
19 |
-
add_settings_field('gce_edit_timezone_field', __('Timezone adjustment', GCE_TEXT_DOMAIN), 'gce_edit_timezone_field', 'edit_feed', 'gce_edit');
|
20 |
-
add_settings_field('gce_edit_cache_duration_field', __('Cache duration', GCE_TEXT_DOMAIN), 'gce_edit_cache_duration_field', 'edit_feed', 'gce_edit');
|
21 |
-
add_settings_field('gce_edit_query_field', __('Search query', GCE_TEXT_DOMAIN), 'gce_edit_query_field', 'edit_feed', 'gce_edit');
|
22 |
-
add_settings_field('gce_edit_multiple_field', __('Show multiple day events on each day?', GCE_TEXT_DOMAIN), 'gce_edit_multiple_field', 'edit_feed', 'gce_edit');
|
23 |
-
add_settings_field('gce_edit_expand_recurring_field', __( 'Expand recurring events?', GCE_TEXT_DOMAIN ), 'gce_edit_expand_recurring_field', 'edit_feed', 'gce_edit' );
|
24 |
-
|
25 |
-
add_settings_section('gce_edit_display', __('Display Options', GCE_TEXT_DOMAIN), 'gce_edit_display_main_text', 'edit_display');
|
26 |
-
add_settings_field('gce_edit_use_builder_field', __('Select display customization method', GCE_TEXT_DOMAIN), 'gce_edit_use_builder_field', 'edit_display', 'gce_edit_display');
|
27 |
-
|
28 |
-
add_settings_section('gce_edit_builder', __('Event Display Builder'), 'gce_edit_builder_main_text', 'edit_builder');
|
29 |
-
add_settings_field('gce_edit_builder_field', __('Event display builder HTML and shortcodes', GCE_TEXT_DOMAIN), 'gce_edit_builder_field', 'edit_builder', 'gce_edit_builder');
|
30 |
-
|
31 |
-
add_settings_section('gce_edit_simple_display', __('Simple Display Options'), 'gce_edit_simple_display_main_text', 'edit_simple_display');
|
32 |
-
add_settings_field('gce_edit_display_start_field', __('Display start time / date?', GCE_TEXT_DOMAIN), 'gce_edit_display_start_field', 'edit_simple_display', 'gce_edit_simple_display');
|
33 |
-
add_settings_field('gce_edit_display_end_field', __('Display end time / date?', GCE_TEXT_DOMAIN), 'gce_edit_display_end_field', 'edit_simple_display', 'gce_edit_simple_display');
|
34 |
-
add_settings_field('gce_edit_display_separator_field', __('Separator text / characters', GCE_TEXT_DOMAIN), 'gce_edit_display_separator_field', 'edit_simple_display', 'gce_edit_simple_display');
|
35 |
-
add_settings_field('gce_edit_display_location_field', __('Display location?', GCE_TEXT_DOMAIN), 'gce_edit_display_location_field', 'edit_simple_display', 'gce_edit_simple_display');
|
36 |
-
add_settings_field('gce_edit_display_desc_field', __('Display description?', GCE_TEXT_DOMAIN), 'gce_edit_display_desc_field', 'edit_simple_display', 'gce_edit_simple_display');
|
37 |
-
add_settings_field('gce_edit_display_link_field', __('Display link to event?', GCE_TEXT_DOMAIN), 'gce_edit_display_link_field', 'edit_simple_display', 'gce_edit_simple_display');
|
38 |
-
|
39 |
-
//Main text
|
40 |
-
function gce_edit_main_text(){
|
41 |
-
?>
|
42 |
-
<p><?php _e('Make any changes you require to the feed details below, then click the Save Changes button.', GCE_TEXT_DOMAIN); ?></p>
|
43 |
-
<?php
|
44 |
-
}
|
45 |
-
|
46 |
-
//ID
|
47 |
-
function gce_edit_id_field(){
|
48 |
-
$options = get_option(GCE_OPTIONS_NAME);
|
49 |
-
$options = $options[$_GET['id']];
|
50 |
-
?>
|
51 |
-
<input type="text" disabled="disabled" value="<?php echo $options['id']; ?>" size="3" />
|
52 |
-
<input type="hidden" name="gce_options[id]" value="<?php echo $options['id']; ?>" />
|
53 |
-
<?php
|
54 |
-
}
|
55 |
-
|
56 |
-
//Title
|
57 |
-
function gce_edit_title_field(){
|
58 |
-
$options = get_option(GCE_OPTIONS_NAME);
|
59 |
-
$options = $options[$_GET['id']];
|
60 |
-
?>
|
61 |
-
<span class="description"><?php _e('Anything you like. \'Upcoming Club Events\', for example.', GCE_TEXT_DOMAIN); ?></span>
|
62 |
-
<br />
|
63 |
-
<input type="text" name="gce_options[title]" value="<?php echo $options['title']; ?>" size="50" />
|
64 |
-
<?php
|
65 |
-
}
|
66 |
-
|
67 |
-
//URL
|
68 |
-
function gce_edit_url_field(){
|
69 |
-
$options = get_option(GCE_OPTIONS_NAME);
|
70 |
-
$options = $options[$_GET['id']];
|
71 |
-
?>
|
72 |
-
<span class="description"><?php _e('This will probably be something like: <code>http://www.google.com/calendar/feeds/your-email@gmail.com/public/full</code>.', GCE_TEXT_DOMAIN); ?></span>
|
73 |
-
<br />
|
74 |
-
<span class="description"><?php _e('or: <code>http://www.google.com/calendar/feeds/your-email@gmail.com/private-d65741b037h695ff274247f90746b2ty/basic</code>.', GCE_TEXT_DOMAIN); ?></span>
|
75 |
-
<br />
|
76 |
-
<input type="text" name="gce_options[url]" value="<?php echo $options['url']; ?>" size="100" />
|
77 |
-
<?php
|
78 |
-
}
|
79 |
-
|
80 |
-
//Retrieve events from
|
81 |
-
function gce_edit_retrieve_from_field(){
|
82 |
-
$options = get_option(GCE_OPTIONS_NAME);
|
83 |
-
$options = $options[$_GET['id']];
|
84 |
-
?>
|
85 |
-
<span class="description"><?php _e('The point in time at which to start retrieving events. Use the text-box to specify an additional offset from you chosen start point. The offset should be provided in seconds (3600 = 1 hour, 86400 = 1 day) and can be negative. If you have selected the \'Specific date / time\' option, enter a <a href="http://www.timestampgenerator.com" target="_blank">UNIX timestamp</a> in the text-box.', GCE_TEXT_DOMAIN); ?></span>
|
86 |
-
<br />
|
87 |
-
<select name="gce_options[retrieve_from]">
|
88 |
-
<option value="now"<?php selected($options['retrieve_from'], 'now'); ?>>Now</option>
|
89 |
-
<option value="today"<?php selected($options['retrieve_from'], 'today'); ?>>00:00 today</option>
|
90 |
-
<option value="week"<?php selected($options['retrieve_from'], 'week'); ?>>Start of current week</option>
|
91 |
-
<option value="month-start"<?php selected($options['retrieve_from'], 'month-start'); ?>>Start of current month</option>
|
92 |
-
<option value="month-end"<?php selected($options['retrieve_from'], 'month-end'); ?>>End of current month</option>
|
93 |
-
<option value="any"<?php selected($options['retrieve_from'], 'any'); ?>>The beginning of time</option>
|
94 |
-
<option value="date"<?php selected($options['retrieve_from'], 'date'); ?>>Specific date / time</option>
|
95 |
-
</select>
|
96 |
-
<input type="text" name="gce_options[retrieve_from_value]" value="<?php echo $options['retrieve_from_value']; ?>" />
|
97 |
-
<?php
|
98 |
-
}
|
99 |
-
|
100 |
-
//Retrieve events until
|
101 |
-
function gce_edit_retrieve_until_field(){
|
102 |
-
$options = get_option(GCE_OPTIONS_NAME);
|
103 |
-
$options = $options[$_GET['id']];
|
104 |
-
?>
|
105 |
-
<span class="description"><?php _e('The point in time at which to stop retrieving events. The instructions for the above option also apply here.', GCE_TEXT_DOMAIN); ?></span>
|
106 |
-
<br />
|
107 |
-
<select name="gce_options[retrieve_until]">
|
108 |
-
<option value="now"<?php selected($options['retrieve_until'], 'now'); ?>>Now</option>
|
109 |
-
<option value="today"<?php selected($options['retrieve_until'], 'today'); ?>>00:00 today</option>
|
110 |
-
<option value="week"<?php selected($options['retrieve_until'], 'week'); ?>>Start of current week</option>
|
111 |
-
<option value="month-start"<?php selected($options['retrieve_until'], 'month-start'); ?>>Start of current month</option>
|
112 |
-
<option value="month-end"<?php selected($options['retrieve_until'], 'month-end'); ?>>End of current month</option>
|
113 |
-
<option value="any"<?php selected($options['retrieve_until'], 'any'); ?>>The end of time</option>
|
114 |
-
<option value="date"<?php selected($options['retrieve_until'], 'date'); ?>>Specific date / time</option>
|
115 |
-
|
116 |
-
</select>
|
117 |
-
<input type="text" name="gce_options[retrieve_until_value]" value="<?php echo $options['retrieve_until_value']; ?>" />
|
118 |
-
<?php
|
119 |
-
}
|
120 |
-
|
121 |
-
//Max events
|
122 |
-
function gce_edit_max_events_field(){
|
123 |
-
$options = get_option(GCE_OPTIONS_NAME);
|
124 |
-
$options = $options[$_GET['id']];
|
125 |
-
?>
|
126 |
-
<span class="description"><?php _e('Set this to a few more than you actually want to display (due to caching and timezone issues). The exact number to display can be configured per shortcode / widget.', GCE_TEXT_DOMAIN); ?></span>
|
127 |
-
<br />
|
128 |
-
<input type="text" name="gce_options[max_events]" value="<?php echo $options['max_events']; ?>" size="3" />
|
129 |
-
<?php
|
130 |
-
}
|
131 |
-
|
132 |
-
//Date format
|
133 |
-
function gce_edit_date_format_field(){
|
134 |
-
$options = get_option(GCE_OPTIONS_NAME);
|
135 |
-
$options = $options[$_GET['id']];
|
136 |
-
?>
|
137 |
-
<span class="description"><?php _e('In <a href="http://php.net/manual/en/function.date.php" target="_blank">PHP date format</a>. Leave this blank if you\'d rather stick with the default format for your blog.', GCE_TEXT_DOMAIN); ?></span>
|
138 |
-
<br />
|
139 |
-
<input type="text" name="gce_options[date_format]" value="<?php echo $options['date_format']; ?>" />
|
140 |
-
<?php
|
141 |
-
}
|
142 |
-
|
143 |
-
//Time format
|
144 |
-
function gce_edit_time_format_field(){
|
145 |
-
$options = get_option(GCE_OPTIONS_NAME);
|
146 |
-
$options = $options[$_GET['id']];
|
147 |
-
?>
|
148 |
-
<span class="description"><?php _e('In <a href="http://php.net/manual/en/function.date.php" target="_blank">PHP date format</a>. Again, leave this blank to stick with the default.', GCE_TEXT_DOMAIN); ?></span>
|
149 |
-
<br />
|
150 |
-
<input type="text" name="gce_options[time_format]" value="<?php echo $options['time_format']; ?>" />
|
151 |
-
<?php
|
152 |
-
}
|
153 |
-
|
154 |
-
//Timezone offset
|
155 |
-
function gce_edit_timezone_field(){
|
156 |
-
$options = get_option(GCE_OPTIONS_NAME);
|
157 |
-
$options = $options[$_GET['id']];
|
158 |
-
require_once 'timezone-choices.php';
|
159 |
-
$timezone_list = gce_get_timezone_choices();
|
160 |
-
//Set selected="selected" for selected timezone
|
161 |
-
$timezone_list = str_replace(('<option value="' . $options['timezone'] . '"'), ('<option value="' . $options['timezone'] . '" selected="selected"'), $timezone_list);
|
162 |
-
?>
|
163 |
-
<span class="description"><?php _e('If you are having problems with dates and times displaying in the wrong timezone, select a city in your required timezone here.', GCE_TEXT_DOMAIN); ?></span>
|
164 |
-
<br />
|
165 |
-
<?php echo $timezone_list; ?>
|
166 |
-
<?php
|
167 |
-
}
|
168 |
-
|
169 |
-
//Cache duration
|
170 |
-
function gce_edit_cache_duration_field(){
|
171 |
-
$options = get_option(GCE_OPTIONS_NAME);
|
172 |
-
$options = $options[$_GET['id']];
|
173 |
-
?>
|
174 |
-
<span class="description"><?php _e('The length of time, in seconds, to cache the feed (43200 = 12 hours). If this feed changes regularly, you may want to reduce the cache duration.', GCE_TEXT_DOMAIN); ?></span>
|
175 |
-
<br />
|
176 |
-
<input type="text" name="gce_options[cache_duration]" value="<?php echo $options['cache_duration']; ?>" />
|
177 |
-
<?php
|
178 |
-
}
|
179 |
-
|
180 |
-
//Query
|
181 |
-
function gce_edit_query_field() {
|
182 |
-
$options = get_option(GCE_OPTIONS_NAME);
|
183 |
-
$options = $options[$_GET['id']];
|
184 |
-
?>
|
185 |
-
<span class="description"><?php _e( 'Search query.', GCE_TEXT_DOMAIN ); ?></span>
|
186 |
-
<br />
|
187 |
-
<input type="text" name="gce_options[query]" value="<?php echo esc_attr( $options['query'] ); ?>" size="50" />
|
188 |
-
<?php
|
189 |
-
}
|
190 |
-
|
191 |
-
//Multiple day events
|
192 |
-
function gce_edit_multiple_field(){
|
193 |
-
$options = get_option(GCE_OPTIONS_NAME);
|
194 |
-
$options = $options[$_GET['id']];
|
195 |
-
?>
|
196 |
-
<span class="description"><?php _e('Show events that span multiple days on each day that they span, rather than just the first day.', GCE_TEXT_DOMAIN); ?></span>
|
197 |
-
<br />
|
198 |
-
<input type="checkbox" name="gce_options[multiple_day]" value="true"<?php checked($options['multiple_day'], 'true'); ?> />
|
199 |
-
<br /><br />
|
200 |
-
<?php
|
201 |
-
}
|
202 |
-
|
203 |
-
//Expand recurring
|
204 |
-
function gce_edit_expand_recurring_field() {
|
205 |
-
$options = get_option(GCE_OPTIONS_NAME);
|
206 |
-
$options = $options[$_GET['id']];
|
207 |
-
?>
|
208 |
-
<span class="description"><?php _e( 'Expand recurring events?', GCE_TEXT_DOMAIN ); ?></span>
|
209 |
-
<br />
|
210 |
-
<input type="checkbox" name="gce_options[expand_recurring]" value="true"<?php checked($options['expand_recurring'], 'true'); ?> />
|
211 |
-
<br /><br />
|
212 |
-
<?php
|
213 |
-
}
|
214 |
-
|
215 |
-
|
216 |
-
//Display options
|
217 |
-
function gce_edit_display_main_text(){
|
218 |
-
?>
|
219 |
-
<p><?php _e('These settings control what information will be displayed for this feed in the tooltip (for grids), or in a list.', GCE_TEXT_DOMAIN); ?></p>
|
220 |
-
<?php
|
221 |
-
}
|
222 |
-
|
223 |
-
function gce_edit_use_builder_field(){
|
224 |
-
$options = get_option(GCE_OPTIONS_NAME);
|
225 |
-
$options = $options[$_GET['id']];
|
226 |
-
?>
|
227 |
-
<span class="description"><?php _e('It is recommended that you use the event display builder option, as it provides much more flexibility than the simple display options. The event display builder can do everything the simple display options can, plus lots more!', GCE_TEXT_DOMAIN); ?></span>
|
228 |
-
<br />
|
229 |
-
<select name="gce_options[use_builder]">
|
230 |
-
<option value="true"<?php selected($options['use_builder'], 'true'); ?>><?php _e('Event display builder', GCE_TEXT_DOMAIN); ?></option>
|
231 |
-
<option value="false"<?php selected($options['use_builder'], 'false'); ?>><?php _e('Simple display options', GCE_TEXT_DOMAIN); ?></option>
|
232 |
-
</select>
|
233 |
-
<?php
|
234 |
-
}
|
235 |
-
|
236 |
-
//Event display builder
|
237 |
-
function gce_edit_builder_main_text(){
|
238 |
-
?>
|
239 |
-
<p class="gce-event-builder"><?php _e('Use the event display builder to customize how event information will be displayed in the grid tooltips and in lists. Use HTML and the shortcodes (explained below) to display the information you require. A basic example display format is provided as a starting point. For more information, take a look at the <a href="http://www.rhanney.co.uk/plugins/google-calendar-events/event-display-builder" target="_blank">event display builder guide</a>.', GCE_TEXT_DOMAIN); ?></p>
|
240 |
-
<?php
|
241 |
-
}
|
242 |
-
|
243 |
-
function gce_edit_builder_field(){
|
244 |
-
$options = get_option(GCE_OPTIONS_NAME);
|
245 |
-
$options = $options[$_GET['id']];
|
246 |
-
?>
|
247 |
-
<textarea name="gce_options[builder]" rows="10" cols="80"><?php echo $options['builder']; ?></textarea>
|
248 |
-
<br />
|
249 |
-
<p style="margin-top:20px;"><?php _e('(More information on all of the below shortcodes and attributes, and working examples, can be found in the <a href="http://www.rhanney.co.uk/plugins/google-calendar-events/event-display-builder" target="_blank">event display builder guide</a>)', GCE_TEXT_DOMAIN); ?></p>
|
250 |
-
<h4><?php _e('Event information shortcodes:', GCE_TEXT_DOMAIN); ?></h4>
|
251 |
-
<ul>
|
252 |
-
<li><code>[event-title]</code><span class="description"> - <?php _e( 'The event title (possible attributes: <code>html</code>, <code>markdown</code>)', GCE_TEXT_DOMAIN ); ?></span></li>
|
253 |
-
<li><code>[start-time]</code><span class="description"> - <?php _e( 'The event start time. Will use the time format specified in the above settings', GCE_TEXT_DOMAIN ); ?></span></li>
|
254 |
-
<li><code>[start-date]</code><span class="description"> - <?php _e( 'The event start date. Will use the date format specified in the above settings', GCE_TEXT_DOMAIN ); ?></span></li>
|
255 |
-
<li><code>[start-custom]</code><span class="description"> - <?php _e( 'The event start date / time. Will use the format specified in the <code>format</code> attribute (possible attributes: <code>format</code>)', GCE_TEXT_DOMAIN ); ?></span></li>
|
256 |
-
<li><code>[start-human]</code><span class="description"> - <?php _e( '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\' (possible attributes: <code>precision</code>)', GCE_TEXT_DOMAIN ); ?></span></li>
|
257 |
-
<li><code>[end-time]</code><span class="description"> - <?php _e( 'The event end time. Will use the time format specified in the above settings', GCE_TEXT_DOMAIN ); ?></span></li>
|
258 |
-
<li><code>[end-date]</code><span class="description"> - <?php _e( 'The event end date. Will use the date format specified in the above settings', GCE_TEXT_DOMAIN ); ?></span></li>
|
259 |
-
<li><code>[end-custom]</code><span class="description"> - <?php _e( 'The event end date / time. Will use the format specified in the <code>format</code> attribute (possible attributes: <code>format</code>)', GCE_TEXT_DOMAIN ); ?></span></li>
|
260 |
-
<li><code>[end-human]</code><span class="description"> - <?php _e( 'The difference between the end time of the event and the time now, in human-readable format (possible attributes: <code>precision</code>)', GCE_TEXT_DOMAIN ); ?></span></li>
|
261 |
-
<li><code>[location]</code><span class="description"> - <?php _e( 'The event location (possible attributes: <code>html</code>, <code>markdown</code>)', GCE_TEXT_DOMAIN ); ?></span></li>
|
262 |
-
<li><code>[maps-link]…[/maps-link]</code><span class="description"> - <?php _e( 'Anything between the opening and closing shortcode tags (inlcuding further shortcodes) will be linked to Google Maps, using the event location as a search parameter (possible attributes: <code>newwindow</code>)', GCE_TEXT_DOMAIN ); ?></span></li>
|
263 |
-
<li><code>[description]</code><span class="description"> - <?php _e( 'The event description (possible attributes: <code>html</code>, <code>markdown</code>, <code>limit</code>)', GCE_TEXT_DOMAIN ); ?></span></li>
|
264 |
-
<li><code>[link]…[/link]</code><span class="description"> - <?php _e( 'Anything between the opening and closing shortcode tags (inlcuding further shortcodes) will be linked to the Google Calendar page for the event (possible attributes: <code>newwindow</code>)', GCE_TEXT_DOMAIN ); ?></span></li>
|
265 |
-
<li><code>[url]</code><span class="description"> - <?php _e( 'The raw URL to the Google Calendar page for the event', GCE_TEXT_DOMAIN ); ?></span></li>
|
266 |
-
<li><code>[length]</code><span class="description"> - <?php _e( 'The length of the event, in human-readable format (possible attributes: <code>precision</code>)', GCE_TEXT_DOMAIN ); ?></span></li>
|
267 |
-
<li><code>[event-num]</code><span class="description"> - <?php _e( 'The position of the event in the current list, or the position of the event in the current month (for grids)', GCE_TEXT_DOMAIN ); ?></span></li>
|
268 |
-
<li><code>[event-id]</code><span class="description"> - <?php _e( 'The event UID (a unique identifier assigned to the event by Google)', GCE_TEXT_DOMAIN ); ?></span></li>
|
269 |
-
</ul>
|
270 |
-
<h4><?php _e( 'Feed information shortcodes:', GCE_TEXT_DOMAIN ); ?></h4>
|
271 |
-
<ul>
|
272 |
-
<li><code>[feed-title]</code><span class="description"> - <?php _e( 'The title of the feed from which the event comes', GCE_TEXT_DOMAIN ); ?></span></li>
|
273 |
-
<li><code>[feed-id]</code><span class="description"> - <?php _e( 'The ID of the feed from which the event comes', GCE_TEXT_DOMAIN ); ?></span></li>
|
274 |
-
<li><code>[cal-id]</code><span class="description"> - <?php _e( 'The calendar ID (a unique identifier assigned to the calendar by Google)', GCE_TEXT_DOMAIN ); ?></span></li>
|
275 |
-
</ul>
|
276 |
-
<h4><?php _e( 'Conditional shortcodes:', GCE_TEXT_DOMAIN ); ?></h4>
|
277 |
-
<p class="description" style="margin-bottom:18px;"><?php _e( 'Anything entered between the opening and closing tags of each of the following shortcodes will only be displayed if its condition (below) is met.', GCE_TEXT_DOMAIN ); ?></p>
|
278 |
-
<ul>
|
279 |
-
<li><code>[if-all-day]…[/if-all-day]</code><span class="description"> - <?php _e( 'The event is an all-day event', GCE_TEXT_DOMAIN ); ?></span></li>
|
280 |
-
<li><code>[if-not-all-day]…[/if-not-all-day]</code><span class="description"> - <?php _e( 'The event is not an all-day event', GCE_TEXT_DOMAIN ); ?></span></li>
|
281 |
-
<li><code>[if-title]…[/if-title]</code><span class="description"> - <?php _e( 'The event has a title', GCE_TEXT_DOMAIN ); ?></span></li>
|
282 |
-
<li><code>[if-description]…[/if-description]</code><span class="description"> - <?php _e( 'The event has a description', GCE_TEXT_DOMAIN ); ?></span></li>
|
283 |
-
<li><code>[if-location]…[/if-location]</code><span class="description"> - <?php _e( 'The event has a location', GCE_TEXT_DOMAIN ); ?></span></li>
|
284 |
-
<li><code>[if-tooltip]…[/if-tooltip]</code><span class="description"> - <?php _e( 'The event is to be displayed in a tooltip (not a list)', GCE_TEXT_DOMAIN ); ?></span></li>
|
285 |
-
<li><code>[if-list]…[/if-list]</code><span class="description"> - <?php _e( 'The event is to be displayed in a list (not a tooltip)', GCE_TEXT_DOMAIN ); ?></span></li>
|
286 |
-
<li><code>[if-now]…[/if-now]</code><span class="description"> - <?php _e( 'The event is taking place now (after the start time, but before the end time)', GCE_TEXT_DOMAIN ); ?></span></li>
|
287 |
-
<li><code>[if-not-now]…[/if-not-now]</code><span class="description"> - <?php _e( 'The event is not taking place now (may have ended or not yet started)', GCE_TEXT_DOMAIN ); ?></span></li>
|
288 |
-
<li><code>[if-started]…[/if-started]</code><span class="description"> - <?php _e( 'The event has started (even if it has also ended)', GCE_TEXT_DOMAIN ); ?></span></li>
|
289 |
-
<li><code>[if-not-started]…[/if-not-started]</code><span class="description"> - <?php _e( 'The event has not started', GCE_TEXT_DOMAIN ); ?></span></li>
|
290 |
-
<li><code>[if-ended]…[/if-ended]</code><span class="description"> - <?php _e( 'The event has ended', GCE_TEXT_DOMAIN ); ?></span></li>
|
291 |
-
<li><code>[if-not-ended]…[/if-not-ended]</code><span class="description"> - <?php _e( 'The event has not ended (even if it hasn\'t started)', GCE_TEXT_DOMAIN ); ?></span></li>
|
292 |
-
<li><code>[if-first]…[/if-first]</code><span class="description"> - <?php _e( 'The event is the first of the day', GCE_TEXT_DOMAIN ); ?></span></li>
|
293 |
-
<li><code>[if-not-first]…[/if-not-first]</code><span class="description"> - <?php _e( 'The event is not the first of the day', GCE_TEXT_DOMAIN ); ?></span></li>
|
294 |
-
<li><code>[if-multi-day]…[/if-multi-day]</code><span class="description"> - <?php _e( 'The event spans multiple days', GCE_TEXT_DOMAIN ); ?></span></li>
|
295 |
-
<li><code>[if-single-day]…[/if-single-day]</code><span class="description"> - <?php _e( 'The event does not span multiple days', GCE_TEXT_DOMAIN ); ?></span></li>
|
296 |
-
<li><code>[if-recurring]…[/if-recurring]</code><span class="description"> - <?php _e( 'The event is recurring', GCE_TEXT_DOMAIN ); ?></span></li>
|
297 |
-
<li><code>[if-not-recurring]…[/if-not-recurring]</code><span class="description"> - <?php _e( 'The event is not recurring', GCE_TEXT_DOMAIN ); ?></span></li>
|
298 |
-
</ul>
|
299 |
-
<h4><?php _e( 'Attributes:', GCE_TEXT_DOMAIN ); ?></h4>
|
300 |
-
<p class="description" style="margin-bottom:18px;"><?php _e( 'The possible attributes mentioned above are explained here:', GCE_TEXT_DOMAIN ); ?></p>
|
301 |
-
<ul>
|
302 |
-
<li><code>html</code><span class="description"> - <?php _e( 'Whether or not to parse HTML that has been entered in the relevant field. Can be <code>true</code> or <code>false</code>', GCE_TEXT_DOMAIN ); ?></span></li>
|
303 |
-
<li><code>markdown</code><span class="description"> - <?php _e( 'Whether or not to parse <a href="http://daringfireball.net/projects/markdown" target="_blank">Markdown</a> that has been entered in the relevant field. <a href="http://michelf.com/projects/php-markdown" target="_blank">PHP Markdown</a> must be installed for this to work. Can be <code>true</code> or <code>false</code>', GCE_TEXT_DOMAIN ); ?></span></li>
|
304 |
-
<li><code>limit</code><span class="description"> - <?php _e( 'The word limit for the field. Should be specified as a positive integer', GCE_TEXT_DOMAIN ); ?></span></li>
|
305 |
-
<li><code>format</code><span class="description"> - <?php _e( 'The date / time format to use. Should specified as a <a href="http://php.net/manual/en/function.date.php" target="_blank">PHP date format</a> string', GCE_TEXT_DOMAIN ); ?></span></li>
|
306 |
-
<li><code>newwindow</code><span class="description"> - <?php _e( 'Whether or not the link should open in a new window / tab. Can be <code>true</code> or <code>false</code>', GCE_TEXT_DOMAIN ); ?></span></li>
|
307 |
-
<li><code>precision</code><span class="description"> - <?php _e( 'How precise to be when displaying a time difference in human-readable format. Should be specified as a positive integer', GCE_TEXT_DOMAIN ); ?></span></li>
|
308 |
-
<li><code>offset</code><span class="description"> - <?php _e( 'An offset (in seconds) to apply to start / end times before display. Should be specified as a (positive or negative) integer', GCE_TEXT_DOMAIN ); ?></span></li>
|
309 |
-
<li><code>autolink</code><span class="description"> - <?php _e( 'Whether or not to automatically convert URLs in the description to links. Can be <code>true</code> or <code>false</code>', GCE_TEXT_DOMAIN ); ?></span></li>
|
310 |
-
</ul>
|
311 |
-
<?php
|
312 |
-
}
|
313 |
-
|
314 |
-
//Simple display options
|
315 |
-
function gce_edit_simple_display_main_text(){
|
316 |
-
?>
|
317 |
-
<p class="gce-simple-display-options"><?php _e('You can use some HTML in the text fields, but ensure it is valid or things might go wonky. Text fields can be empty too.', GCE_TEXT_DOMAIN); ?></p>
|
318 |
-
<?php
|
319 |
-
}
|
320 |
-
|
321 |
-
function gce_edit_display_start_field(){
|
322 |
-
$options = get_option(GCE_OPTIONS_NAME);
|
323 |
-
$options = $options[$_GET['id']];
|
324 |
-
?>
|
325 |
-
<span class="description"><?php _e('Select how to display the start date / time.', GCE_TEXT_DOMAIN); ?></span>
|
326 |
-
<br />
|
327 |
-
<select name="gce_options[display_start]">
|
328 |
-
<option value="none"<?php selected($options['display_start'], 'none'); ?>><?php _e('Don\'t display start time or date', GCE_TEXT_DOMAIN); ?></option>
|
329 |
-
<option value="time"<?php selected($options['display_start'], 'time'); ?>><?php _e('Display start time', GCE_TEXT_DOMAIN); ?></option>
|
330 |
-
<option value="date"<?php selected($options['display_start'], 'date'); ?>><?php _e('Display start date', GCE_TEXT_DOMAIN); ?></option>
|
331 |
-
<option value="time-date"<?php selected($options['display_start'], 'time-date'); ?>><?php _e('Display start time and date (in that order)', GCE_TEXT_DOMAIN); ?></option>
|
332 |
-
<option value="date-time"<?php selected($options['display_start'], 'date-time'); ?>><?php _e('Display start date and time (in that order)', GCE_TEXT_DOMAIN); ?></option>
|
333 |
-
</select>
|
334 |
-
<br /><br />
|
335 |
-
<span class="description"><?php _e('Text to display before the start time.', GCE_TEXT_DOMAIN); ?></span>
|
336 |
-
<br />
|
337 |
-
<input type="text" name="gce_options[display_start_text]" value="<?php echo $options['display_start_text']; ?>" />
|
338 |
-
<?php
|
339 |
-
}
|
340 |
-
|
341 |
-
function gce_edit_display_end_field(){
|
342 |
-
$options = get_option(GCE_OPTIONS_NAME);
|
343 |
-
$options = $options[$_GET['id']];
|
344 |
-
?>
|
345 |
-
<span class="description"><?php _e('Select how to display the end date / time.', GCE_TEXT_DOMAIN); ?></span>
|
346 |
-
<br />
|
347 |
-
<select name="gce_options[display_end]">
|
348 |
-
<option value="none"<?php selected($options['display_end'], 'none'); ?>><?php _e('Don\'t display end time or date', GCE_TEXT_DOMAIN); ?></option>
|
349 |
-
<option value="time"<?php selected($options['display_end'], 'time'); ?>><?php _e('Display end time', GCE_TEXT_DOMAIN); ?></option>
|
350 |
-
<option value="date"<?php selected($options['display_end'], 'date'); ?>><?php _e('Display end date', GCE_TEXT_DOMAIN); ?></option>
|
351 |
-
<option value="time-date"<?php selected($options['display_end'], 'time-date'); ?>><?php _e('Display end time and date (in that order)', GCE_TEXT_DOMAIN); ?></option>
|
352 |
-
<option value="date-time"<?php selected($options['display_end'], 'date-time'); ?>><?php _e('Display end date and time (in that order)', GCE_TEXT_DOMAIN); ?></option>
|
353 |
-
</select>
|
354 |
-
<br /><br />
|
355 |
-
<span class="description"><?php _e('Text to display before the end time.', GCE_TEXT_DOMAIN); ?></span>
|
356 |
-
<br />
|
357 |
-
<input type="text" name="gce_options[display_end_text]" value="<?php echo $options['display_end_text']; ?>" />
|
358 |
-
<?php
|
359 |
-
}
|
360 |
-
|
361 |
-
function gce_edit_display_separator_field(){
|
362 |
-
$options = get_option(GCE_OPTIONS_NAME);
|
363 |
-
$options = $options[$_GET['id']];
|
364 |
-
?>
|
365 |
-
<span class="description"><?php _e('If you have chosen to display both the time and date above, enter the text / characters to display between the time and date here (including any spaces).', GCE_TEXT_DOMAIN); ?></span>
|
366 |
-
<br />
|
367 |
-
<input type="text" name="gce_options[display_separator]" value="<?php echo $options['display_separator']; ?>" />
|
368 |
-
<?php
|
369 |
-
}
|
370 |
-
|
371 |
-
function gce_edit_display_location_field(){
|
372 |
-
$options = get_option(GCE_OPTIONS_NAME);
|
373 |
-
$options = $options[$_GET['id']];
|
374 |
-
?>
|
375 |
-
<input type="checkbox" name="gce_options[display_location]"<?php checked($options['display_location'], 'on'); ?> value="on" />
|
376 |
-
<span class="description"><?php _e('Show the location of events?', GCE_TEXT_DOMAIN); ?></span>
|
377 |
-
<br /><br />
|
378 |
-
<span class="description"><?php _e('Text to display before the location.', GCE_TEXT_DOMAIN); ?></span>
|
379 |
-
<br />
|
380 |
-
<input type="text" name="gce_options[display_location_text]" value="<?php echo stripslashes(esc_html($options['display_location_text'])); ?>" />
|
381 |
-
<?php
|
382 |
-
}
|
383 |
-
|
384 |
-
function gce_edit_display_desc_field(){
|
385 |
-
$options = get_option(GCE_OPTIONS_NAME);
|
386 |
-
$options = $options[$_GET['id']];
|
387 |
-
?>
|
388 |
-
<input type="checkbox" name="gce_options[display_desc]"<?php checked($options['display_desc'], 'on'); ?> value="on" />
|
389 |
-
<span class="description"><?php _e('Show the description of events? (URLs in the description will be made into links).', GCE_TEXT_DOMAIN); ?></span>
|
390 |
-
<br /><br />
|
391 |
-
<span class="description"><?php _e('Text to display before the description.', GCE_TEXT_DOMAIN); ?></span>
|
392 |
-
<br />
|
393 |
-
<input type="text" name="gce_options[display_desc_text]" value="<?php echo stripslashes(esc_html($options['display_desc_text'])); ?>" />
|
394 |
-
<br /><br />
|
395 |
-
<span class="description"><?php _e('Maximum number of words to show from description. Leave blank for no limit.', GCE_TEXT_DOMAIN); ?></span>
|
396 |
-
<br />
|
397 |
-
<input type="text" name="gce_options[display_desc_limit]" value="<?php echo $options['display_desc_limit']; ?>" size="3" />
|
398 |
-
<?php
|
399 |
-
}
|
400 |
-
|
401 |
-
function gce_edit_display_link_field(){
|
402 |
-
$options = get_option(GCE_OPTIONS_NAME);
|
403 |
-
$options = $options[$_GET['id']];
|
404 |
-
?>
|
405 |
-
<input type="checkbox" name="gce_options[display_link]"<?php checked($options['display_link'], 'on'); ?> value="on" />
|
406 |
-
<span class="description"><?php _e('Show a link to the Google Calendar page for an event?', GCE_TEXT_DOMAIN); ?></span>
|
407 |
-
<br />
|
408 |
-
<input type="checkbox" name="gce_options[display_link_target]"<?php checked($options['display_link_target'], 'on'); ?> value="on" />
|
409 |
-
<span class="description"><?php _e('Links open in a new window / tab?', GCE_TEXT_DOMAIN); ?></span>
|
410 |
-
<br /><br />
|
411 |
-
<span class="description"><?php _e('The link text to be displayed.', GCE_TEXT_DOMAIN); ?></span>
|
412 |
-
<br />
|
413 |
-
<input type="text" name="gce_options[display_link_text]" value="<?php echo stripslashes(esc_html($options['display_link_text'])); ?>" />
|
414 |
-
<?php
|
415 |
-
}
|
416 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/main.php
DELETED
@@ -1,119 +0,0 @@
|
|
1 |
-
<div class="wrap">
|
2 |
-
<h3><?php _e('Add a New Feed', GCE_TEXT_DOMAIN); ?></h3>
|
3 |
-
|
4 |
-
<a href="<?php echo admin_url('options-general.php?page=' . GCE_PLUGIN_NAME . '.php&action=add'); ?>" class="button-secondary" title="<?php _e('Click here to add a new feed', GCE_TEXT_DOMAIN); ?>"><?php _e('Add Feed', GCE_TEXT_DOMAIN); ?></a>
|
5 |
-
|
6 |
-
<br /><br />
|
7 |
-
<h3><?php _e('Current Feeds', GCE_TEXT_DOMAIN); ?></h3>
|
8 |
-
|
9 |
-
<?php
|
10 |
-
//Get saved feed options
|
11 |
-
$options = get_option(GCE_OPTIONS_NAME);
|
12 |
-
//If there are no saved feeds
|
13 |
-
if(empty($options)){
|
14 |
-
?>
|
15 |
-
|
16 |
-
<p><?php _e('You haven\'t added any Google Calendar feeds yet.', GCE_TEXT_DOMAIN); ?></p>
|
17 |
-
|
18 |
-
<?php //If there are saved feeds, display them ?>
|
19 |
-
<?php }else{ ?>
|
20 |
-
|
21 |
-
<table class="widefat">
|
22 |
-
<thead>
|
23 |
-
<tr>
|
24 |
-
<th scope="col"><?php _e('ID', GCE_TEXT_DOMAIN); ?></th>
|
25 |
-
<th scope="col"><?php _e('Title', GCE_TEXT_DOMAIN); ?></th>
|
26 |
-
<th scope="col"><?php _e('URL', GCE_TEXT_DOMAIN); ?></th>
|
27 |
-
<th scope="col"></th>
|
28 |
-
</tr>
|
29 |
-
</thead>
|
30 |
-
<tfoot>
|
31 |
-
<tr>
|
32 |
-
<th scope="col"><?php _e('ID', GCE_TEXT_DOMAIN); ?></th>
|
33 |
-
<th scope="col"><?php _e('Title', GCE_TEXT_DOMAIN); ?></th>
|
34 |
-
<th scope="col"><?php _e('URL', GCE_TEXT_DOMAIN); ?></th>
|
35 |
-
<th scope="col"></th>
|
36 |
-
</tr>
|
37 |
-
</tfoot>
|
38 |
-
|
39 |
-
<tbody>
|
40 |
-
<?php
|
41 |
-
foreach($options as $key => $event){ ?>
|
42 |
-
<tr>
|
43 |
-
<td><?php echo $key; ?></td>
|
44 |
-
<td><?php echo $event['title']; ?></td>
|
45 |
-
<td><?php echo $event['url']; ?></td>
|
46 |
-
<td align="right">
|
47 |
-
<a href="<?php echo admin_url('options-general.php?page=' . GCE_PLUGIN_NAME . '.php&action=refresh&id=' . $key); ?>"><?php _e('Refresh', GCE_TEXT_DOMAIN); ?></a> | <a href="<?php echo admin_url('options-general.php?page=' . GCE_PLUGIN_NAME . '.php&action=edit&id=' . $key); ?>"><?php _e('Edit', GCE_TEXT_DOMAIN); ?></a> | <a href="<?php echo admin_url('options-general.php?page=' . GCE_PLUGIN_NAME . '.php&action=delete&id=' . $key); ?>"><?php _e('Delete', GCE_TEXT_DOMAIN); ?></a>
|
48 |
-
</td>
|
49 |
-
</tr>
|
50 |
-
<?php } ?>
|
51 |
-
</tbody>
|
52 |
-
|
53 |
-
</table>
|
54 |
-
|
55 |
-
<?php }
|
56 |
-
//Get saved general options
|
57 |
-
$options = get_option(GCE_GENERAL_OPTIONS_NAME);
|
58 |
-
?>
|
59 |
-
|
60 |
-
<br />
|
61 |
-
<h3><?php _e('General Options', GCE_TEXT_DOMAIN); ?></h3>
|
62 |
-
|
63 |
-
<table class="form-table">
|
64 |
-
<tr>
|
65 |
-
<th scope="row"><?php _e('Custom stylesheet URL', GCE_TEXT_DOMAIN); ?></th>
|
66 |
-
<td>
|
67 |
-
<span class="description"><?php _e('If you want to alter the default plugin styling, create a new stylesheet on your server (not in the <code>google-calendar-events</code> directory) and then enter its URL below.', GCE_TEXT_DOMAIN); ?></span>
|
68 |
-
<br />
|
69 |
-
<input type="text" name="gce_general[stylesheet]" value="<?php echo $options['stylesheet']; ?>" size="100" />
|
70 |
-
</td>
|
71 |
-
</tr><tr>
|
72 |
-
<th scope="row"><?php _e('Add JavaScript to footer?', GCE_TEXT_DOMAIN); ?></th>
|
73 |
-
<td>
|
74 |
-
<span class="description"><?php _e('If you are having issues with tooltips not appearing or the AJAX functionality not working, try ticking the checkbox below.', GCE_TEXT_DOMAIN); ?></span>
|
75 |
-
<br />
|
76 |
-
<input type="checkbox" name="gce_general[javascript]"<?php checked($options['javascript'], true); ?> value="on" />
|
77 |
-
</td>
|
78 |
-
</tr><tr>
|
79 |
-
<th scope="row"><?php _e('Loading text', GCE_TEXT_DOMAIN); ?></th>
|
80 |
-
<td>
|
81 |
-
<span class="description"><?php _e('Text to display while calendar data is loading (on AJAX requests).', GCE_TEXT_DOMAIN); ?></span>
|
82 |
-
<br />
|
83 |
-
<input type="text" name="gce_general[loading]" value="<?php echo $options['loading']; ?>" />
|
84 |
-
</td>
|
85 |
-
</tr><tr>
|
86 |
-
<th scope="row"><?php _e('Error message', GCE_TEXT_DOMAIN); ?></th>
|
87 |
-
<td>
|
88 |
-
<span class="description"><?php _e('An error message to display to non-admin users if events cannot be displayed for any reason (admins will see a message indicating the cause of the problem).', GCE_TEXT_DOMAIN); ?></span>
|
89 |
-
<br />
|
90 |
-
<input type="text" name="gce_general[error]" value="<?php echo $options['error']; ?>" size="100" />
|
91 |
-
</td>
|
92 |
-
</tr><tr>
|
93 |
-
<th scope="row"><?php _e('No events message', GCE_TEXT_DOMAIN); ?></th>
|
94 |
-
<td>
|
95 |
-
<span class="description"><?php _e('An message to display when there are currently no events to show.', GCE_TEXT_DOMAIN); ?></span>
|
96 |
-
<br />
|
97 |
-
<input type="text" name="gce_general[no_events]" value="<?php echo $options['no_events']; ?>" size="100" />
|
98 |
-
</td>
|
99 |
-
</tr><tr>
|
100 |
-
<th scope="row"><?php _e('Optimise event retrieval?', GCE_TEXT_DOMAIN); ?></th>
|
101 |
-
<td>
|
102 |
-
<span class="description"><?php _e('If this option is enabled, the plugin will use an experimental feature of the Google Data API, which can improve performance significantly, especially with large numbers of events. Google could potentially remove / change this feature at any time.', GCE_TEXT_DOMAIN); ?></span>
|
103 |
-
<br />
|
104 |
-
<input type="checkbox" name="gce_general[fields]"<?php checked($options['fields'], true); ?> value="on" />
|
105 |
-
</td>
|
106 |
-
</tr><tr>
|
107 |
-
<th scope="row"><?php _e('Use old styles?', GCE_TEXT_DOMAIN); ?></th>
|
108 |
-
<td>
|
109 |
-
<span class="description"><?php _e('Some CSS changes were made in version 0.7. If this option is enabled, the old CSS will still be added along with the main stylesheet. You should consider updating your stylesheet so that you don\'t need this enabled.', GCE_TEXT_DOMAIN); ?></span>
|
110 |
-
<br />
|
111 |
-
<input type="checkbox" name="gce_general[old_stylesheet]"<?php checked($options['old_stylesheet'], true); ?> value="on" />
|
112 |
-
</td>
|
113 |
-
</tr>
|
114 |
-
</table>
|
115 |
-
|
116 |
-
<br />
|
117 |
-
|
118 |
-
<input type="submit" class="button-primary" value="<?php _e('Save', GCE_TEXT_DOMAIN); ?>" />
|
119 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/refresh.php
DELETED
@@ -1,40 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
//Redirect to the main plugin options page if form has been submitted
|
3 |
-
if( isset( $_GET['page']) && GCE_PLUGIN_NAME == $_GET['page'] && isset($_GET['action'] ) ) {
|
4 |
-
if ( 'refresh' == $_GET['action'] && isset( $_GET['updated'] ) ) {
|
5 |
-
wp_redirect( admin_url( 'options-general.php?page=' . GCE_PLUGIN_NAME . '.php&updated=refreshed' ) );
|
6 |
-
}
|
7 |
-
}
|
8 |
-
|
9 |
-
add_settings_section( 'gce_refresh', __( 'Refresh Feed Cache', GCE_TEXT_DOMAIN ), 'gce_refresh_main_text', 'refresh_feed' );
|
10 |
-
//Unique ID //Title //Function //Page //Section ID
|
11 |
-
add_settings_field( 'gce_refresh_id_field', __( 'Feed ID', GCE_TEXT_DOMAIN ), 'gce_refresh_id_field', 'refresh_feed', 'gce_refresh' );
|
12 |
-
add_settings_field( 'gce_refresh_title_field', __( 'Feed Title', GCE_TEXT_DOMAIN ), 'gce_refresh_title_field', 'refresh_feed', 'gce_refresh' );
|
13 |
-
|
14 |
-
//Main text
|
15 |
-
function gce_refresh_main_text() {
|
16 |
-
?>
|
17 |
-
<p><?php _e( 'The plugin will automatically refresh the cache when it expires, but you can manually clear the cache now by clicking the button below.', GCE_TEXT_DOMAIN ); ?></p>
|
18 |
-
<p><?php _e( 'Are you sure you want to clear the cached data for this feed?', GCE_TEXT_DOMAIN ); ?></p>
|
19 |
-
<?php
|
20 |
-
}
|
21 |
-
|
22 |
-
//ID
|
23 |
-
function gce_refresh_id_field() {
|
24 |
-
$options = get_option( GCE_OPTIONS_NAME );
|
25 |
-
$options = $options[$_GET['id']];
|
26 |
-
?>
|
27 |
-
<input type="text" disabled="disabled" value="<?php echo $options['id']; ?>" size="3" />
|
28 |
-
<input type="hidden" name="gce_options[id]" value="<?php echo $options['id']; ?>" />
|
29 |
-
<?php
|
30 |
-
}
|
31 |
-
|
32 |
-
//Title
|
33 |
-
function gce_refresh_title_field() {
|
34 |
-
$options = get_option( GCE_OPTIONS_NAME );
|
35 |
-
$options = $options[$_GET['id']];
|
36 |
-
?>
|
37 |
-
<input type="text" name="gce_options[title]" disabled="disabled" value="<?php echo $options['title']; ?>" size="50" />
|
38 |
-
<?php
|
39 |
-
}
|
40 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/icon-128x128.png
ADDED
Binary file
|
assets/icon-256x256.png
ADDED
Binary file
|
class-google-calendar-events-admin.php
ADDED
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Google Calendar Events Admin
|
4 |
+
*
|
5 |
+
* @package GCE Admin
|
6 |
+
* @author Phil Derksen <pderksen@gmail.com>, Nick Young <mycorpweb@gmail.com>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @link http://philderksen.com
|
9 |
+
* @copyright 2014 Phil Derksen
|
10 |
+
*/
|
11 |
+
|
12 |
+
|
13 |
+
class Google_Calendar_Events_Admin {
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Instance of this class.
|
17 |
+
*
|
18 |
+
* @since 2.0.0
|
19 |
+
*
|
20 |
+
* @var object
|
21 |
+
*/
|
22 |
+
protected static $instance = null;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Slug of the plugin screen.
|
26 |
+
*
|
27 |
+
* @since 2.0.0
|
28 |
+
*
|
29 |
+
* @var string
|
30 |
+
*/
|
31 |
+
protected $plugin_screen_hook_suffix = null;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Initialize the plugin by loading admin scripts & styles and adding a
|
35 |
+
* settings page and menu.
|
36 |
+
*
|
37 |
+
* @since 2.0.0
|
38 |
+
*/
|
39 |
+
private function __construct() {
|
40 |
+
|
41 |
+
$plugin = Google_Calendar_Events::get_instance();
|
42 |
+
$this->plugin_slug = $plugin->get_plugin_slug();
|
43 |
+
|
44 |
+
add_filter( 'plugin_action_links_' . plugin_basename( plugin_dir_path( __FILE__ ) . $this->plugin_slug . '.php' ), array( $this, 'add_action_links' ) );
|
45 |
+
|
46 |
+
// Setup admin side constants
|
47 |
+
add_action( 'init', array( $this, 'define_admin_constants' ) );
|
48 |
+
|
49 |
+
// Add admin styles
|
50 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) );
|
51 |
+
|
52 |
+
// Add admin scripts
|
53 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
|
54 |
+
|
55 |
+
// Add the options page and menu item.
|
56 |
+
add_action( 'admin_menu', array( $this, 'add_plugin_admin_menu' ), 2 );
|
57 |
+
}
|
58 |
+
|
59 |
+
public function add_plugin_admin_menu() {
|
60 |
+
// Add Help submenu page
|
61 |
+
$this->plugin_screen_hook_suffix[] = add_submenu_page(
|
62 |
+
'edit.php?post_type=gce_feed',
|
63 |
+
__( 'General Settings', 'gce' ),
|
64 |
+
__( 'General Settings', 'gce' ),
|
65 |
+
'manage_options',
|
66 |
+
$this->plugin_slug . '_general_settings',
|
67 |
+
array( $this, 'display_admin_page' )
|
68 |
+
);
|
69 |
+
}
|
70 |
+
|
71 |
+
public function display_admin_page() {
|
72 |
+
include_once( 'views/admin/admin.php' );
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Enqueue scripts for the admin area
|
77 |
+
*
|
78 |
+
* @since 2.0.0
|
79 |
+
*/
|
80 |
+
public static function enqueue_admin_scripts() {
|
81 |
+
|
82 |
+
wp_enqueue_script( 'jquery' );
|
83 |
+
|
84 |
+
wp_enqueue_script( 'jquery-ui-datepicker' );
|
85 |
+
|
86 |
+
wp_enqueue_script( 'gce-admin', plugins_url( 'js/admin.js', __FILE__ ), array( 'jquery' ), null, true );
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Enqueue styles for the admin area
|
91 |
+
*
|
92 |
+
* @since 2.0.0
|
93 |
+
*/
|
94 |
+
public static function enqueue_admin_styles() {
|
95 |
+
|
96 |
+
wp_enqueue_style( 'jquery-ui-datepicker-css', plugins_url( 'css/jquery-ui-1.10.4.custom.min.css', __FILE__ ) );
|
97 |
+
|
98 |
+
wp_enqueue_style( 'gce-admin', plugins_url( 'css/admin.css', __FILE__ ) );
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Define constants that will be used throughout admin specific code
|
103 |
+
*
|
104 |
+
* @since 2.0.0
|
105 |
+
*/
|
106 |
+
public static function define_admin_constants() {
|
107 |
+
if( ! defined( 'GCE_DIR' ) ) {
|
108 |
+
define( 'GCE_DIR', dirname( __FILE__ ) );
|
109 |
+
}
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Return an instance of this class.
|
114 |
+
*
|
115 |
+
* @since 2.0.0
|
116 |
+
*
|
117 |
+
* @return object A single instance of this class.
|
118 |
+
*/
|
119 |
+
public static function get_instance() {
|
120 |
+
|
121 |
+
// If the single instance hasn't been set, set it now.
|
122 |
+
if ( null == self::$instance ) {
|
123 |
+
self::$instance = new self;
|
124 |
+
}
|
125 |
+
|
126 |
+
return self::$instance;
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Return plugin name
|
131 |
+
*
|
132 |
+
* @since 2.0.0
|
133 |
+
*/
|
134 |
+
function get_plugin_title() {
|
135 |
+
return __( 'Google Calendar Events', 'gce' );
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Add settings action link to the plugins page.
|
140 |
+
*
|
141 |
+
* @since 2.0.0
|
142 |
+
*/
|
143 |
+
public function add_action_links( $links ) {
|
144 |
+
|
145 |
+
return array_merge(
|
146 |
+
array(
|
147 |
+
'settings' => '<a href="' . admin_url( 'edit.php?post_type=gce_feed&page=google-calendar-events_general_settings' ) . '">' . __( 'Settings', 'gce' ) . '</a>',
|
148 |
+
'feeds' => '<a href="' . admin_url( 'edit.php?post_type=gce_feed' ) . '">' . __( 'Feeds', 'gce' ) . '</a>'
|
149 |
+
),
|
150 |
+
$links
|
151 |
+
);
|
152 |
+
|
153 |
+
}
|
154 |
+
}
|
class-google-calendar-events.php
ADDED
@@ -0,0 +1,208 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Google Calendar Events Main Class
|
4 |
+
*
|
5 |
+
* @package GCE
|
6 |
+
* @author Phil Derksen <pderksen@gmail.com>, Nick Young <mycorpweb@gmail.com>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @copyright 2014 Phil Derksen
|
9 |
+
*/
|
10 |
+
|
11 |
+
|
12 |
+
class Google_Calendar_Events {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Plugin version, used for cache-busting of style and script file references.
|
16 |
+
*
|
17 |
+
* @since 1.0.0
|
18 |
+
*
|
19 |
+
* @var string
|
20 |
+
*/
|
21 |
+
const VERSION = '2.0.0-beta1';
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Unique identifier for the plugin.
|
25 |
+
*
|
26 |
+
* @since 1.0.0
|
27 |
+
*
|
28 |
+
* @var string
|
29 |
+
*/
|
30 |
+
protected $plugin_slug = 'google-calendar-events';
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Instance of this class.
|
34 |
+
*
|
35 |
+
* @since 1.0.0
|
36 |
+
*
|
37 |
+
* @var object
|
38 |
+
*/
|
39 |
+
protected static $instance = null;
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Initialize the plugin by setting localization and loading public scripts
|
43 |
+
* and styles.
|
44 |
+
*
|
45 |
+
* @since 1.0.0
|
46 |
+
*/
|
47 |
+
private function __construct() {
|
48 |
+
|
49 |
+
$this->includes();
|
50 |
+
|
51 |
+
if( false === get_option( 'gce_upgrade_has_run' ) ) {
|
52 |
+
$this->upgrade();
|
53 |
+
}
|
54 |
+
|
55 |
+
|
56 |
+
$this->setup_constants();
|
57 |
+
|
58 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_public_scripts' ) );
|
59 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_public_styles' ) );
|
60 |
+
|
61 |
+
// AJAX
|
62 |
+
|
63 |
+
|
64 |
+
// Load plugin text domain
|
65 |
+
add_action( 'plugins_loaded', array( $this, 'plugin_textdomain' ) );
|
66 |
+
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Load the upgrade file
|
71 |
+
*
|
72 |
+
* @since 2.0.0
|
73 |
+
*/
|
74 |
+
private function upgrade() {
|
75 |
+
include_once( 'includes/admin/upgrade.php' );
|
76 |
+
|
77 |
+
update_option( 'gce_version', self::VERSION );
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Setup public constants
|
82 |
+
*
|
83 |
+
* @since 2.0.0
|
84 |
+
*/
|
85 |
+
public function setup_constants() {
|
86 |
+
if( ! defined( 'GCE_DIR' ) ) {
|
87 |
+
define( 'GCE_DIR', dirname( __FILE__ ) );
|
88 |
+
}
|
89 |
+
|
90 |
+
if( ! defined( 'GCE_PLUGIN_SLUG' ) ) {
|
91 |
+
define( 'GCE_PLUGIN_SLUG', $this->plugin_slug );
|
92 |
+
}
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Include all necessary files
|
97 |
+
*
|
98 |
+
* @since 2.0.0
|
99 |
+
*/
|
100 |
+
public static function includes() {
|
101 |
+
global $gce_options;
|
102 |
+
|
103 |
+
// First include common files between admin and public
|
104 |
+
include_once( 'includes/misc-functions.php' );
|
105 |
+
include_once( 'includes/gce-feed-cpt.php' );
|
106 |
+
include_once( 'includes/class-gce-feed.php' );
|
107 |
+
include_once( 'includes/class-gce-event.php' );
|
108 |
+
include_once( 'includes/shortcodes.php' );
|
109 |
+
include_once( 'includes/class-gce-display.php' );
|
110 |
+
|
111 |
+
include_once( 'views/widgets.php' );
|
112 |
+
|
113 |
+
// Now include files specifically for public or admin
|
114 |
+
if( is_admin() ) {
|
115 |
+
// Admin includes
|
116 |
+
include_once( 'includes/admin/admin-functions.php' );
|
117 |
+
} else {
|
118 |
+
// Public includes
|
119 |
+
}
|
120 |
+
|
121 |
+
// Setup our main settings options
|
122 |
+
include_once( 'includes/register-settings.php' );
|
123 |
+
|
124 |
+
$gce_options = gce_get_settings();
|
125 |
+
}
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Load public facing scripts
|
129 |
+
*
|
130 |
+
* @since 2.0.0
|
131 |
+
*/
|
132 |
+
public function enqueue_public_scripts() {
|
133 |
+
|
134 |
+
wp_enqueue_script( $this->plugin_slug . '-qtip', plugins_url( 'js/jquery-qtip.js', __FILE__ ), array( 'jquery' ), self::VERSION, true );
|
135 |
+
wp_enqueue_script( $this->plugin_slug . '-public', plugins_url( 'js/gce-script.js', __FILE__ ), array( 'jquery', $this->plugin_slug . '-qtip' ), self::VERSION, true );
|
136 |
+
|
137 |
+
wp_localize_script( $this->plugin_slug . '-public', 'gce',
|
138 |
+
array(
|
139 |
+
'ajaxurl' => admin_url( 'admin-ajax.php' )
|
140 |
+
) );
|
141 |
+
}
|
142 |
+
|
143 |
+
/*
|
144 |
+
* Load public facing styles
|
145 |
+
*
|
146 |
+
* @since 2.0.0
|
147 |
+
*/
|
148 |
+
public function enqueue_public_styles() {
|
149 |
+
wp_enqueue_style( $this->plugin_slug . '-public', plugins_url( 'css/gce-style.css', __FILE__ ), array(), self::VERSION );
|
150 |
+
}
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Return the plugin slug.
|
154 |
+
*
|
155 |
+
* @since 1.0.0
|
156 |
+
*
|
157 |
+
* @return Plugin slug variable.
|
158 |
+
*/
|
159 |
+
public function get_plugin_slug() {
|
160 |
+
return $this->plugin_slug;
|
161 |
+
}
|
162 |
+
|
163 |
+
/**
|
164 |
+
* Return an instance of this class.
|
165 |
+
*
|
166 |
+
* @since 1.0.0
|
167 |
+
*
|
168 |
+
* @return object A single instance of this class.
|
169 |
+
*/
|
170 |
+
public static function get_instance() {
|
171 |
+
|
172 |
+
// If the single instance hasn't been set, set it now.
|
173 |
+
if ( null == self::$instance ) {
|
174 |
+
self::$instance = new self;
|
175 |
+
}
|
176 |
+
|
177 |
+
return self::$instance;
|
178 |
+
}
|
179 |
+
|
180 |
+
/**
|
181 |
+
* Load the plugin text domain for translation.
|
182 |
+
*
|
183 |
+
* @since 2.0.0
|
184 |
+
*/
|
185 |
+
public function plugin_textdomain() {
|
186 |
+
// Set filter for plugin's languages directory
|
187 |
+
$gce_lang_dir = dirname( plugin_basename( GCE_MAIN_FILE ) ) . '/languages/';
|
188 |
+
$gce_lang_dir = apply_filters( 'gce_languages_directory', $gce_lang_dir );
|
189 |
+
|
190 |
+
// Traditional WordPress plugin locale filter
|
191 |
+
$locale = apply_filters( 'plugin_locale', get_locale(), 'gce' );
|
192 |
+
$mofile = sprintf( '%1$s-%2$s.mo', 'gce', $locale );
|
193 |
+
|
194 |
+
// Setup paths to current locale file
|
195 |
+
$mofile_local = $gce_lang_dir . $mofile;
|
196 |
+
$mofile_global = WP_LANG_DIR . '/gce/' . $mofile;
|
197 |
+
|
198 |
+
if ( file_exists( $mofile_global ) ) {
|
199 |
+
load_textdomain( 'gce', $mofile_global );
|
200 |
+
} elseif ( file_exists( $mofile_local ) ) {
|
201 |
+
load_textdomain( 'gce', $mofile_local );
|
202 |
+
} else {
|
203 |
+
// Load the default language files
|
204 |
+
load_plugin_textdomain( 'gce', false, $gce_lang_dir );
|
205 |
+
}
|
206 |
+
|
207 |
+
}
|
208 |
+
}
|
css/admin.css
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Admin CSS file
|
3 |
+
*
|
4 |
+
* @package GCE
|
5 |
+
* @author Phil Derksen <pderksen@gmail.com>, Nick Young <mycorpweb@gmail.com>
|
6 |
+
* @license GPL-2.0+
|
7 |
+
* @copyright 2014 Phil Derksen
|
8 |
+
*/
|
9 |
+
|
10 |
+
.gce-meta-control {
|
11 |
+
margin-bottom: 15px;
|
12 |
+
}
|
13 |
+
|
14 |
+
.gce-meta-control label {
|
15 |
+
display: block;
|
16 |
+
font-weight: bold;
|
17 |
+
}
|
18 |
+
|
19 |
+
#gce-display-options-wrap .gce-meta-control label {
|
20 |
+
font-weight: normal;
|
21 |
+
margin-top: 10px;
|
22 |
+
margin-bottom: 5px;
|
23 |
+
}
|
24 |
+
|
25 |
+
#gce-display-options-wrap .gce-meta-control p label {
|
26 |
+
display: inline;
|
27 |
+
}
|
28 |
+
|
29 |
+
.gce-admin-hidden {
|
30 |
+
display: none;
|
31 |
+
}
|
32 |
+
|
33 |
+
#gce-display-options-wrap .gce-meta-control span.description {
|
34 |
+
display: block;
|
35 |
+
margin-top: 5px;
|
36 |
+
}
|
37 |
+
|
38 |
+
#gce-display-options-wrap .gce-meta-control span.description p {
|
39 |
+
margin-top: 5px;
|
40 |
+
}
|
41 |
+
|
42 |
+
#gce-admin-promo {
|
43 |
+
background-color: #fcf8e3;
|
44 |
+
border: 1px solid #faebbe;
|
45 |
+
color: #8a6d3b;
|
46 |
+
padding: 15px;
|
47 |
+
}
|
css/gce-old-style.css
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
.gce-page-grid .gce-calendar th{
|
2 |
-
padding:0 !important;
|
3 |
-
}
|
4 |
-
|
5 |
-
.gce-page-grid .gce-calendar th abbr,
|
6 |
-
.gce-widget-grid .gce-calendar th abbr{
|
7 |
-
border-bottom:none !important;
|
8 |
-
}
|
9 |
-
|
10 |
-
.gce-page-list .gce-list p{
|
11 |
-
margin:0 !important;
|
12 |
-
}
|
13 |
-
|
14 |
-
.gce-page-list .gce-list ul,
|
15 |
-
.gce-widget-list .gce-list ul{
|
16 |
-
margin:0 !important;
|
17 |
-
padding:0 !important;
|
18 |
-
}
|
19 |
-
|
20 |
-
.gce-event-info .gce-tooltip-title{
|
21 |
-
margin:5px !important;
|
22 |
-
}
|
23 |
-
|
24 |
-
.gce-event-info ul{
|
25 |
-
padding:0 !important;
|
26 |
-
margin:5px !important;
|
27 |
-
list-style-type:none !important;
|
28 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/gce-style.css
CHANGED
@@ -1,203 +1,212 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
width:
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
}
|
38 |
-
|
39 |
-
.gce-page-grid .gce-calendar .gce-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
.gce-page-grid .gce-calendar .gce-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
}
|
62 |
-
|
63 |
-
/*
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
.gce-page-list .gce-list
|
75 |
-
|
76 |
-
}
|
77 |
-
|
78 |
-
.gce-page-list .gce-list
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
}
|
121 |
-
|
122 |
-
.gce-widget-grid
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
.gce-widget-grid
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
}
|
141 |
-
|
142 |
-
/*
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
.gce-widget-list .gce-list
|
154 |
-
|
155 |
-
}
|
156 |
-
|
157 |
-
.gce-widget-list .gce-list
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
.
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
margin:
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
.gce-event-info ul li
|
197 |
-
|
198 |
-
}
|
199 |
-
|
200 |
-
.gce-event-info
|
201 |
-
|
202 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
203 |
}
|
1 |
+
/**
|
2 |
+
* Public facing CSS file
|
3 |
+
*
|
4 |
+
* @package GCE
|
5 |
+
* @author Phil Derksen <pderksen@gmail.com>, Nick Young <mycorpweb@gmail.com>
|
6 |
+
* @license GPL-2.0+
|
7 |
+
* @copyright 2014 Phil Derksen
|
8 |
+
*/
|
9 |
+
|
10 |
+
/* PAGE GRID */
|
11 |
+
|
12 |
+
.gce-page-grid .gce-calendar .gce-caption{ /* Caption at top of calendar */
|
13 |
+
color:#333333;
|
14 |
+
text-align:center;
|
15 |
+
}
|
16 |
+
|
17 |
+
.gce-page-grid .gce-calendar{ /* Main calendar table */
|
18 |
+
width:100%;
|
19 |
+
border-collapse:collapse;
|
20 |
+
border:1px solid #CCCCCC;
|
21 |
+
color:#CCCCCC;
|
22 |
+
}
|
23 |
+
|
24 |
+
.gce-page-grid .gce-calendar th{ /* Day headings (S, M etc.) */
|
25 |
+
border:1px solid #CCCCCC;
|
26 |
+
text-align:center;
|
27 |
+
width:14.29%;
|
28 |
+
padding:0;
|
29 |
+
}
|
30 |
+
|
31 |
+
.gce-page-grid .gce-calendar td{ /* Day table cells */
|
32 |
+
border:1px solid #CCCCCC;
|
33 |
+
text-align:center;
|
34 |
+
height:80px;
|
35 |
+
vertical-align:middle;
|
36 |
+
padding:0;
|
37 |
+
}
|
38 |
+
|
39 |
+
.gce-page-grid .gce-calendar .gce-has-events{ /* Table cells with events */
|
40 |
+
color:#333333;
|
41 |
+
cursor:pointer;
|
42 |
+
}
|
43 |
+
|
44 |
+
.gce-page-grid .gce-calendar .gce-event-info{ /* Event information */
|
45 |
+
display:none; /* Important! */
|
46 |
+
}
|
47 |
+
|
48 |
+
.gce-page-grid .gce-calendar .gce-day-number{ /* Day number span */
|
49 |
+
font-size:2em;
|
50 |
+
}
|
51 |
+
|
52 |
+
.gce-page-grid .gce-calendar .gce-today{ /* Table cell that represents today */
|
53 |
+
background-color:#DDDDDD;
|
54 |
+
}
|
55 |
+
|
56 |
+
.gce-page-grid .gce-calendar .gce-next,
|
57 |
+
.gce-page-grid .gce-calendar .gce-prev{ /* Previous and next month links */
|
58 |
+
cursor:pointer;
|
59 |
+
display:inline-block;
|
60 |
+
width:3%;
|
61 |
+
}
|
62 |
+
|
63 |
+
.gce-page-grid .gce-calendar .gce-month-title{ /* Month title */
|
64 |
+
display:inline-block;
|
65 |
+
width:90%;
|
66 |
+
}
|
67 |
+
|
68 |
+
.gce-page-grid .gce-calendar th abbr{ /* Day letter abbreviation */
|
69 |
+
border-bottom:none;
|
70 |
+
}
|
71 |
+
|
72 |
+
/* PAGE LIST */
|
73 |
+
|
74 |
+
.gce-page-list .gce-list p{ /* Each piece of information in the list */
|
75 |
+
margin:0;
|
76 |
+
}
|
77 |
+
|
78 |
+
.gce-page-list .gce-list p span,
|
79 |
+
.gce-page-list .gce-list div span{ /* The text displayed before each piece of info, 'Starts:' for example */
|
80 |
+
color:#999999;
|
81 |
+
}
|
82 |
+
|
83 |
+
.gce-page-list .gce-list .gce-list-event{ /* The event title */
|
84 |
+
background-color:#DDDDDD;
|
85 |
+
}
|
86 |
+
|
87 |
+
.gce-page-list .gce-list .gce-list-title{ /* The title (not the same as event title) */
|
88 |
+
font-weight:bold;
|
89 |
+
}
|
90 |
+
|
91 |
+
.gce-page-list .gce-list ul{
|
92 |
+
list-style-type:none;
|
93 |
+
margin:0;
|
94 |
+
padding:0;
|
95 |
+
}
|
96 |
+
|
97 |
+
/* WIDGET GRID */
|
98 |
+
|
99 |
+
.gce-widget-grid .gce-calendar .gce-caption{
|
100 |
+
text-align:center;
|
101 |
+
}
|
102 |
+
|
103 |
+
.gce-widget-grid .gce-calendar{ /* Main calendar table */
|
104 |
+
width:100%;
|
105 |
+
border:1px solid #CCCCCC;
|
106 |
+
border-collapse:collapse;
|
107 |
+
}
|
108 |
+
|
109 |
+
.gce-widget-grid .gce-calendar th{ /* Day headings (S, M etc.) */
|
110 |
+
width:14.29%;
|
111 |
+
border:1px solid #CCCCCC;
|
112 |
+
text-align:center;
|
113 |
+
}
|
114 |
+
|
115 |
+
.gce-widget-grid .gce-calendar td{ /* Day table cells */
|
116 |
+
color:#CCCCCC;
|
117 |
+
width:14.29%;
|
118 |
+
border:1px solid #CCCCCC;
|
119 |
+
text-align:center;
|
120 |
+
}
|
121 |
+
|
122 |
+
.gce-widget-grid .gce-calendar .gce-has-events{ /* Table cells with events */
|
123 |
+
cursor:pointer;
|
124 |
+
color:#666666;
|
125 |
+
}
|
126 |
+
|
127 |
+
.gce-widget-grid .gce-calendar .gce-today{ /* Table cell that represents today */
|
128 |
+
background-color:#DDDDDD;
|
129 |
+
}
|
130 |
+
|
131 |
+
.gce-widget-grid .gce-calendar .gce-event-info{ /* Event information */
|
132 |
+
display:none; /* Important! */
|
133 |
+
}
|
134 |
+
|
135 |
+
.gce-widget-grid .gce-calendar .gce-next,
|
136 |
+
.gce-widget-grid .gce-calendar .gce-prev{ /* Prev and next month links */
|
137 |
+
cursor:pointer;
|
138 |
+
display:inline-block;
|
139 |
+
width:5%;
|
140 |
+
}
|
141 |
+
|
142 |
+
.gce-widget-grid .gce-calendar .gce-month-title{ /* Month title in caption at top of table */
|
143 |
+
display:inline-block;
|
144 |
+
width:80%;
|
145 |
+
}
|
146 |
+
|
147 |
+
.gce-widget-grid .gce-calendar th abbr{ /* Day name abbreviations */
|
148 |
+
border-bottom:none;
|
149 |
+
}
|
150 |
+
|
151 |
+
/* WIDGET LIST */
|
152 |
+
|
153 |
+
.gce-widget-list .gce-list p{ /* Each piece of information in the list */
|
154 |
+
margin:0;
|
155 |
+
}
|
156 |
+
|
157 |
+
.gce-widget-list .gce-list p span,
|
158 |
+
.gce-widget-list .gce-list div span{ /* The text displayed before each piece of info, 'Starts:' for example */
|
159 |
+
color:#999999;
|
160 |
+
}
|
161 |
+
|
162 |
+
.gce-widget-list .gce-list .gce-list-event{ /* The event title */
|
163 |
+
background-color:#DDDDDD;
|
164 |
+
}
|
165 |
+
|
166 |
+
.gce-widget-list .gce-list .gce-list-title{ /* The title (not the same as event title) */
|
167 |
+
font-weight:bold;
|
168 |
+
}
|
169 |
+
|
170 |
+
.gce-widget-list .gce-list ul{
|
171 |
+
list-style-type:none;
|
172 |
+
margin:0;
|
173 |
+
padding:0;
|
174 |
+
}
|
175 |
+
|
176 |
+
/* TOOLTIP */
|
177 |
+
|
178 |
+
.gce-event-info{ /* Tooltip container */
|
179 |
+
background-color:#FFFFFF;
|
180 |
+
border:1px solid #333333;
|
181 |
+
max-width:300px;
|
182 |
+
}
|
183 |
+
|
184 |
+
.gce-event-info .gce-tooltip-title{ /* 'Events on...' text */
|
185 |
+
margin:5px;
|
186 |
+
font-weight:bold;
|
187 |
+
font-size:1.2em;
|
188 |
+
}
|
189 |
+
|
190 |
+
.gce-event-info ul{ /* Events list */
|
191 |
+
padding:0;
|
192 |
+
margin:5px;
|
193 |
+
list-style-type:none;
|
194 |
+
}
|
195 |
+
|
196 |
+
.gce-event-info ul li{ /* Event list item */
|
197 |
+
margin:10px 0 0 0;
|
198 |
+
}
|
199 |
+
|
200 |
+
.gce-event-info ul li p{ /* Each piece of information */
|
201 |
+
margin:0;
|
202 |
+
}
|
203 |
+
|
204 |
+
.gce-event-info ul li p span,
|
205 |
+
.gce-event-info ul li div span{ /* The text displayed before each piece of info, 'Starts:' for example */
|
206 |
+
color:#999999;
|
207 |
+
}
|
208 |
+
|
209 |
+
.gce-event-info .gce-tooltip-event{ /* The event title */
|
210 |
+
background-color:#DDDDDD;
|
211 |
+
font-weight:bold;
|
212 |
}
|
css/images/animated-overlay.gif
ADDED
Binary file
|
css/images/ui-bg_flat_0_aaaaaa_40x100.png
ADDED
Binary file
|
css/images/ui-bg_flat_75_ffffff_40x100.png
ADDED
Binary file
|
css/images/ui-bg_glass_55_fbf9ee_1x400.png
ADDED
Binary file
|
css/images/ui-bg_glass_65_ffffff_1x400.png
ADDED
Binary file
|
css/images/ui-bg_glass_75_dadada_1x400.png
ADDED
Binary file
|
css/images/ui-bg_glass_75_e6e6e6_1x400.png
ADDED
Binary file
|
css/images/ui-bg_glass_95_fef1ec_1x400.png
ADDED
Binary file
|
css/images/ui-bg_highlight-soft_75_cccccc_1x100.png
ADDED
Binary file
|
css/images/ui-icons_222222_256x240.png
ADDED
Binary file
|
css/images/ui-icons_2e83ff_256x240.png
ADDED
Binary file
|
css/images/ui-icons_454545_256x240.png
ADDED
Binary file
|
css/images/ui-icons_888888_256x240.png
ADDED
Binary file
|
css/images/ui-icons_cd0a0a_256x240.png
ADDED
Binary file
|
css/jquery-ui-1.10.4.custom.min.css
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! jQuery UI - v1.10.4 - 2014-05-14
|
2 |
+
* http://jqueryui.com
|
3 |
+
* Includes: jquery.ui.core.css, jquery.ui.datepicker.css, jquery.ui.theme.css
|
4 |
+
* 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
|
5 |
+
* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
|
6 |
+
|
7 |
+
.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}
|
google-calendar-events.php
CHANGED
@@ -1,710 +1,60 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
*/
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
if
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
//PHP 5.2 is required (json_decode), so if PHP version is lower then 5.2, display an error message and deactivate the plugin
|
62 |
-
function activate_plugin(){
|
63 |
-
if( version_compare( PHP_VERSION, '5.2', '<' ) ) {
|
64 |
-
if( is_admin() && ( ! defined('DOING_AJAX') || ! DOING_AJAX ) ) {
|
65 |
-
require_once ABSPATH . '/wp-admin/includes/plugin.php';
|
66 |
-
deactivate_plugins( basename( __FILE__ ) );
|
67 |
-
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 <a href="http://wordpress.org/news/2010/07/eol-for-php4-and-mysql4">have this requirement</a>. You should get in touch with your web hosting provider and ask them to update PHP.<br /><br /><a href="' . admin_url( 'plugins.php' ) . '">Back to Plugins</a>' );
|
68 |
-
}
|
69 |
-
}
|
70 |
-
}
|
71 |
-
|
72 |
-
//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)
|
73 |
-
function update_settings() {
|
74 |
-
//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
|
75 |
-
if ( get_option( GCE_OPTIONS_NAME ) && ! get_option( 'gce_version' ) )
|
76 |
-
add_option( 'gce_clear_old_transients', true );
|
77 |
-
|
78 |
-
add_option( 'gce_version', GCE_VERSION );
|
79 |
-
|
80 |
-
add_option( GCE_OPTIONS_NAME );
|
81 |
-
add_option( GCE_GENERAL_OPTIONS_NAME );
|
82 |
-
|
83 |
-
//Get feed options
|
84 |
-
$options = get_option( GCE_OPTIONS_NAME );
|
85 |
-
|
86 |
-
if ( ! empty( $options ) ) {
|
87 |
-
foreach ( $options as $key => $saved_feed_options ) {
|
88 |
-
$defaults = array(
|
89 |
-
'id' => 1,
|
90 |
-
'title' => '',
|
91 |
-
'url' => '',
|
92 |
-
'retrieve_from' => 'today',
|
93 |
-
'retrieve_from_value' => 0,
|
94 |
-
'retrieve_until' => 'any',
|
95 |
-
'retrieve_until_value' => 0,
|
96 |
-
'max_events' => 25,
|
97 |
-
'date_format' => '',
|
98 |
-
'time_format' => '',
|
99 |
-
'timezone' => 'default',
|
100 |
-
'cache_duration' => 43200,
|
101 |
-
'multiple_day' => 'false',
|
102 |
-
'query' => '',
|
103 |
-
'expand_recurring' => 'true',
|
104 |
-
'display_start' => 'time',
|
105 |
-
'display_end' => 'time-date',
|
106 |
-
'display_location' => '',
|
107 |
-
'display_desc' => '',
|
108 |
-
'display_link' => 'on',
|
109 |
-
'display_start_text' => 'Starts:',
|
110 |
-
'display_end_text' => 'Ends:',
|
111 |
-
'display_location_text' => 'Location:',
|
112 |
-
'display_desc_text' => 'Description:',
|
113 |
-
'display_desc_limit' => '',
|
114 |
-
'display_link_text' => 'More details',
|
115 |
-
'display_link_target' => '',
|
116 |
-
'display_separator' => ', ',
|
117 |
-
'use_builder' => 'false',
|
118 |
-
'builder' => ''
|
119 |
-
);
|
120 |
-
|
121 |
-
//If necessary, copy saved behaviour of old show_past_events and day_limit options into the new from / until options
|
122 |
-
if ( isset( $saved_feed_options['show_past_events'] ) ) {
|
123 |
-
if ( 'true' == $saved_feed_options['show_past_events'] ) {
|
124 |
-
$saved_feed_options['retrieve_from'] = 'month-start';
|
125 |
-
} else {
|
126 |
-
$saved_feed_options['retrieve_from'] = 'today';
|
127 |
-
}
|
128 |
-
}
|
129 |
-
|
130 |
-
if ( isset( $saved_feed_options['day_limit'] ) && '' != $saved_feed_options['day_limit'] ) {
|
131 |
-
$saved_feed_options['retrieve_until'] = 'today';
|
132 |
-
$saved_feed_options['retrieve_until_value'] = (int) $saved_feed_options['day_limit'] * 86400;
|
133 |
-
}
|
134 |
-
|
135 |
-
//Update old display_start / display_end values
|
136 |
-
if ( ! isset( $saved_feed_options['display_start'] ) )
|
137 |
-
$saved_feed_options['display_start'] = 'none';
|
138 |
-
elseif ( 'on' == $saved_feed_options['display_start'] )
|
139 |
-
$saved_feed_options['display_start'] = 'time';
|
140 |
-
|
141 |
-
if( ! isset( $saved_feed_options['display_end'] ) )
|
142 |
-
$saved_feed_options['display_end'] = 'none';
|
143 |
-
elseif ( 'on' == $saved_feed_options['display_end'] )
|
144 |
-
$saved_feed_options['display_end'] = 'time-date';
|
145 |
-
|
146 |
-
//Merge saved options with defaults
|
147 |
-
foreach ( $saved_feed_options as $option_name => $option ) {
|
148 |
-
$defaults[$option_name] = $saved_feed_options[$option_name];
|
149 |
-
}
|
150 |
-
|
151 |
-
$options[$key] = $defaults;
|
152 |
-
}
|
153 |
-
}
|
154 |
-
|
155 |
-
//Save feed options
|
156 |
-
update_option( GCE_OPTIONS_NAME, $options );
|
157 |
-
|
158 |
-
//Get general options
|
159 |
-
$options = get_option( GCE_GENERAL_OPTIONS_NAME );
|
160 |
-
|
161 |
-
$defaults = array(
|
162 |
-
'stylesheet' => '',
|
163 |
-
'javascript' => false,
|
164 |
-
'loading' => 'Loading...',
|
165 |
-
'error' => 'Events cannot currently be displayed, sorry! Please check back later.',
|
166 |
-
'no_events' => 'There are currently no events to display.',
|
167 |
-
'fields' => true,
|
168 |
-
'old_stylesheet' => false
|
169 |
-
);
|
170 |
-
|
171 |
-
$old_stylesheet_option = get_option( 'gce_stylesheet' );
|
172 |
-
|
173 |
-
//If old custom stylesheet option was set, add it to general options, then delete old option
|
174 |
-
if( false !== $old_stylesheet_option ) {
|
175 |
-
$defaults['stylesheet'] = $old_stylesheet_option;
|
176 |
-
delete_option( 'gce_stylesheet' );
|
177 |
-
} elseif ( isset($options['stylesheet'] ) ) {
|
178 |
-
$defaults['stylesheet'] = $options['stylesheet'];
|
179 |
-
}
|
180 |
-
|
181 |
-
if ( isset($options['javascript'] ) )
|
182 |
-
$defaults['javascript'] = $options['javascript'];
|
183 |
-
|
184 |
-
if ( isset( $options['loading'] ) )
|
185 |
-
$defaults['loading'] = $options['loading'];
|
186 |
-
|
187 |
-
if ( isset($options['error'] ) )
|
188 |
-
$defaults['error'] = $options['error'];
|
189 |
-
|
190 |
-
if ( isset($options['no_events'] ) )
|
191 |
-
$defaults['no_events'] = $options['no_events'];
|
192 |
-
|
193 |
-
if ( isset($options['fields'] ) )
|
194 |
-
$defaults['fields'] = $options['fields'];
|
195 |
-
|
196 |
-
if( isset( $options['old_stylesheet'] ) )
|
197 |
-
$defaults['old_stylesheet'] = $options['old_stylesheet'];
|
198 |
-
|
199 |
-
//Save general options
|
200 |
-
update_option( GCE_GENERAL_OPTIONS_NAME, $defaults );
|
201 |
-
}
|
202 |
-
|
203 |
-
function init_plugin() {
|
204 |
-
//Load text domain for i18n
|
205 |
-
load_plugin_textdomain( GCE_TEXT_DOMAIN, false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
|
206 |
-
}
|
207 |
-
|
208 |
-
//Adds 'Settings' link to main WordPress Plugins page
|
209 |
-
function add_settings_link( $links ) {
|
210 |
-
array_unshift( $links, '<a href="options-general.php?page=google-calendar-events.php">' . __( 'Settings', GCE_TEXT_DOMAIN ) . '</a>' );
|
211 |
-
return $links;
|
212 |
-
}
|
213 |
-
|
214 |
-
//Setup admin settings page
|
215 |
-
function setup_admin(){
|
216 |
-
global $gce_settings_page;
|
217 |
-
|
218 |
-
$gce_settings_page = add_options_page( 'Google Calendar Events', 'Google Calendar Events', 'manage_options', basename( __FILE__ ), array( $this, 'admin_page' ) );
|
219 |
-
|
220 |
-
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
|
221 |
-
}
|
222 |
-
|
223 |
-
//Add admin JavaScript (to GCE settings page only)
|
224 |
-
function enqueue_admin_scripts( $hook_suffix ) {
|
225 |
-
global $gce_settings_page;
|
226 |
-
|
227 |
-
if ( $gce_settings_page == $hook_suffix )
|
228 |
-
wp_enqueue_script( 'gce_scripts', WP_PLUGIN_URL . '/' . GCE_PLUGIN_NAME . '/js/gce-admin-script.js', array( 'jquery' ) );
|
229 |
-
}
|
230 |
-
|
231 |
-
//Prints admin settings page
|
232 |
-
function admin_page() {
|
233 |
-
?>
|
234 |
-
<div class="wrap">
|
235 |
-
<div id="icon-options-general" class="icon32"><br /></div>
|
236 |
-
|
237 |
-
<h2><?php _e( 'Google Calendar Events', GCE_TEXT_DOMAIN ); ?></h2>
|
238 |
-
|
239 |
-
<?php if ( get_option( 'gce_clear_old_transients' ) ): ?>
|
240 |
-
<div class="error">
|
241 |
-
<p><strong><?php _e( 'Notice:', GCE_TEXT_DOMAIN ); ?></strong> <?php _e( 'The way in which Google Calendar Events stores cached data has been much improved in version 0.6. As you have upgraded from a previous version of the plugin, there is likely to be some data from the old caching system hanging around in your database that is now useless. Click below to clear expired cached data from your database.', GCE_TEXT_DOMAIN); ?></p>
|
242 |
-
<p><a href="<?php echo wp_nonce_url( add_query_arg( array( 'gce_action' => 'clear_old_transients' ) ), 'gce_action_clear_old_transients' ); ?>"><?php _e( 'Clear expired cached data', GCE_TEXT_DOMAIN ); ?></a></p>
|
243 |
-
<p><?php _e( 'or', GCE_TEXT_DOMAIN ); ?></p>
|
244 |
-
<p><a href="<?php echo wp_nonce_url( add_query_arg( array( 'gce_action' => 'ignore_old_transients' ) ), 'gce_action_ignore_old_transients' ); ?>"><?php _e( 'Ignore this notice', GCE_TEXT_DOMAIN ); ?></a></p>
|
245 |
-
</div>
|
246 |
-
<?php endif; ?>
|
247 |
-
|
248 |
-
<form method="post" action="options.php" id="test-form">
|
249 |
-
<?php
|
250 |
-
if ( isset( $_GET['action'] ) && ! isset( $_GET['settings-updated'] ) ) {
|
251 |
-
switch ( $_GET['action'] ) {
|
252 |
-
//Add feed section
|
253 |
-
case 'add':
|
254 |
-
settings_fields( 'gce_options' );
|
255 |
-
do_settings_sections( 'add_feed' );
|
256 |
-
do_settings_sections( 'add_display' );
|
257 |
-
do_settings_sections( 'add_builder' );
|
258 |
-
do_settings_sections( 'add_simple_display' );
|
259 |
-
?><p class="submit"><input type="submit" class="button-primary submit" name="gce_options[submit_add]" value="<?php _e( 'Add Feed', GCE_TEXT_DOMAIN ); ?>" /></p>
|
260 |
-
<p><a href="<?php echo admin_url( 'options-general.php?page=' . GCE_PLUGIN_NAME . '.php' ); ?>" class="button-secondary"><?php _e( 'Cancel', GCE_TEXT_DOMAIN ); ?></a></p><?php
|
261 |
-
break;
|
262 |
-
case 'refresh':
|
263 |
-
settings_fields( 'gce_options' );
|
264 |
-
do_settings_sections( 'refresh_feed' );
|
265 |
-
?><p class="submit"><input type="submit" class="button-primary submit" name="gce_options[submit_refresh]" value="<?php _e( 'Refresh Feed', GCE_TEXT_DOMAIN ); ?>" /></p>
|
266 |
-
<p><a href="<?php echo admin_url( 'options-general.php?page=' . GCE_PLUGIN_NAME . '.php' ); ?>" class="button-secondary"><?php _e( 'Cancel', GCE_TEXT_DOMAIN ); ?></a></p><?php
|
267 |
-
break;
|
268 |
-
//Edit feed section
|
269 |
-
case 'edit':
|
270 |
-
settings_fields( 'gce_options' );
|
271 |
-
do_settings_sections( 'edit_feed' );
|
272 |
-
do_settings_sections( 'edit_display' );
|
273 |
-
do_settings_sections( 'edit_builder' );
|
274 |
-
do_settings_sections( 'edit_simple_display' );
|
275 |
-
?><p class="submit"><input type="submit" class="button-primary submit" name="gce_options[submit_edit]" value="<?php _e( 'Save Changes', GCE_TEXT_DOMAIN ); ?>" /></p>
|
276 |
-
<p><a href="<?php echo admin_url( 'options-general.php?page=' . GCE_PLUGIN_NAME . '.php' ); ?>" class="button-secondary"><?php _e( 'Cancel', GCE_TEXT_DOMAIN ); ?></a></p><?php
|
277 |
-
break;
|
278 |
-
//Delete feed section
|
279 |
-
case 'delete':
|
280 |
-
settings_fields( 'gce_options' );
|
281 |
-
do_settings_sections( 'delete_feed' );
|
282 |
-
?><p class="submit"><input type="submit" class="button-primary submit" name="gce_options[submit_delete]" value="<?php _e( 'Delete Feed', GCE_TEXT_DOMAIN ); ?>" /></p>
|
283 |
-
<p><a href="<?php echo admin_url( 'options-general.php?page=' . GCE_PLUGIN_NAME . '.php' ); ?>" class="button-secondary"><?php _e( 'Cancel', GCE_TEXT_DOMAIN ); ?></a></p><?php
|
284 |
-
}
|
285 |
-
}else{
|
286 |
-
//Main admin section
|
287 |
-
settings_fields( 'gce_general' );
|
288 |
-
require_once 'admin/main.php';
|
289 |
-
}
|
290 |
-
?>
|
291 |
-
</form>
|
292 |
-
</div>
|
293 |
-
<?php
|
294 |
-
}
|
295 |
-
|
296 |
-
//Initialize admin stuff
|
297 |
-
function init_admin() {
|
298 |
-
$version = get_option( 'gce_version' );
|
299 |
-
|
300 |
-
//If updating from before 0.7, set old_stylesheet option to true
|
301 |
-
if ( false === $version || version_compare( $version, '0.7', '<' ) ) {
|
302 |
-
$options = get_option( GCE_GENERAL_OPTIONS_NAME );
|
303 |
-
$options['old_stylesheet'] = true;
|
304 |
-
}
|
305 |
-
|
306 |
-
//If updating from a previous version, update the settings
|
307 |
-
if ( false === $version || version_compare( $version, GCE_VERSION, '<' ) )
|
308 |
-
$this->update_settings();
|
309 |
-
|
310 |
-
//If the message about old transients was displayed, check authority and intention, and then either clear transients or clear flag
|
311 |
-
if ( isset( $_GET['gce_action'] ) && current_user_can( 'manage_options' ) ) {
|
312 |
-
switch ( $_GET['gce_action'] ) {
|
313 |
-
case 'clear_old_transients':
|
314 |
-
check_admin_referer( 'gce_action_clear_old_transients' );
|
315 |
-
$this->clear_old_transients();
|
316 |
-
add_settings_error( 'gce_options', 'gce_cleared_old_transients', __( 'Old cached data cleared.', GCE_TEXT_DOMAIN ), 'updated' );
|
317 |
-
break;
|
318 |
-
case 'ignore_old_transients':
|
319 |
-
check_admin_referer( 'gce_action_ignore_old_transients' );
|
320 |
-
delete_option( 'gce_clear_old_transients' );
|
321 |
-
}
|
322 |
-
}
|
323 |
-
|
324 |
-
register_setting( 'gce_options', 'gce_options', array( $this, 'validate_feed_options' ) );
|
325 |
-
register_setting( 'gce_general', 'gce_general', array( $this, 'validate_general_options' ) );
|
326 |
-
|
327 |
-
require_once 'admin/add.php';
|
328 |
-
require_once 'admin/edit.php';
|
329 |
-
require_once 'admin/delete.php';
|
330 |
-
require_once 'admin/refresh.php';
|
331 |
-
}
|
332 |
-
|
333 |
-
//Clears any expired transients from the database
|
334 |
-
function clear_old_transients() {
|
335 |
-
global $wpdb;
|
336 |
-
|
337 |
-
//Retrieve names of all transients
|
338 |
-
$transients = $wpdb->get_results( "SELECT option_name FROM $wpdb->options WHERE option_name LIKE '%transient%' AND option_name NOT LIKE '%transient_timeout%'" );
|
339 |
-
|
340 |
-
if ( ! empty( $transients ) ) {
|
341 |
-
foreach ( $transients as $transient ) {
|
342 |
-
//Attempt to retrieve the transient. If it has expired, it will be deleted
|
343 |
-
get_transient( str_replace( '_transient_', '', $transient->option_name ) );
|
344 |
-
}
|
345 |
-
}
|
346 |
-
|
347 |
-
//Remove the flag
|
348 |
-
delete_option( 'gce_clear_old_transients' );
|
349 |
-
}
|
350 |
-
|
351 |
-
//Register the widget
|
352 |
-
function add_widget() {
|
353 |
-
require_once 'widget/gce-widget.php';
|
354 |
-
return register_widget( 'GCE_Widget' );
|
355 |
-
}
|
356 |
-
|
357 |
-
//Check / validate submitted feed options data before being stored
|
358 |
-
function validate_feed_options( $input ) {
|
359 |
-
//Get saved options
|
360 |
-
$options = get_option( GCE_OPTIONS_NAME );
|
361 |
-
|
362 |
-
if ( isset( $input['submit_delete'] ) ) {
|
363 |
-
//If delete button was clicked, delete feed from options array and remove associated transients
|
364 |
-
unset( $options[$input['id']] );
|
365 |
-
$this->delete_feed_transients( (int) $input['id'] );
|
366 |
-
add_settings_error( 'gce_options', 'gce_deleted', __( sprintf('Feed %s deleted.', absint( $input['id'] ) ), GCE_TEXT_DOMAIN ), 'updated' );
|
367 |
-
} elseif ( isset($input['submit_refresh'] ) ) {
|
368 |
-
//If refresh button was clicked, delete transients associated with feed
|
369 |
-
$this->delete_feed_transients( (int) $input['id'] );
|
370 |
-
add_settings_error( 'gce_options', 'gce_refreshed', __( sprintf('Cached data for feed %s cleared.', absint( $input['id'] ) ), GCE_TEXT_DOMAIN ), 'updated' );
|
371 |
-
} else {
|
372 |
-
//Otherwise, validate options and add / update them
|
373 |
-
|
374 |
-
//Check id is positive integer
|
375 |
-
$id = absint( $input['id'] );
|
376 |
-
//Escape title text
|
377 |
-
$title = esc_html( $input['title'] );
|
378 |
-
//Escape feed url
|
379 |
-
$url = esc_url( $input['url'] );
|
380 |
-
|
381 |
-
//Array of valid options for retrieve_from and retrieve_until settings
|
382 |
-
$valid_retrieve_options = array( 'now', 'today', 'week', 'month-start', 'month-end', 'any', 'date' );
|
383 |
-
|
384 |
-
$retrieve_from = 'today';
|
385 |
-
$retrieve_from_value = 0;
|
386 |
-
|
387 |
-
//Ensure retrieve_from is valid
|
388 |
-
if( in_array( $input['retrieve_from'], $valid_retrieve_options ) ) {
|
389 |
-
$retrieve_from = $input['retrieve_from'];
|
390 |
-
$retrieve_from_value = (int) $input['retrieve_from_value'];
|
391 |
-
}
|
392 |
-
|
393 |
-
$retrieve_until = 'any';
|
394 |
-
$retrieve_until_value = 0;
|
395 |
-
|
396 |
-
//Ensure retrieve_until is valid
|
397 |
-
if ( in_array( $input['retrieve_until'], $valid_retrieve_options ) ) {
|
398 |
-
$retrieve_until = $input['retrieve_until'];
|
399 |
-
$retrieve_until_value = (int) $input['retrieve_until_value'];
|
400 |
-
}
|
401 |
-
|
402 |
-
//Check max events is a positive integer. If absint returns 0, reset to default (25)
|
403 |
-
$max_events = ( 0 == absint($input['max_events'] ) ) ? 25 : absint( $input['max_events'] );
|
404 |
-
|
405 |
-
$date_format = wp_filter_kses( $input['date_format'] );
|
406 |
-
$time_format = wp_filter_kses( $input['time_format'] );
|
407 |
-
|
408 |
-
//Escape timezone
|
409 |
-
$timezone = esc_html( $input['timezone'] );
|
410 |
-
|
411 |
-
//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)
|
412 |
-
$cache_duration = $input['cache_duration'];
|
413 |
-
if ( '0' != $cache_duration )
|
414 |
-
$cache_duration = ( 0 == absint( $cache_duration ) ) ? 43200 : absint( $cache_duration );
|
415 |
-
|
416 |
-
$multiple_day = ( isset( $input['multiple_day'] ) ) ? 'true' : 'false';
|
417 |
-
|
418 |
-
$query = sanitize_text_field( $input['query'] );
|
419 |
-
|
420 |
-
$expand_recurring = ( isset( $input['expand_recurring'] ) ) ? 'true' : 'false';
|
421 |
-
|
422 |
-
$display_start = esc_html( $input['display_start'] );
|
423 |
-
$display_end = esc_html( $input['display_end'] );
|
424 |
-
|
425 |
-
//Display options must be 'on' or null
|
426 |
-
$display_location = ( isset( $input['display_location'] ) ) ? 'on' : null;
|
427 |
-
$display_desc = ( isset( $input['display_desc'] ) ) ? 'on' : null;
|
428 |
-
$display_link = ( isset( $input['display_link'] ) ) ? 'on' : null;
|
429 |
-
$display_link_target = ( isset( $input['display_link_target'] ) ) ? 'on' : null;
|
430 |
-
|
431 |
-
//Filter display text
|
432 |
-
$display_start_text = wp_filter_kses( $input['display_start_text'] );
|
433 |
-
$display_end_text = wp_filter_kses( $input['display_end_text'] );
|
434 |
-
$display_location_text = wp_filter_kses( $input['display_location_text'] );
|
435 |
-
$display_desc_text = wp_filter_kses( $input['display_desc_text'] );
|
436 |
-
$display_link_text = wp_filter_kses( $input['display_link_text'] );
|
437 |
-
|
438 |
-
$display_separator = wp_filter_kses( $input['display_separator'] );
|
439 |
-
|
440 |
-
$display_desc_limit = ( 0 == absint( $input['display_desc_limit'] ) ) ? '' : absint( $input['display_desc_limit'] );
|
441 |
-
|
442 |
-
$use_builder = ( 'false' == $input['use_builder'] ) ? 'false' : 'true';
|
443 |
-
$builder = wp_kses_post( $input['builder'] );
|
444 |
-
|
445 |
-
//Fill options array with validated values
|
446 |
-
$options[$id] = array(
|
447 |
-
'id' => $id,
|
448 |
-
'title' => $title,
|
449 |
-
'url' => $url,
|
450 |
-
'retrieve_from' => $retrieve_from,
|
451 |
-
'retrieve_until' => $retrieve_until,
|
452 |
-
'retrieve_from_value' => $retrieve_from_value,
|
453 |
-
'retrieve_until_value' => $retrieve_until_value,
|
454 |
-
'max_events' => $max_events,
|
455 |
-
'date_format' => $date_format,
|
456 |
-
'time_format' => $time_format,
|
457 |
-
'timezone' => $timezone,
|
458 |
-
'cache_duration' => $cache_duration,
|
459 |
-
'multiple_day' => $multiple_day,
|
460 |
-
'query' => $query,
|
461 |
-
'expand_recurring' => $expand_recurring,
|
462 |
-
'display_start' => $display_start,
|
463 |
-
'display_end' => $display_end,
|
464 |
-
'display_location' => $display_location,
|
465 |
-
'display_desc' => $display_desc,
|
466 |
-
'display_link' => $display_link,
|
467 |
-
'display_start_text' => $display_start_text,
|
468 |
-
'display_end_text' => $display_end_text,
|
469 |
-
'display_location_text' => $display_location_text,
|
470 |
-
'display_desc_text' => $display_desc_text,
|
471 |
-
'display_desc_limit' => $display_desc_limit,
|
472 |
-
'display_link_text' => $display_link_text,
|
473 |
-
'display_link_target' => $display_link_target,
|
474 |
-
'display_separator' => $display_separator,
|
475 |
-
'use_builder' => $use_builder,
|
476 |
-
'builder' => $builder
|
477 |
-
);
|
478 |
-
|
479 |
-
if ( isset( $input['submit_add'] ) )
|
480 |
-
add_settings_error( 'gce_options', 'gce_added', __( sprintf( 'Feed %s added.', absint( $input['id'] ) ), GCE_TEXT_DOMAIN ), 'updated' );
|
481 |
-
else
|
482 |
-
add_settings_error( 'gce_options', 'gce_edited', __( sprintf( 'Settings for feed %s updated.', absint( $input['id'] ) ), GCE_TEXT_DOMAIN ), 'updated' );
|
483 |
-
}
|
484 |
-
|
485 |
-
return $options;
|
486 |
-
}
|
487 |
-
|
488 |
-
//Validate submitted general options
|
489 |
-
function validate_general_options( $input ) {
|
490 |
-
$options = get_option(GCE_GENERAL_OPTIONS_NAME);
|
491 |
-
|
492 |
-
$options['stylesheet'] = esc_url( $input['stylesheet'] );
|
493 |
-
$options['javascript'] = ( isset( $input['javascript'] ) ) ? true : false;
|
494 |
-
$options['loading'] = esc_html( $input['loading'] );
|
495 |
-
$options['error'] = wp_filter_kses( $input['error'] );
|
496 |
-
$options['no_events'] = wp_filter_kses( $input['no_events'] );
|
497 |
-
$options['fields'] = ( isset( $input['fields'] ) ) ? true : false;
|
498 |
-
$options['old_stylesheet'] = ( isset( $input['old_stylesheet'] ) ) ? true : false;
|
499 |
-
|
500 |
-
add_settings_error( 'gce_general', 'gce_general_updated', __( 'General options updated.', GCE_TEXT_DOMAIN ), 'updated' );
|
501 |
-
|
502 |
-
return $options;
|
503 |
-
}
|
504 |
-
|
505 |
-
//Delete all transients (cached feed data) associated with feed specified
|
506 |
-
function delete_feed_transients( $id ) {
|
507 |
-
delete_transient( 'gce_feed_' . $id );
|
508 |
-
delete_transient( 'gce_feed_' . $id . '_url' );
|
509 |
-
}
|
510 |
-
|
511 |
-
//Handles the shortcode stuff
|
512 |
-
function shortcode_handler( $atts ) {
|
513 |
-
$options = get_option( GCE_OPTIONS_NAME );
|
514 |
-
|
515 |
-
//Check that any feeds have been added
|
516 |
-
if ( is_array( $options ) && ! empty( $options ) ) {
|
517 |
-
extract( shortcode_atts( array(
|
518 |
-
'id' => '',
|
519 |
-
'type' => 'grid',
|
520 |
-
'title' => null,
|
521 |
-
'max' => 0,
|
522 |
-
'order' => 'asc'
|
523 |
-
), $atts ) );
|
524 |
-
|
525 |
-
$no_feeds_exist = true;
|
526 |
-
$feed_ids = array();
|
527 |
-
|
528 |
-
if ( '' != $id ) {
|
529 |
-
//Break comma delimited list of feed ids into array
|
530 |
-
$feed_ids = explode( ',', str_replace( ' ', '', $id ) );
|
531 |
-
|
532 |
-
//Check each id is an integer, if not, remove it from the array
|
533 |
-
foreach ( $feed_ids as $key => $feed_id ) {
|
534 |
-
if ( 0 == absint( $feed_id ) )
|
535 |
-
unset( $feed_ids[$key] );
|
536 |
-
}
|
537 |
-
|
538 |
-
//If at least one of the feed ids entered exists, set no_feeds_exist to false
|
539 |
-
foreach ( $feed_ids as $feed_id ) {
|
540 |
-
if ( isset($options[$feed_id] ) )
|
541 |
-
$no_feeds_exist = false;
|
542 |
-
}
|
543 |
-
} else {
|
544 |
-
foreach ( $options as $feed ) {
|
545 |
-
$feed_ids[] = $feed['id'];
|
546 |
-
}
|
547 |
-
|
548 |
-
$no_feeds_exist = false;
|
549 |
-
}
|
550 |
-
|
551 |
-
//Ensure max events is a positive integer
|
552 |
-
$max_events = absint( $max );
|
553 |
-
|
554 |
-
//Ensure sort order is asc or desc
|
555 |
-
$sort_order = ( 'desc' == $order ) ? 'desc' : 'asc';
|
556 |
-
|
557 |
-
//Check that at least one valid feed id has been entered
|
558 |
-
if ( empty( $feed_ids ) || $no_feeds_exist ) {
|
559 |
-
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 );
|
560 |
-
} else {
|
561 |
-
//Turns feed_ids back into string of feed ids delimited by '-' ('1-2-3-4' for example)
|
562 |
-
$feed_ids = implode( '-', $feed_ids );
|
563 |
-
|
564 |
-
//If title has been omitted from shortcode, set title_text to null, otherwise set to title (even if empty string)
|
565 |
-
$title_text = ( false === $title ) ? null : $title;
|
566 |
-
|
567 |
-
switch ( $type ) {
|
568 |
-
case 'grid':
|
569 |
-
return gce_print_grid( $feed_ids, $title_text, $max_events );
|
570 |
-
case 'ajax':
|
571 |
-
return gce_print_grid( $feed_ids, $title_text, $max_events, true );
|
572 |
-
case 'list':
|
573 |
-
return gce_print_list( $feed_ids, $title_text, $max_events, $sort_order );
|
574 |
-
case 'list-grouped':
|
575 |
-
return gce_print_list( $feed_ids, $title_text, $max_events, $sort_order, true );
|
576 |
-
}
|
577 |
-
}
|
578 |
-
} else {
|
579 |
-
return __( 'No feeds have been added yet. You can add a feed in the Google Calendar Events settings.', GCE_TEXT_DOMAIN );
|
580 |
-
}
|
581 |
-
}
|
582 |
-
|
583 |
-
//Adds the required CSS
|
584 |
-
function add_styles() {
|
585 |
-
wp_enqueue_style( 'gce_styles', plugins_url( '/css/gce-style.css', __FILE__ ) );
|
586 |
-
|
587 |
-
$options = get_option( GCE_GENERAL_OPTIONS_NAME );
|
588 |
-
|
589 |
-
//If old stylesheet option is enabled, enqueue old styles
|
590 |
-
if ( $options['old_stylesheet'] )
|
591 |
-
wp_enqueue_style( 'gce_old_styles', plugins_url( '/css/gce-old-style.css', __FILE__ ) );
|
592 |
-
|
593 |
-
//If user has entered a URL to a custom stylesheet, enqueue it too
|
594 |
-
if( '' != $options['stylesheet'] )
|
595 |
-
wp_enqueue_style( 'gce_custom_styles', $options['stylesheet'] );
|
596 |
-
}
|
597 |
-
|
598 |
-
//Adds the required scripts
|
599 |
-
function add_scripts() {
|
600 |
-
$options = get_option( GCE_GENERAL_OPTIONS_NAME );
|
601 |
-
$add_to_footer = (bool) $options['javascript'];
|
602 |
-
|
603 |
-
wp_enqueue_script( 'jquery' );
|
604 |
-
wp_enqueue_script( 'gce_jquery_qtip', plugins_url( '/js/jquery-qtip.js', __FILE__ ), array( 'jquery' ), null, $add_to_footer );
|
605 |
-
wp_enqueue_script( 'gce_scripts', plugins_url( '/js/gce-script.js', __FILE__ ), array( 'jquery' ), null, $add_to_footer );
|
606 |
-
wp_localize_script( 'gce_scripts', 'GoogleCalendarEvents', array(
|
607 |
-
'ajaxurl' => admin_url( 'admin-ajax.php', is_ssl() ? 'https' : 'http' ),
|
608 |
-
'loading' => $options['loading']
|
609 |
-
) );
|
610 |
-
}
|
611 |
-
|
612 |
-
//AJAX stuffs
|
613 |
-
function gce_ajax() {
|
614 |
-
if ( isset( $_GET['gce_feed_ids'] ) ) {
|
615 |
-
$ids = $_GET['gce_feed_ids'];
|
616 |
-
$title = $_GET['gce_title_text'];
|
617 |
-
$max = $_GET['gce_max_events'];
|
618 |
-
$month = $_GET['gce_month'];
|
619 |
-
$year = $_GET['gce_year'];
|
620 |
-
|
621 |
-
$title = ( 'null' == $title ) ? null : $title;
|
622 |
-
|
623 |
-
if ( 'page' == $_GET['gce_type'] ) {
|
624 |
-
//The page grid markup to be returned via AJAX
|
625 |
-
echo gce_print_grid( $ids, $title, $max, true, $month, $year );
|
626 |
-
} elseif ( 'widget' == $_GET['gce_type'] ) {
|
627 |
-
$widget = esc_html( $_GET['gce_widget_id'] );
|
628 |
-
|
629 |
-
//The widget grid markup to be returned via AJAX
|
630 |
-
gce_widget_content_grid( $ids, $title, $max, $widget, true, $month, $year );
|
631 |
-
}
|
632 |
-
}
|
633 |
-
die();
|
634 |
-
}
|
635 |
-
}
|
636 |
-
}
|
637 |
-
|
638 |
-
function gce_print_list( $feed_ids, $title_text, $max_events, $sort_order, $grouped = false ) {
|
639 |
-
require_once 'inc/gce-parser.php';
|
640 |
-
|
641 |
-
$ids = explode( '-', $feed_ids );
|
642 |
-
|
643 |
-
//Create new GCE_Parser object, passing array of feed id(s)
|
644 |
-
$list = new GCE_Parser( $ids, $title_text, $max_events, $sort_order );
|
645 |
-
|
646 |
-
$num_errors = $list->get_num_errors();
|
647 |
-
|
648 |
-
//If there are less errors than feeds parsed, at least one feed must have parsed successfully so continue to display the list
|
649 |
-
if ( $num_errors < count( $ids ) ) {
|
650 |
-
$markup = '<div class="gce-page-list">' . $list->get_list( $grouped ) . '</div>';
|
651 |
-
|
652 |
-
//If there was at least one error, return the list markup with error messages (for admins only)
|
653 |
-
if ( $num_errors > 0 && current_user_can( 'manage_options' ) )
|
654 |
-
return $list->error_messages() . $markup;
|
655 |
-
|
656 |
-
//Otherwise just return the list markup
|
657 |
-
return $markup;
|
658 |
-
} else {
|
659 |
-
//If current user is an admin, display an error message explaining problem(s). Otherwise, display a 'nice' error messsage
|
660 |
-
if ( current_user_can( 'manage_options' ) ) {
|
661 |
-
return $list->error_messages();
|
662 |
-
} else {
|
663 |
-
$options = get_option( GCE_GENERAL_OPTIONS_NAME );
|
664 |
-
return wp_kses_post( $options['error'] );
|
665 |
-
}
|
666 |
-
}
|
667 |
-
}
|
668 |
-
|
669 |
-
function gce_print_grid( $feed_ids, $title_text, $max_events, $ajaxified = false, $month = null, $year = null ) {
|
670 |
-
require_once 'inc/gce-parser.php';
|
671 |
-
|
672 |
-
$ids = explode( '-', $feed_ids );
|
673 |
-
|
674 |
-
//Create new GCE_Parser object, passing array of feed id(s) returned from gce_get_feed_ids()
|
675 |
-
$grid = new GCE_Parser( $ids, $title_text, $max_events );
|
676 |
-
|
677 |
-
$num_errors = $grid->get_num_errors();
|
678 |
-
|
679 |
-
//If there are less errors than feeds parsed, at least one feed must have parsed successfully so continue to display the grid
|
680 |
-
if ( $num_errors < count( $ids ) ) {
|
681 |
-
$feed_ids = esc_attr( $feed_ids );
|
682 |
-
$title_text = isset( $title_text ) ? esc_html( $title_text) : 'null';
|
683 |
-
|
684 |
-
$markup = '<div class="gce-page-grid" id="gce-page-grid-' . $feed_ids . '">';
|
685 |
-
|
686 |
-
//Add AJAX script if required
|
687 |
-
if ( $ajaxified )
|
688 |
-
$markup .= '<script type="text/javascript">jQuery(document).ready(function($){gce_ajaxify("gce-page-grid-' . $feed_ids . '", "' . $feed_ids . '", "' . absint( $max_events ) . '", "' . $title_text . '", "page");});</script>';
|
689 |
-
|
690 |
-
$markup .= $grid->get_grid( $year, $month, $ajaxified ) . '</div>';
|
691 |
-
|
692 |
-
//If there was at least one error, return the grid markup with an error message (for admins only)
|
693 |
-
if ( $num_errors > 0 && current_user_can( 'manage_options' ) )
|
694 |
-
return $grid->error_messages() . $markup;
|
695 |
-
|
696 |
-
//Otherwise just return the grid markup
|
697 |
-
return $markup;
|
698 |
-
} else {
|
699 |
-
//If current user is an admin, display an error message explaining problem. Otherwise, display a 'nice' error messsage
|
700 |
-
if ( current_user_can( 'manage_options' ) ) {
|
701 |
-
return $grid->error_messages();
|
702 |
-
} else {
|
703 |
-
$options = get_option( GCE_GENERAL_OPTIONS_NAME );
|
704 |
-
return wp_kses_post( $options['error'] );
|
705 |
-
}
|
706 |
-
}
|
707 |
-
}
|
708 |
-
|
709 |
-
$gce = new Google_Calendar_Events();
|
710 |
-
?>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Google Calendar Events
|
4 |
+
*
|
5 |
+
* @package GCE
|
6 |
+
* @author Phil Derksen <pderksen@gmail.com>, Nick Young <mycorpweb@gmail.com>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @link http://philderksen.com
|
9 |
+
* @copyright 2014 Phil Derksen
|
10 |
+
*
|
11 |
+
* @wordpress-plugin
|
12 |
+
* Plugin Name: Google Calendar Events
|
13 |
+
* Plugin URI: https://github.com/pderksen/WP-Google-Calendar-Events
|
14 |
+
* Description: Parses Google Calendar feeds and displays the events as a calendar grid or list on a page, post or widget.
|
15 |
+
* Version: 2.0.0-beta1
|
16 |
+
* Author: Phil Derksen
|
17 |
+
* Author URI: http://philderksen.com
|
18 |
+
* License: GPL-2.0+
|
19 |
+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
20 |
+
* Text Domain: gce
|
21 |
+
* Domain Path: /languages
|
22 |
+
*/
|
23 |
+
|
24 |
+
// If this file is called directly, abort.
|
25 |
+
if ( ! defined( 'WPINC' ) ) {
|
26 |
+
die;
|
27 |
+
}
|
28 |
+
|
29 |
+
/*
|
30 |
+
* Include the main plugin file
|
31 |
+
*
|
32 |
+
* @since 2.0.0
|
33 |
+
*/
|
34 |
+
require_once( 'class-google-calendar-events.php' );
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Define constant pointing to this file
|
38 |
+
*
|
39 |
+
* @since 2.0.0
|
40 |
+
*/
|
41 |
+
if( ! defined( 'GCE_MAIN_FILE' ) ) {
|
42 |
+
define( 'GCE_MAIN_FILE', __FILE__ );
|
43 |
+
}
|
44 |
+
|
45 |
+
/*
|
46 |
+
* Get instance of our plugin
|
47 |
+
*
|
48 |
+
* @since 2.0.0
|
49 |
+
*/
|
50 |
+
add_action( 'plugins_loaded', array( 'Google_Calendar_Events', 'get_instance' ) );
|
51 |
+
|
52 |
+
/*
|
53 |
+
* If we are in admin then load the Admin class
|
54 |
+
*
|
55 |
+
* @since 2.0.0
|
56 |
+
*/
|
57 |
+
if ( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) {
|
58 |
+
require_once( 'class-google-calendar-events-admin.php' );
|
59 |
+
add_action( 'plugins_loaded', array( 'Google_Calendar_Events_Admin', 'get_instance' ) );
|
60 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/gce-feed.php
DELETED
@@ -1,273 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class GCE_Feed{
|
3 |
-
private $feed_id = 1;
|
4 |
-
private $feed_title = '';
|
5 |
-
private $feed_url = '';
|
6 |
-
private $max_events = 25;
|
7 |
-
private $cache_duration = 43200;
|
8 |
-
private $date_format = '';
|
9 |
-
private $time_format = '';
|
10 |
-
private $timezone = '';
|
11 |
-
private $display_opts = array();
|
12 |
-
private $multi_day = false;
|
13 |
-
private $feed_start = 0;
|
14 |
-
private $feed_end = 2145916800;
|
15 |
-
private $use_builder = true;
|
16 |
-
private $builder = '';
|
17 |
-
private $events = array();
|
18 |
-
private $error = false;
|
19 |
-
private $text_query = '';
|
20 |
-
private $expand_recurring = false;
|
21 |
-
|
22 |
-
function init() {
|
23 |
-
require_once 'gce-event.php';
|
24 |
-
|
25 |
-
//Break the feed URL up into its parts (scheme, host, path, query)
|
26 |
-
$url_parts = parse_url( $this->feed_url );
|
27 |
-
|
28 |
-
$scheme_and_host = $url_parts['scheme'] . '://' . $url_parts['host'];
|
29 |
-
|
30 |
-
//Remove the exisitng projection from the path, and replace it with '/full-noattendees'
|
31 |
-
$path = substr( $url_parts['path'], 0, strrpos( $url_parts['path'], '/' ) ) . '/full-noattendees';
|
32 |
-
|
33 |
-
//Add the default parameters to the querystring (retrieving JSON, not XML)
|
34 |
-
$query = '?alt=json&sortorder=ascending&orderby=starttime';
|
35 |
-
|
36 |
-
$gmt_offset = get_option( 'gmt_offset' ) * 3600;
|
37 |
-
|
38 |
-
//Append the feed specific parameters to the querystring
|
39 |
-
$query .= '&start-min=' . date( 'Y-m-d\TH:i:s', $this->feed_start - $gmt_offset );
|
40 |
-
$query .= '&start-max=' . date( 'Y-m-d\TH:i:s', $this->feed_end - $gmt_offset );
|
41 |
-
$query .= '&max-results=' . $this->max_events;
|
42 |
-
|
43 |
-
if ( ! empty( $this->timezone ) )
|
44 |
-
$query .= '&ctz=' . $this->timezone;
|
45 |
-
|
46 |
-
if ( ! empty( $this->text_query ) )
|
47 |
-
$query .= '&q=' . rawurlencode( $this->text_query );
|
48 |
-
|
49 |
-
if ( $this->expand_recurring )
|
50 |
-
$query .= '&singleevents=true';
|
51 |
-
|
52 |
-
//If enabled, use experimental 'fields' parameter of Google Data API, so that only necessary data is retrieved. This *significantly* reduces amount of data to retrieve and process
|
53 |
-
$general_options = get_option( GCE_GENERAL_OPTIONS_NAME );
|
54 |
-
if ( $general_options['fields'] )
|
55 |
-
$query .= '&fields=entry(title,link[@rel="alternate"],content,gd:where,gd:when,gd:recurrence,gCal:uid)';
|
56 |
-
|
57 |
-
//Put the URL back together
|
58 |
-
$url = $scheme_and_host . $path . $query;
|
59 |
-
|
60 |
-
//Attempt to retrieve the cached feed data
|
61 |
-
$this->events = get_transient( 'gce_feed_' . $this->feed_id );
|
62 |
-
|
63 |
-
//If the cached feed data isn't valid any more (has expired), or the URL has changed (settings have changed), then the feed data needs to be retrieved and decoded again
|
64 |
-
if ( false === $this->events || 0 == $this->cache_duration || get_transient( 'gce_feed_' . $this->feed_id . '_url' ) != $url ) {
|
65 |
-
$this->events = array();
|
66 |
-
|
67 |
-
//Retrieve the feed data
|
68 |
-
$raw_data = wp_remote_get( $url, array(
|
69 |
-
'sslverify' => false, //sslverify is set to false to ensure https URLs work reliably. Data source is Google's servers, so is trustworthy
|
70 |
-
'timeout' => 10 //Increase timeout from the default 5 seconds to ensure even large feeds are retrieved successfully
|
71 |
-
) );
|
72 |
-
|
73 |
-
//If $raw_data is a WP_Error, something went wrong
|
74 |
-
if ( ! is_wp_error( $raw_data ) ) {
|
75 |
-
//If response code isn't 200, something went wrong
|
76 |
-
if ( 200 == $raw_data['response']['code'] ) {
|
77 |
-
//Attempt to convert the returned JSON into an array
|
78 |
-
$raw_data = json_decode( $raw_data['body'], true );
|
79 |
-
|
80 |
-
//If decoding was successful
|
81 |
-
if ( ! empty( $raw_data ) ) {
|
82 |
-
//If there are some entries (events) to process
|
83 |
-
if ( isset( $raw_data['feed']['entry'] ) ) {
|
84 |
-
//Loop through each event, extracting the relevant information
|
85 |
-
foreach ( $raw_data['feed']['entry'] as $event ) {
|
86 |
-
$id = esc_html( substr( $event['gCal$uid']['value'], 0, strpos( $event['gCal$uid']['value'], '@' ) ) );
|
87 |
-
$title = esc_html( $event['title']['$t'] );
|
88 |
-
$description = esc_html( $event['content']['$t'] );
|
89 |
-
$link = esc_url( $event['link'][0]['href'] );
|
90 |
-
$location = esc_html( $event['gd$where'][0]['valueString'] );
|
91 |
-
$start_time = $this->iso_to_ts( $event['gd$when'][0]['startTime'] );
|
92 |
-
$end_time = $this->iso_to_ts( $event['gd$when'][0]['endTime'] );
|
93 |
-
$recurs = isset( $event['gd$recurrence'] );
|
94 |
-
|
95 |
-
//Create a GCE_Event using the above data. Add it to the array of events
|
96 |
-
$this->events[] = new GCE_Event( $id, $title, $description, $location, $start_time, $end_time, $link, $recurs );
|
97 |
-
}
|
98 |
-
}
|
99 |
-
|
100 |
-
if ( 0 != $this->cache_duration ) {
|
101 |
-
//Cache the feed data
|
102 |
-
set_transient( 'gce_feed_' . $this->feed_id, $this->events, $this->cache_duration );
|
103 |
-
set_transient( 'gce_feed_' . $this->feed_id . '_url', $url, $this->cache_duration );
|
104 |
-
}
|
105 |
-
} else {
|
106 |
-
//json_decode failed
|
107 |
-
$this->error = __( 'Some data was retrieved, but could not be parsed successfully. Please ensure your feed URL is correct.', GCE_TEXT_DOMAIN );
|
108 |
-
}
|
109 |
-
} else {
|
110 |
-
//The response code wasn't 200, so generate a helpful(ish) error message depending on error code
|
111 |
-
switch ( $raw_data['response']['code'] ) {
|
112 |
-
case 404:
|
113 |
-
$this->error = __( 'The feed could not be found (404). Please ensure your feed URL is correct.', GCE_TEXT_DOMAIN );
|
114 |
-
break;
|
115 |
-
case 403:
|
116 |
-
$this->error = __( 'Access to this feed was denied (403). Please ensure you have public sharing enabled for your calendar.', GCE_TEXT_DOMAIN );
|
117 |
-
break;
|
118 |
-
default:
|
119 |
-
$this->error = sprintf( __( 'The feed data could not be retrieved. Error code: %s. Please ensure your feed URL is correct.', GCE_TEXT_DOMAIN ), $raw_data['response']['code'] );
|
120 |
-
}
|
121 |
-
}
|
122 |
-
}else{
|
123 |
-
//Generate an error message from the returned WP_Error
|
124 |
-
$this->error = $raw_data->get_error_message() . ' Please ensure your feed URL is correct.';
|
125 |
-
}
|
126 |
-
}
|
127 |
-
|
128 |
-
//Makes sure each event knows it came from this feed
|
129 |
-
foreach ( $this->events as $event ) {
|
130 |
-
$event->set_feed( $this );
|
131 |
-
}
|
132 |
-
}
|
133 |
-
|
134 |
-
//Convert an ISO date/time to a UNIX timestamp
|
135 |
-
function iso_to_ts( $iso ) {
|
136 |
-
sscanf( $iso, "%u-%u-%uT%u:%u:%uZ", $year, $month, $day, $hour, $minute, $second );
|
137 |
-
return mktime( $hour, $minute, $second, $month, $day, $year );
|
138 |
-
}
|
139 |
-
|
140 |
-
//Return error message, or false if no error occurred
|
141 |
-
function error() {
|
142 |
-
return $this->error;
|
143 |
-
}
|
144 |
-
|
145 |
-
//Setters
|
146 |
-
|
147 |
-
function set_feed_id( $v ) {
|
148 |
-
$this->feed_id = $v;
|
149 |
-
}
|
150 |
-
|
151 |
-
function set_feed_title( $v ) {
|
152 |
-
$this->feed_title = $v;
|
153 |
-
}
|
154 |
-
|
155 |
-
function set_feed_url( $v ) {
|
156 |
-
$this->feed_url = $v;
|
157 |
-
}
|
158 |
-
|
159 |
-
function set_max_events( $v ) {
|
160 |
-
$this->max_events = $v;
|
161 |
-
}
|
162 |
-
|
163 |
-
function set_cache_duration( $v ) {
|
164 |
-
$this->cache_duration = $v;
|
165 |
-
}
|
166 |
-
|
167 |
-
function set_date_format( $v ) {
|
168 |
-
$this->date_format = $v;
|
169 |
-
}
|
170 |
-
|
171 |
-
function set_time_format( $v ) {
|
172 |
-
$this->time_format = $v;
|
173 |
-
}
|
174 |
-
|
175 |
-
function set_timezone( $v ) {
|
176 |
-
$this->timezone = $v;
|
177 |
-
}
|
178 |
-
|
179 |
-
function set_display_options( $v ) {
|
180 |
-
$this->display_opts = $v;
|
181 |
-
}
|
182 |
-
|
183 |
-
function set_multi_day( $v ) {
|
184 |
-
$this->multi_day = $v;
|
185 |
-
}
|
186 |
-
|
187 |
-
function set_feed_start( $v ) {
|
188 |
-
$this->feed_start = $v;
|
189 |
-
}
|
190 |
-
|
191 |
-
function set_feed_end( $v ) {
|
192 |
-
$this->feed_end = $v;
|
193 |
-
}
|
194 |
-
|
195 |
-
function set_use_builder( $v ) {
|
196 |
-
$this->use_builder = $v;
|
197 |
-
}
|
198 |
-
|
199 |
-
function set_builder( $v ) {
|
200 |
-
$this->builder = $v;
|
201 |
-
}
|
202 |
-
|
203 |
-
function set_query( $v ) {
|
204 |
-
$this->text_query = $v;
|
205 |
-
}
|
206 |
-
|
207 |
-
function set_expand_recurring( $v ) {
|
208 |
-
$this->expand_recurring = $v;
|
209 |
-
}
|
210 |
-
|
211 |
-
//Getters
|
212 |
-
|
213 |
-
function get_events() {
|
214 |
-
return $this->events;
|
215 |
-
}
|
216 |
-
|
217 |
-
function get_feed_id() {
|
218 |
-
return $this->feed_id;
|
219 |
-
}
|
220 |
-
|
221 |
-
function get_feed_title() {
|
222 |
-
return $this->feed_title;
|
223 |
-
}
|
224 |
-
|
225 |
-
function get_feed_url() {
|
226 |
-
return $this->feed_url;
|
227 |
-
}
|
228 |
-
|
229 |
-
function get_date_format() {
|
230 |
-
return $this->date_format;
|
231 |
-
}
|
232 |
-
|
233 |
-
function get_time_format() {
|
234 |
-
return $this->time_format;
|
235 |
-
}
|
236 |
-
|
237 |
-
function get_display_options() {
|
238 |
-
return $this->display_opts;
|
239 |
-
}
|
240 |
-
|
241 |
-
function get_multi_day() {
|
242 |
-
return $this->multi_day;
|
243 |
-
}
|
244 |
-
|
245 |
-
function get_feed_start() {
|
246 |
-
return $this->feed_start;
|
247 |
-
}
|
248 |
-
|
249 |
-
function get_feed_end() {
|
250 |
-
return $this->feed_end;
|
251 |
-
}
|
252 |
-
|
253 |
-
function get_timezone() {
|
254 |
-
return $this->timezone;
|
255 |
-
}
|
256 |
-
|
257 |
-
function get_use_builder() {
|
258 |
-
return $this->use_builder;
|
259 |
-
}
|
260 |
-
|
261 |
-
function get_builder() {
|
262 |
-
return $this->builder;
|
263 |
-
}
|
264 |
-
|
265 |
-
function get_query() {
|
266 |
-
return $this->text_query;
|
267 |
-
}
|
268 |
-
|
269 |
-
function get_expand_recurring() {
|
270 |
-
return $this->expand_recurring;
|
271 |
-
}
|
272 |
-
}
|
273 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/gce-parser.php
DELETED
@@ -1,372 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class GCE_Parser {
|
3 |
-
private $feeds = array();
|
4 |
-
private $merged_feed_data = array();
|
5 |
-
private $errors = array();
|
6 |
-
private $title = null;
|
7 |
-
private $max_events_display = 0;
|
8 |
-
private $start_of_week = 0;
|
9 |
-
private $sort_order = 'asc';
|
10 |
-
|
11 |
-
function __construct( $feed_ids, $title_text = null, $max_events = 0, $sort_order = 'asc' ) {
|
12 |
-
require_once 'gce-feed.php';
|
13 |
-
|
14 |
-
$this->title = $title_text;
|
15 |
-
$this->max_events_display = $max_events;
|
16 |
-
$this->sort_order = $sort_order;
|
17 |
-
|
18 |
-
//Get the feed options
|
19 |
-
$options = get_option( GCE_OPTIONS_NAME );
|
20 |
-
|
21 |
-
$this->start_of_week = get_option( 'start_of_week' );
|
22 |
-
|
23 |
-
foreach ( $feed_ids as $single_feed ) {
|
24 |
-
//Get the options for this particular feed
|
25 |
-
if ( isset( $options[$single_feed] ) ) {
|
26 |
-
$feed_options = $options[$single_feed];
|
27 |
-
|
28 |
-
$feed = new GCE_Feed();
|
29 |
-
|
30 |
-
$feed->set_feed_id( $feed_options['id'] );
|
31 |
-
$feed->set_feed_title( $feed_options['title'] );
|
32 |
-
$feed->set_feed_url( $feed_options['url'] );
|
33 |
-
$feed->set_max_events( $feed_options['max_events'] );
|
34 |
-
$feed->set_cache_duration( $feed_options['cache_duration'] );
|
35 |
-
|
36 |
-
//Set the timezone if anything other than default
|
37 |
-
if ( 'default' != $feed_options['timezone'] )
|
38 |
-
$feed->set_timezone( $feed_options['timezone'] );
|
39 |
-
|
40 |
-
$now = current_time( 'timestamp' );
|
41 |
-
|
42 |
-
//Set the start date to the appropriate value based on the retrieve_from option
|
43 |
-
switch ( $feed_options['retrieve_from'] ) {
|
44 |
-
//Don't just use time() for 'now', as this will effectively make cache duration 1 second. Instead set to previous minute. Events in Google Calendar cannot be set to precision of seconds anyway
|
45 |
-
case 'now':
|
46 |
-
$feed->set_feed_start( mktime( date( 'H', $now ), date( 'i', $now ), 0, date( 'm', $now ), date( 'j', $now ), date( 'Y', $now ) ) + $feed_options['retrieve_from_value'] );
|
47 |
-
break;
|
48 |
-
case 'today':
|
49 |
-
$feed->set_feed_start( mktime( 0, 0, 0, date( 'm', $now ), date( 'j', $now ), date( 'Y', $now ) ) + $feed_options['retrieve_from_value'] );
|
50 |
-
break;
|
51 |
-
case 'week':
|
52 |
-
//If current day of week is before week start day, adjust week start date to previous week
|
53 |
-
$diff = date( 'w', $now ) - $this->start_of_week;
|
54 |
-
$diff = ( $diff < 0 ) ? -$diff + 7 : -$diff;
|
55 |
-
|
56 |
-
$feed->set_feed_start( mktime( 0, 0, 0, date( 'm', $now ), ( date( 'j', $now ) + $diff ), date( 'Y', $now ) ) + $feed_options['retrieve_from_value'] );
|
57 |
-
break;
|
58 |
-
case 'month-start':
|
59 |
-
$feed->set_feed_start( mktime( 0, 0, 0, date( 'm', $now ), 1, date( 'Y', $now ) ) + $feed_options['retrieve_from_value'] );
|
60 |
-
break;
|
61 |
-
case 'month-end':
|
62 |
-
$feed->set_feed_start( mktime( 0, 0, 0, date( 'm', $now ) + 1, 1, date( 'Y', $now ) ) + $feed_options['retrieve_from_value'] );
|
63 |
-
break;
|
64 |
-
case 'date':
|
65 |
-
$feed->set_feed_start( $feed_options['retrieve_from_value'] );
|
66 |
-
break;
|
67 |
-
default:
|
68 |
-
$feed->set_feed_start( 0 ); //any - 1970-01-01 00:00
|
69 |
-
}
|
70 |
-
|
71 |
-
//Set the end date to the appropriate value based on the retrieve_until option
|
72 |
-
switch ( $feed_options['retrieve_until'] ) {
|
73 |
-
case 'now':
|
74 |
-
$feed->set_feed_end( mktime( date( 'H', $now ), date( 'i', $now ), 0, date( 'm', $now ), date( 'j', $now ), date( 'Y', $now ) ) + $feed_options['retrieve_until_value'] );
|
75 |
-
break;
|
76 |
-
case 'today':
|
77 |
-
$feed->set_feed_end( mktime( 0, 0, 0, date( 'm', $now ), date( 'j', $now ), date( 'Y', $now ) ) + $feed_options['retrieve_until_value'] );
|
78 |
-
break;
|
79 |
-
case 'week':
|
80 |
-
//If current day of week is before week start day, adjust week start date to previous week
|
81 |
-
$diff = date( 'w', $now ) - $this->start_of_week;
|
82 |
-
$diff = ( $diff < 0 ) ? -$diff + 7 : -$diff;
|
83 |
-
|
84 |
-
$feed->set_feed_end( mktime( 0, 0, 0, date( 'm', $now ), ( date( 'j', $now ) + $diff ), date( 'Y', $now ) ) + $feed_options['retrieve_until_value'] );
|
85 |
-
break;
|
86 |
-
case 'month-start':
|
87 |
-
$feed->set_feed_end( mktime( 0, 0, 0, date( 'm', $now ), 1, date( 'Y', $now ) ) + $feed_options['retrieve_until_value'] );
|
88 |
-
break;
|
89 |
-
case 'month-end':
|
90 |
-
$feed->set_feed_end( mktime( 0, 0, 0, date( 'm', $now ) + 1, 1, date( 'Y', $now ) ) + $feed_options['retrieve_until_value'] );
|
91 |
-
break;
|
92 |
-
case 'date':
|
93 |
-
$feed->set_feed_end( $feed_options['retrieve_until_value'] );
|
94 |
-
break;
|
95 |
-
case 'any':
|
96 |
-
$feed->set_feed_end( 2145916800 ); //any - 2038-01-01 00:00
|
97 |
-
}
|
98 |
-
|
99 |
-
//Set date and time formats. If they have not been set by user, set to global WordPress formats
|
100 |
-
$feed->set_date_format( ( empty( $feed_options['date_format'] ) ) ? get_option( 'date_format' ) : $feed_options['date_format'] );
|
101 |
-
$feed->set_time_format( ( empty( $feed_options['time_format'] ) ) ? get_option( 'time_format' ) : $feed_options['time_format'] );
|
102 |
-
//Set whether to handle multiple day events
|
103 |
-
$feed->set_multi_day( ( 'true' == $feed_options['multiple_day'] ) ? true : false );
|
104 |
-
|
105 |
-
if ( ! empty( $feed_options['query'] ) )
|
106 |
-
$feed->set_query( $feed_options['query'] );
|
107 |
-
|
108 |
-
$feed->set_expand_recurring( ( 'true' == $feed_options['expand_recurring'] ) ? true : false );
|
109 |
-
|
110 |
-
//Sets all display options
|
111 |
-
$feed->set_display_options( array(
|
112 |
-
'display_start' => $feed_options['display_start'],
|
113 |
-
'display_end' => $feed_options['display_end'],
|
114 |
-
'display_location' => $feed_options['display_location'],
|
115 |
-
'display_desc' => $feed_options['display_desc'],
|
116 |
-
'display_link' => $feed_options['display_link'],
|
117 |
-
'display_start_text' => $feed_options['display_start_text'],
|
118 |
-
'display_end_text' => $feed_options['display_end_text'],
|
119 |
-
'display_location_text' => $feed_options['display_location_text'],
|
120 |
-
'display_desc_text' => $feed_options['display_desc_text'],
|
121 |
-
'display_desc_limit' => $feed_options['display_desc_limit'],
|
122 |
-
'display_link_text' => $feed_options['display_link_text'],
|
123 |
-
'display_link_target' => $feed_options['display_link_target'],
|
124 |
-
'display_separator' => $feed_options['display_separator']
|
125 |
-
) );
|
126 |
-
|
127 |
-
$feed->set_use_builder( ( 'true' == $feed_options['use_builder'] ) ? true : false );
|
128 |
-
$feed->set_builder( $feed_options['builder'] );
|
129 |
-
|
130 |
-
//Parse the feed
|
131 |
-
$feed->init();
|
132 |
-
|
133 |
-
//Add feed object to array of feeds
|
134 |
-
$this->feeds[$single_feed] = $feed;
|
135 |
-
}
|
136 |
-
}
|
137 |
-
|
138 |
-
$this->merged_feed_data = array();
|
139 |
-
|
140 |
-
//Merge the feeds together into one array of events
|
141 |
-
foreach ( $this->feeds as $feed_id => $feed ) {
|
142 |
-
$errors_occurred = $feed->error();
|
143 |
-
|
144 |
-
if ( false === $errors_occurred )
|
145 |
-
$this->merged_feed_data = array_merge( $this->merged_feed_data, $feed->get_events() );
|
146 |
-
else
|
147 |
-
$this->errors[$feed_id] = $errors_occurred;
|
148 |
-
}
|
149 |
-
|
150 |
-
//Sort the items into date order
|
151 |
-
if ( ! empty( $this->merged_feed_data ) )
|
152 |
-
usort( $this->merged_feed_data, array( $this, 'compare' ) );
|
153 |
-
}
|
154 |
-
|
155 |
-
//Comparison function for use when sorting merged feed data (with usort)
|
156 |
-
function compare( $event1, $event2 ) {
|
157 |
-
//Sort ascending or descending
|
158 |
-
if ( 'asc' == $this->sort_order )
|
159 |
-
return $event1->get_start_time() - $event2->get_start_time();
|
160 |
-
|
161 |
-
return $event2->get_start_time() - $event1->get_start_time();
|
162 |
-
}
|
163 |
-
|
164 |
-
//Returns number of errors that have occurred
|
165 |
-
function get_num_errors() {
|
166 |
-
return count( $this->errors );
|
167 |
-
}
|
168 |
-
|
169 |
-
//Outputs a message describing each error that has occurred
|
170 |
-
function error_messages() {
|
171 |
-
$message = '<p>' . __( '1 or more of your feeds could not be displayed. The following errors occurred:', GCE_TEXT_DOMAIN ) . '</p><ul>';
|
172 |
-
|
173 |
-
foreach ( $this->errors as $feed_id => $error ) {
|
174 |
-
$message .= '<li><strong>' . sprintf( __( 'Feed %s:', GCE_TEXT_DOMAIN ), $feed_id ) . '</strong> ' . $error . '</li>';
|
175 |
-
}
|
176 |
-
|
177 |
-
return $message . '</ul>';
|
178 |
-
}
|
179 |
-
|
180 |
-
//Returns array of days with events, with sub-arrays of events for that day
|
181 |
-
function get_event_days() {
|
182 |
-
$event_days = array();
|
183 |
-
|
184 |
-
//Total number of events retrieved
|
185 |
-
$count = count( $this->merged_feed_data );
|
186 |
-
|
187 |
-
//If maximum events to display is 0 (unlimited) set $max to 1, otherwise use maximum of events specified by user
|
188 |
-
$max = ( 0 == $this->max_events_display ) ? 1 : $this->max_events_display;
|
189 |
-
|
190 |
-
//Loop through entire array of events, or until maximum number of events to be displayed has been reached
|
191 |
-
for ( $i = 0; $i < $count && $max > 0; $i++ ) {
|
192 |
-
$event = $this->merged_feed_data[$i];
|
193 |
-
|
194 |
-
//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.
|
195 |
-
if ( $event->get_end_time() > $event->get_feed()->get_feed_start() && $event->get_start_time() < $event->get_feed()->get_feed_end() ) {
|
196 |
-
foreach ( $event->get_days() as $day ) {
|
197 |
-
$event_days[$day][] = $event;
|
198 |
-
}
|
199 |
-
|
200 |
-
//If maximum events to display isn't 0 (unlimited) decrement $max counter
|
201 |
-
if ( 0 != $this->max_events_display )
|
202 |
-
$max--;
|
203 |
-
}
|
204 |
-
}
|
205 |
-
|
206 |
-
return $event_days;
|
207 |
-
}
|
208 |
-
|
209 |
-
//Returns grid markup
|
210 |
-
function get_grid ( $year = null, $month = null, $ajaxified = false ) {
|
211 |
-
require_once 'php-calendar.php';
|
212 |
-
|
213 |
-
$time_now = current_time( 'timestamp' );
|
214 |
-
|
215 |
-
//If year and month have not been passed as paramaters, use current month and year
|
216 |
-
if( ! isset( $year ) )
|
217 |
-
$year = date( 'Y', $time_now );
|
218 |
-
|
219 |
-
if( ! isset( $month ) )
|
220 |
-
$month = date( 'm', $time_now );
|
221 |
-
|
222 |
-
//Get timestamps for the start and end of current month
|
223 |
-
$current_month_start = mktime( 0, 0, 0, date( 'm', $time_now ), 1, date( 'Y', $time_now ) );
|
224 |
-
$current_month_end = mktime( 0, 0, 0, date( 'm', $time_now ) + 1, 1, date( 'Y', $time_now ) );
|
225 |
-
|
226 |
-
//Get timestamps for the start and end of the month to be displayed in the grid
|
227 |
-
$display_month_start = mktime( 0, 0, 0, $month, 1, $year );
|
228 |
-
$display_month_end = mktime( 0, 0, 0, $month + 1, 1, $year );
|
229 |
-
|
230 |
-
//It should always be possible to navigate to the current month, even if it doesn't have any events
|
231 |
-
//So, if the display month is before the current month, set $nav_next to true, otherwise false
|
232 |
-
//If the display month is after the current month, set $nav_prev to true, otherwise false
|
233 |
-
$nav_next = ( $display_month_start < $current_month_start );
|
234 |
-
$nav_prev = ( $display_month_start >= $current_month_end );
|
235 |
-
|
236 |
-
//Get events data
|
237 |
-
$event_days = $this->get_event_days();
|
238 |
-
|
239 |
-
//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)
|
240 |
-
if ( empty( $event_days ) )
|
241 |
-
$ajaxified = false;
|
242 |
-
|
243 |
-
$today = mktime( 0, 0, 0, date( 'm', $time_now ), date( 'd', $time_now ), date( 'Y', $time_now ) );
|
244 |
-
|
245 |
-
$i = 1;
|
246 |
-
|
247 |
-
foreach ( $event_days as $key => $event_day ) {
|
248 |
-
//If event day is in the month and year specified (by $month and $year)
|
249 |
-
if ( $key >= $display_month_start && $key < $display_month_end ) {
|
250 |
-
//Create array of CSS classes. Add gce-has-events
|
251 |
-
$css_classes = array( 'gce-has-events' );
|
252 |
-
|
253 |
-
//Create markup for display
|
254 |
-
$markup = '<div class="gce-event-info">';
|
255 |
-
|
256 |
-
//If title option has been set for display, add it
|
257 |
-
if ( isset( $this->title ) )
|
258 |
-
$markup .= '<div class="gce-tooltip-title">' . esc_html( $this->title ) . ' ' . date_i18n( $event_day[0]->get_feed()->get_date_format(), $key ) . '</div>';
|
259 |
-
|
260 |
-
$markup .= '<ul>';
|
261 |
-
|
262 |
-
foreach ( $event_day as $num_in_day => $event ) {
|
263 |
-
$feed_id = absint( $event->get_feed()->get_feed_id() );
|
264 |
-
$markup .= '<li class="gce-tooltip-feed-' . $feed_id . '">' . $event->get_event_markup( 'tooltip', $num_in_day, $i ) . '</li>';
|
265 |
-
|
266 |
-
//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.
|
267 |
-
$css_classes['feed-' . $feed_id] = 'gce-feed-' . $feed_id;
|
268 |
-
|
269 |
-
$i++;
|
270 |
-
}
|
271 |
-
|
272 |
-
$markup .= '</ul></div>';
|
273 |
-
|
274 |
-
//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
|
275 |
-
if ( count( $css_classes ) > 2 )
|
276 |
-
$css_classes[] = 'gce-multiple';
|
277 |
-
|
278 |
-
//If event day is today, add gce-today CSS class, otherwise add past or future class
|
279 |
-
if ( $key == $today )
|
280 |
-
$css_classes[] = 'gce-today gce-today-has-events';
|
281 |
-
elseif ( $key < $today )
|
282 |
-
$css_classes[] = 'gce-day-past';
|
283 |
-
else
|
284 |
-
$css_classes[] = 'gce-day-future';
|
285 |
-
|
286 |
-
//Change array entry to array of link href, CSS classes, and markup for use in gce_generate_calendar (below)
|
287 |
-
$event_days[$key] = array( null, implode( ' ', $css_classes ), $markup );
|
288 |
-
} elseif ( $key < $display_month_start ) {
|
289 |
-
//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
|
290 |
-
$nav_prev = true;
|
291 |
-
unset( $event_days[$key] );
|
292 |
-
} else {
|
293 |
-
//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
|
294 |
-
$nav_next = true;
|
295 |
-
unset( $event_days[$key] );
|
296 |
-
}
|
297 |
-
}
|
298 |
-
|
299 |
-
//Ensures that gce-today CSS class is added even if there are no events for 'today'. A bit messy :(
|
300 |
-
if ( ! isset( $event_days[$today] ) )
|
301 |
-
$event_days[$today] = array( null, 'gce-today gce-today-no-events', null );
|
302 |
-
|
303 |
-
$pn = array();
|
304 |
-
|
305 |
-
//Only add previous / next functionality if AJAX grid is enabled
|
306 |
-
if ( $ajaxified ) {
|
307 |
-
//If there are events to display in a previous month, add previous month link
|
308 |
-
$prev_key = ( $nav_prev ) ? '«' : ' ';
|
309 |
-
$prev = ( $nav_prev ) ? date( 'm-Y', mktime( 0, 0, 0, $month - 1, 1, $year ) ) : null;
|
310 |
-
|
311 |
-
//If there are events to display in a future month, add next month link
|
312 |
-
$next_key = ( $nav_next ) ? '»' : ' ';
|
313 |
-
$next = ( $nav_next ) ? date( 'm-Y', mktime( 0, 0, 0, $month + 1, 1, $year ) ) : null;
|
314 |
-
|
315 |
-
//Array of previous and next link stuff for use in gce_generate_calendar (below)
|
316 |
-
$pn = array( $prev_key => $prev, $next_key => $next );
|
317 |
-
}
|
318 |
-
|
319 |
-
//Generate the calendar markup and return it
|
320 |
-
return gce_generate_calendar( $year, $month, $event_days, 1, null, $this->start_of_week, $pn );
|
321 |
-
}
|
322 |
-
|
323 |
-
function get_list( $grouped = false ) {
|
324 |
-
$time_now = current_time( 'timestamp' );
|
325 |
-
|
326 |
-
$event_days = $this->get_event_days();
|
327 |
-
|
328 |
-
//If event_days is empty, there are no events in the feed(s), so return a message indicating this
|
329 |
-
if( empty( $event_days) ) {
|
330 |
-
$options = get_option( GCE_GENERAL_OPTIONS_NAME );
|
331 |
-
return '<p>' . wp_kses_post( $options['no_events'] ) . '</p>';
|
332 |
-
}
|
333 |
-
|
334 |
-
$today = mktime( 0, 0, 0, date( 'm', $time_now ), date( 'd', $time_now ), date( 'Y', $time_now ) );
|
335 |
-
|
336 |
-
$i = 1;
|
337 |
-
|
338 |
-
$markup = '<ul class="gce-list">';
|
339 |
-
|
340 |
-
foreach ( $event_days as $key => $event_day ) {
|
341 |
-
//If this is a grouped list, add the date title and begin the nested list for this day
|
342 |
-
if ( $grouped ) {
|
343 |
-
$markup .=
|
344 |
-
'<li' . ( ( $key == $today ) ? ' class="gce-today"' : '' ) . '>' .
|
345 |
-
'<div class="gce-list-title">' . esc_html( $this->title ) . ' ' . date_i18n( $event_day[0]->get_feed()->get_date_format(), $key ) . '</div>' .
|
346 |
-
'<ul>';
|
347 |
-
}
|
348 |
-
|
349 |
-
foreach ( $event_day as $num_in_day => $event ) {
|
350 |
-
//Create the markup for this event
|
351 |
-
$markup .=
|
352 |
-
'<li class="gce-feed-' . $event->get_feed()->get_feed_id() . '">' .
|
353 |
-
//If this isn't a grouped list and a date title should be displayed, add the date title
|
354 |
-
( ( ! $grouped && isset( $this->title ) ) ? '<div class="gce-list-title">' . esc_html( $this->title ) . ' ' . date_i18n( $event->get_feed()->get_date_format(), $key ) . '</div>' : '' ) .
|
355 |
-
//Add the event markup
|
356 |
-
$event->get_event_markup( 'list', $num_in_day, $i ) .
|
357 |
-
'</li>';
|
358 |
-
|
359 |
-
$i++;
|
360 |
-
}
|
361 |
-
|
362 |
-
//If this is a grouped list, close the nested list for this day
|
363 |
-
if ( $grouped )
|
364 |
-
$markup .= '</ul></li>';
|
365 |
-
}
|
366 |
-
|
367 |
-
$markup .= '</ul>';
|
368 |
-
|
369 |
-
return $markup;
|
370 |
-
}
|
371 |
-
}
|
372 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/admin/admin-functions.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin helper functions
|
4 |
+
*
|
5 |
+
* @package GCE
|
6 |
+
* @author Phil Derksen <pderksen@gmail.com>, Nick Young <mycorpweb@gmail.com>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @copyright 2014 Phil Derksen
|
9 |
+
*/
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Function to clear the cache out
|
13 |
+
*
|
14 |
+
* @since 2.0.0
|
15 |
+
*/
|
16 |
+
function gce_clear_cache( $id ) {
|
17 |
+
|
18 |
+
delete_transient( 'gce_feed_' . $id );
|
19 |
+
|
20 |
+
add_settings_error( 'gce-notices', 'gce-cache-updated', __( 'Cache has been cleared for this feed.', 'gce' ), 'updated' );
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Function that runs when a new Feed CPT is made
|
25 |
+
* Adds the default editor content for the event builder
|
26 |
+
* Adds default post meta options
|
27 |
+
*
|
28 |
+
* @since 2.0.0
|
29 |
+
*/
|
30 |
+
|
31 |
+
function gce_default_editor_content( $content, $post ) {
|
32 |
+
|
33 |
+
if( $post->post_type == 'gce_feed' ) {
|
34 |
+
$content = '<div class="gce-list-event gce-tooltip-event">[event-title]</div>' . "\n";
|
35 |
+
$content .= '<div><span>Starts:</span> [start-time]</div>' . "\n";
|
36 |
+
$content .= '<div><span>Ends:</span> [end-date] - [end-time]</div>' . "\n";
|
37 |
+
$content .= '[if-location]<div><span>Location:</span> [location]</div>[/if-location]' . "\n";
|
38 |
+
$content .= '[if-description]<div><span>Description:</span> [description]</div>[/if-description]' . "\n";
|
39 |
+
$content .= '<div>[link newwindow="true"]More details...[/link]</div>' . "\n";
|
40 |
+
|
41 |
+
// Default Post Meta Options
|
42 |
+
add_post_meta( $post->ID, 'gce_expand_recurring', 1 );
|
43 |
+
add_post_meta( $post->ID, 'gce_retrieve_from', 'today' );
|
44 |
+
add_post_meta( $post->ID, 'gce_retrieve_until', 'end_time' );
|
45 |
+
add_post_meta( $post->ID, 'gce_cache', 43200 );
|
46 |
+
|
47 |
+
// Default Simple Display Options
|
48 |
+
add_post_meta( $post->ID, 'gce_display_start', 'time' );
|
49 |
+
add_post_meta( $post->ID, 'gce_display_start_text', 'Starts:' );
|
50 |
+
add_post_meta( $post->ID, 'gce_display_end', 'time-date' );
|
51 |
+
add_post_meta( $post->ID, 'gce_display_end_text', 'Ends:' );
|
52 |
+
add_post_meta( $post->ID, 'gce_display_separator', ', ' );
|
53 |
+
add_post_meta( $post->ID, 'gce_display_location_text', 'Location:' );
|
54 |
+
add_post_meta( $post->ID, 'gce_display_description_text', 'Description:' );
|
55 |
+
add_post_meta( $post->ID, 'gce_display_link', 1 );
|
56 |
+
add_post_meta( $post->ID, 'gce_display_link_text', 'More Details' );
|
57 |
+
|
58 |
+
}
|
59 |
+
|
60 |
+
return $content;
|
61 |
+
}
|
62 |
+
add_filter( 'default_content', 'gce_default_editor_content', 10, 2 );
|
includes/admin/upgrade.php
ADDED
@@ -0,0 +1,244 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Upgrade functions
|
5 |
+
*
|
6 |
+
* @package GCE
|
7 |
+
* @author Phil Derksen <pderksen@gmail.com>, Nick Young <mycorpweb@gmail.com>
|
8 |
+
* @license GPL-2.0+
|
9 |
+
* @copyright 2014 Phil Derksen
|
10 |
+
*/
|
11 |
+
|
12 |
+
// I put the priority to 20 here so it runs after the gce_feed CPT code and we don't get errors
|
13 |
+
add_action( 'init', 'gce_upgrade', 20 );
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Main GCE Upgrade function. Call this and branch of from here depending on what we need to do
|
17 |
+
*
|
18 |
+
* @since 2.0.0
|
19 |
+
*/
|
20 |
+
function gce_upgrade() {
|
21 |
+
|
22 |
+
//delete_option( 'gce_upgrade_has_run' );
|
23 |
+
|
24 |
+
$version = get_option( 'gce_version' );
|
25 |
+
|
26 |
+
// Check if under version 2 and run the v2 upgrade if we are
|
27 |
+
if( version_compare( $version, '2.0.0', '<' ) && false === get_option( 'gce_upgrade_has_run' ) ) {
|
28 |
+
gce_v2_upgrade();
|
29 |
+
}
|
30 |
+
}
|
31 |
+
|
32 |
+
/*
|
33 |
+
* Run the upgrade to version 2.0.0
|
34 |
+
*
|
35 |
+
* @since 2.0.0
|
36 |
+
*/
|
37 |
+
function gce_v2_upgrade() {
|
38 |
+
$old_options = get_option( 'gce_options' );
|
39 |
+
|
40 |
+
|
41 |
+
//echo '<pre>' . print_r( $old_options, true ) . '</pre>';
|
42 |
+
|
43 |
+
//die();
|
44 |
+
|
45 |
+
if( false !== $old_options ) {
|
46 |
+
|
47 |
+
foreach( $old_options as $key => $value ) {
|
48 |
+
convert_to_cpt_posts( $value );
|
49 |
+
}
|
50 |
+
|
51 |
+
update_widget_feed_ids();
|
52 |
+
}
|
53 |
+
|
54 |
+
add_option( 'gce_upgrade_has_run', 1 );
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Converts the old database options to the new CPT layout for 2.0.0+
|
59 |
+
*
|
60 |
+
* @since 2.0.0
|
61 |
+
*/
|
62 |
+
function convert_to_cpt_posts( $args ) {
|
63 |
+
// Setup our new post
|
64 |
+
$post = array(
|
65 |
+
'post_name' => $args['title'],
|
66 |
+
'post_title' => $args['title'],
|
67 |
+
'post_status' => 'publish',
|
68 |
+
'post_type' => 'gce_feed'
|
69 |
+
);
|
70 |
+
|
71 |
+
if( $args['use_builder'] == true ) {
|
72 |
+
$post['post_content'] = $args['builder'];
|
73 |
+
}
|
74 |
+
|
75 |
+
$post_id = wp_insert_post( $post );
|
76 |
+
|
77 |
+
create_cpt_meta( $post_id, $args );
|
78 |
+
|
79 |
+
clear_old_transients( $args['id'] );
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Add the CPT post meta based on options set for the old feeds prior to v2
|
84 |
+
*
|
85 |
+
* @since 2.0.0
|
86 |
+
*/
|
87 |
+
function create_cpt_meta( $id, $args ) {
|
88 |
+
|
89 |
+
// Convert the dropdown values to the new values for "Retrieve Events From"
|
90 |
+
switch( $args['retrieve_from'] ) {
|
91 |
+
case 'now':
|
92 |
+
case 'today':
|
93 |
+
$from = 'today';
|
94 |
+
break;
|
95 |
+
case 'week':
|
96 |
+
$from = 'start_week';
|
97 |
+
break;
|
98 |
+
case 'month-start':
|
99 |
+
$from = 'start_month';
|
100 |
+
break;
|
101 |
+
case 'month-end':
|
102 |
+
$from = 'end_month';
|
103 |
+
break;
|
104 |
+
case 'date':
|
105 |
+
$from = 'custom_date';
|
106 |
+
break;
|
107 |
+
default:
|
108 |
+
$from = 'start_time';
|
109 |
+
break;
|
110 |
+
}
|
111 |
+
|
112 |
+
// Convert the dropdown values to the new values for "Retrieve Events Until"
|
113 |
+
switch( $args['retrieve_until'] ) {
|
114 |
+
case 'now':
|
115 |
+
case 'today':
|
116 |
+
$until = 'today';
|
117 |
+
break;
|
118 |
+
case 'week':
|
119 |
+
$until = 'start_week';
|
120 |
+
break;
|
121 |
+
case 'month-start':
|
122 |
+
$until = 'start_month';
|
123 |
+
break;
|
124 |
+
case 'month-end':
|
125 |
+
$until = 'end_month';
|
126 |
+
break;
|
127 |
+
case 'date':
|
128 |
+
$until = 'custom_date';
|
129 |
+
break;
|
130 |
+
default:
|
131 |
+
$until = 'end_time';
|
132 |
+
break;
|
133 |
+
}
|
134 |
+
|
135 |
+
$gce_expand_recurring = ( isset( $args['expand_recurring'] ) ? ( $args['expand_recurring'] == 'true' ? '1' : '0' ) : '1' );
|
136 |
+
|
137 |
+
// An array to hold all of our post meta ids and values so that we can loop through and add as post meta easily
|
138 |
+
$post_meta_fields = array(
|
139 |
+
'gce_feed_url' => $args['url'],
|
140 |
+
'gce_retrieve_from' => $from,
|
141 |
+
'gce_retrieve_until' => $until,
|
142 |
+
'gce_retrieve_max' => $args['max_events'],
|
143 |
+
'gce_date_format' => $args['date_format'],
|
144 |
+
'gce_time_format' => $args['time_format'],
|
145 |
+
'gce_timezone_offset' => $args['timezone'],
|
146 |
+
'gce_cache' => $args['cache_duration'],
|
147 |
+
'gce_multi_day_events' => ( $args['multiple_day'] == 'true' || $args['multiple_day'] == true ? '1' : '0' ),
|
148 |
+
'gce_display_mode' => 'grid',
|
149 |
+
'gce_custom_from' => gce_convert_timestamp( $args['retrieve_from_value'] ),
|
150 |
+
'gce_custom_until' => gce_convert_timestamp( $args['retrieve_until_value'] ),
|
151 |
+
'old_gce_id' => $args['id'],
|
152 |
+
'gce_search_query' => ( isset( $args['query'] ) ? $args['query'] : '' ),
|
153 |
+
'gce_expand_recurring' => $gce_expand_recurring
|
154 |
+
);
|
155 |
+
|
156 |
+
if( $args['use_builder'] == 'false' || $args['use_builder'] == false ) {
|
157 |
+
$display_meta = array(
|
158 |
+
'gce_display_simple' => 1,
|
159 |
+
'gce_display_start' => $args['display_start'],
|
160 |
+
'gce_display_start_text' => $args['display_start_text'],
|
161 |
+
'gce_display_end' => $args['display_end'],
|
162 |
+
'gce_display_end_text' => $args['display_end_text'],
|
163 |
+
'gce_display_separator' => $args['display_separator'],
|
164 |
+
'gce_display_location' => ( $args['display_location'] == 'on' ? '1' : '0' ),
|
165 |
+
'gce_display_location_text' => $args['display_location_text'],
|
166 |
+
'gce_display_description' => ( $args['display_desc'] == 'on' ? '1' : '0' ),
|
167 |
+
'gce_display_description_text' => $args['display_desc_text'],
|
168 |
+
'gce_display_description_max' => $args['display_desc_limit'],
|
169 |
+
'gce_display_link' => ( $args['display_link'] == 'on' ? '1' : '0' ),
|
170 |
+
'gce_display_link_tab' => ( $args['display_link_target'] == 'on' ? '1' : '0' ),
|
171 |
+
'gce_display_link_text' => $args['display_link_text']
|
172 |
+
);
|
173 |
+
|
174 |
+
$post_meta_fields = array_merge( $post_meta_fields, $display_meta );
|
175 |
+
}
|
176 |
+
|
177 |
+
//echo '<pre>' . print_r( $post_meta_fields, true ) . '</pre>';
|
178 |
+
|
179 |
+
//die();
|
180 |
+
|
181 |
+
// Loop through each $post_meta_field and add as an entry
|
182 |
+
foreach( $post_meta_fields as $k => $v ) {
|
183 |
+
update_post_meta( $id, $k, $v );
|
184 |
+
}
|
185 |
+
}
|
186 |
+
|
187 |
+
function gce_convert_timestamp( $t ) {
|
188 |
+
// mm/dd/yyyy
|
189 |
+
return date( 'm/d/Y', $t );
|
190 |
+
}
|
191 |
+
|
192 |
+
|
193 |
+
/**
|
194 |
+
* Remove the old transient values from the database
|
195 |
+
*
|
196 |
+
* @since 2.0.0
|
197 |
+
*/
|
198 |
+
function clear_old_transients( $id ) {
|
199 |
+
|
200 |
+
delete_transient( 'gce_feed_' . $id );
|
201 |
+
delete_transient( 'gce_feed_' . $id . '_url' );
|
202 |
+
}
|
203 |
+
|
204 |
+
|
205 |
+
/**
|
206 |
+
* Update widget IDs
|
207 |
+
*
|
208 |
+
* @since 2.0.0
|
209 |
+
*/
|
210 |
+
function update_widget_feed_ids() {
|
211 |
+
|
212 |
+
$widget = get_option( 'widget_gce_widget' );
|
213 |
+
|
214 |
+
if( is_array( $widget ) && ! empty( $widget ) ) {
|
215 |
+
foreach( $widget as $a => $b ) {
|
216 |
+
if( ! is_array( $b ) ) {
|
217 |
+
continue;
|
218 |
+
}
|
219 |
+
|
220 |
+
foreach( $b as $k => $v ) {
|
221 |
+
|
222 |
+
if( $k != 'id' ) {
|
223 |
+
continue;
|
224 |
+
}
|
225 |
+
|
226 |
+
$id = $v;
|
227 |
+
|
228 |
+
$q = new WP_Query( "post_type=gce_feed&meta_key=old_gce_id&meta_value=$id&order=ASC" );
|
229 |
+
|
230 |
+
if( $q->have_posts() ) {
|
231 |
+
|
232 |
+
$q->the_post();
|
233 |
+
// Set our ID to the old ID if found
|
234 |
+
$id = get_the_ID();
|
235 |
+
}
|
236 |
+
|
237 |
+
$widget[$a][$k] = $id;
|
238 |
+
}
|
239 |
+
}
|
240 |
+
|
241 |
+
update_option( 'widget_gce_widget', $widget );
|
242 |
+
}
|
243 |
+
|
244 |
+
}
|
includes/class-gce-display.php
ADDED
@@ -0,0 +1,259 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class GCE_Display
|
5 |
+
*
|
6 |
+
* @package GCE
|
7 |
+
* @author Phil Derksen <pderksen@gmail.com>, Nick Young <mycorpweb@gmail.com>
|
8 |
+
* @license GPL-2.0+
|
9 |
+
* @copyright 2014 Phil Derksen
|
10 |
+
*/
|
11 |
+
|
12 |
+
class GCE_Display {
|
13 |
+
|
14 |
+
private $feeds, $merged_feeds;
|
15 |
+
|
16 |
+
public function __construct( $ids, $title_text = null, $max_events = 0, $sort_order = 'asc' ) {
|
17 |
+
|
18 |
+
$this->id = $ids;
|
19 |
+
$this->title = $title_text;
|
20 |
+
$this->max_events = $max_events;
|
21 |
+
$this->sort = $sort_order;
|
22 |
+
|
23 |
+
foreach( $ids as $id ) {
|
24 |
+
$this->feeds[$id] = new GCE_Feed( $id );
|
25 |
+
}
|
26 |
+
|
27 |
+
$this->merged_feeds = array();
|
28 |
+
|
29 |
+
//Merge the feeds together into one array of events
|
30 |
+
foreach ( $this->feeds as $feed_id => $feed ) {
|
31 |
+
$this->merged_feeds = array_merge( $this->merged_feeds, $feed->events );
|
32 |
+
}
|
33 |
+
|
34 |
+
// Sort the items into date order
|
35 |
+
if ( ! empty( $this->merged_feeds ) ) {
|
36 |
+
usort( $this->merged_feeds, array( $this, 'compare' ) );
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Comparison function for use when sorting merged feed data (with usort)
|
42 |
+
*
|
43 |
+
* @since 2.0.0
|
44 |
+
*/
|
45 |
+
function compare( $event1, $event2 ) {
|
46 |
+
//Sort ascending or descending
|
47 |
+
if ( 'asc' == $this->sort )
|
48 |
+
return $event1->start_time - $event2->start_time;
|
49 |
+
|
50 |
+
return $event2->start_time - $event1->start_time;
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Returns array of days with events, with sub-arrays of events for that day
|
55 |
+
*
|
56 |
+
* @since 2.0.0
|
57 |
+
*/
|
58 |
+
private function get_event_days() {
|
59 |
+
$event_days = array();
|
60 |
+
|
61 |
+
//Total number of events retrieved
|
62 |
+
$count = count( $this->merged_feeds );
|
63 |
+
|
64 |
+
//If maximum events to display is 0 (unlimited) set $max to 1, otherwise use maximum of events specified by user
|
65 |
+
$max = ( 0 == $this->max_events ) ? 1 : $this->max_events;
|
66 |
+
|
67 |
+
//Loop through entire array of events, or until maximum number of events to be displayed has been reached
|
68 |
+
for ( $i = 0; $i < $count && $max > 0; $i++ ) {
|
69 |
+
$event = $this->merged_feeds[$i];
|
70 |
+
|
71 |
+
//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.
|
72 |
+
if ( $event->end_time > $event->start_time && $event->start_time < $event->end_time ) {
|
73 |
+
foreach ( $event->get_days() as $day ) {
|
74 |
+
$event_days[$day][] = $event;
|
75 |
+
}
|
76 |
+
|
77 |
+
//If maximum events to display isn't 0 (unlimited) decrement $max counter
|
78 |
+
if ( 0 != $this->max_events )
|
79 |
+
$max--;
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
return $event_days;
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Return the markup for the 'Grid' display
|
88 |
+
*
|
89 |
+
* @since 2.0.0
|
90 |
+
*/
|
91 |
+
public function get_grid ( $year = null, $month = null ) {
|
92 |
+
require_once 'php-calendar.php';
|
93 |
+
|
94 |
+
$time_now = current_time( 'timestamp' );
|
95 |
+
|
96 |
+
//If year and month have not been passed as paramaters, use current month and year
|
97 |
+
if( ! isset( $year ) ) {
|
98 |
+
$year = date( 'Y', $time_now );
|
99 |
+
}
|
100 |
+
|
101 |
+
if( ! isset( $month ) ) {
|
102 |
+
$month = date( 'm', $time_now );
|
103 |
+
}
|
104 |
+
|
105 |
+
//Get timestamps for the start and end of current month
|
106 |
+
$current_month_start = mktime( 0, 0, 0, date( 'm', $time_now ), 1, date( 'Y', $time_now ) );
|
107 |
+
$current_month_end = mktime( 0, 0, 0, date( 'm', $time_now ) + 1, 1, date( 'Y', $time_now ) );
|
108 |
+
|
109 |
+
//Get timestamps for the start and end of the month to be displayed in the grid
|
110 |
+
$display_month_start = mktime( 0, 0, 0, $month, 1, $year );
|
111 |
+
$display_month_end = mktime( 0, 0, 0, $month + 1, 1, $year );
|
112 |
+
|
113 |
+
//It should always be possible to navigate to the current month, even if it doesn't have any events
|
114 |
+
//So, if the display month is before the current month, set $nav_next to true, otherwise false
|
115 |
+
//If the display month is after the current month, set $nav_prev to true, otherwise false
|
116 |
+
$nav_next = ( $display_month_start < $current_month_start );
|
117 |
+
$nav_prev = ( $display_month_start >= $current_month_end );
|
118 |
+
|
119 |
+
//Get events data
|
120 |
+
$event_days = $this->get_event_days();
|
121 |
+
|
122 |
+
$today = mktime( 0, 0, 0, date( 'm', $time_now ), date( 'd', $time_now ), date( 'Y', $time_now ) );
|
123 |
+
|
124 |
+
$i = 1;
|
125 |
+
|
126 |
+
foreach ( $event_days as $key => $event_day ) {
|
127 |
+
//If event day is in the month and year specified (by $month and $year)
|
128 |
+
if ( $key >= $display_month_start && $key < $display_month_end ) {
|
129 |
+
//Create array of CSS classes. Add gce-has-events
|
130 |
+
$css_classes = array( 'gce-has-events' );
|
131 |
+
|
132 |
+
//Create markup for display
|
133 |
+
$markup = '<div class="gce-event-info">';
|
134 |
+
|
135 |
+
//If title option has been set for display, add it
|
136 |
+
if ( isset( $this->title ) ) {
|
137 |
+
$markup .= '<div class="gce-tooltip-title">' . esc_html( $this->title ) . ' ' . date_i18n( $event_day[0]->feed->date_format, $key ) . '</div>';
|
138 |
+
}
|
139 |
+
|
140 |
+
$markup .= '<ul>';
|
141 |
+
|
142 |
+
foreach ( $event_day as $num_in_day => $event ) {
|
143 |
+
$feed_id = absint( $event->id );
|
144 |
+
$markup .= '<li class="gce-tooltip-feed-' . $feed_id . '">' . $event->get_event_markup( 'tooltip', $num_in_day, $i ) . '</li>';
|
145 |
+
|
146 |
+
//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.
|
147 |
+
$css_classes['feed-' . $feed_id] = 'gce-feed-' . $feed_id;
|
148 |
+
|
149 |
+
$i++;
|
150 |
+
}
|
151 |
+
|
152 |
+
$markup .= '</ul></div>';
|
153 |
+
|
154 |
+
//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
|
155 |
+
if ( count( $css_classes ) > 2 )
|
156 |
+
$css_classes[] = 'gce-multiple';
|
157 |
+
|
158 |
+
//If event day is today, add gce-today CSS class, otherwise add past or future class
|
159 |
+
if ( $key == $today ) {
|
160 |
+
$css_classes[] = 'gce-today gce-today-has-events';
|
161 |
+
} elseif ( $key < $today ) {
|
162 |
+
$css_classes[] = 'gce-day-past';
|
163 |
+
} else {
|
164 |
+
$css_classes[] = 'gce-day-future';
|
165 |
+
}
|
166 |
+
|
167 |
+
//Change array entry to array of link href, CSS classes, and markup for use in gce_generate_calendar (below)
|
168 |
+
$event_days[$key] = array( null, implode( ' ', $css_classes ), $markup );
|
169 |
+
} elseif ( $key < $display_month_start ) {
|
170 |
+
//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
|
171 |
+
$nav_prev = true;
|
172 |
+
unset( $event_days[$key] );
|
173 |
+
} else {
|
174 |
+
//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
|
175 |
+
$nav_next = true;
|
176 |
+
unset( $event_days[$key] );
|
177 |
+
}
|
178 |
+
}
|
179 |
+
|
180 |
+
//Ensures that gce-today CSS class is added even if there are no events for 'today'. A bit messy :(
|
181 |
+
if ( ! isset( $event_days[$today] ) )
|
182 |
+
$event_days[$today] = array( null, 'gce-today gce-today-no-events', null );
|
183 |
+
|
184 |
+
$pn = array();
|
185 |
+
|
186 |
+
// Add previous / next functionality
|
187 |
+
//If there are events to display in a previous month, add previous month link
|
188 |
+
$prev_key = ( $nav_prev ) ? '«' : ' ';
|
189 |
+
$prev = ( $nav_prev ) ? date( 'm-Y', mktime( 0, 0, 0, $month - 1, 1, $year ) ) : null;
|
190 |
+
|
191 |
+
//If there are events to display in a future month, add next month link
|
192 |
+
$next_key = ( $nav_next ) ? '»' : ' ';
|
193 |
+
$next = ( $nav_next ) ? date( 'm-Y', mktime( 0, 0, 0, $month + 1, 1, $year ) ) : null;
|
194 |
+
|
195 |
+
//Array of previous and next link stuff for use in gce_generate_calendar (below)
|
196 |
+
$pn = array( $prev_key => $prev, $next_key => $next );
|
197 |
+
|
198 |
+
|
199 |
+
$start_day = get_option( 'start_of_week' );
|
200 |
+
|
201 |
+
//Generate the calendar markup and return it
|
202 |
+
return gce_generate_calendar( $year, $month, $event_days, 1, null, $start_day, $pn );
|
203 |
+
}
|
204 |
+
|
205 |
+
/**
|
206 |
+
* Return the markup for the 'List' display
|
207 |
+
*
|
208 |
+
* @since 2.0.0
|
209 |
+
*/
|
210 |
+
public function get_list( $grouped = false ) {
|
211 |
+
$time_now = current_time( 'timestamp' );
|
212 |
+
|
213 |
+
// Get all the event days
|
214 |
+
$event_days = $this->get_event_days();
|
215 |
+
|
216 |
+
//If event_days is empty, there are no events in the feed(s), so return a message indicating this
|
217 |
+
if( empty( $event_days) ) {
|
218 |
+
return '<p>' . __( 'There are currently no events to display.', 'gce' ) . '</p>';
|
219 |
+
}
|
220 |
+
|
221 |
+
$today = mktime( 0, 0, 0, date( 'm', $time_now ), date( 'd', $time_now ), date( 'Y', $time_now ) );
|
222 |
+
|
223 |
+
$i = 1;
|
224 |
+
|
225 |
+
$markup = '<ul class="gce-list">';
|
226 |
+
|
227 |
+
foreach ( $event_days as $key => $event_day ) {
|
228 |
+
//If this is a grouped list, add the date title and begin the nested list for this day
|
229 |
+
if ( $grouped ) {
|
230 |
+
$markup .=
|
231 |
+
'<li' . ( ( $key == $today ) ? ' class="gce-today"' : '' ) . '>' .
|
232 |
+
'<div class="gce-list-title">' . date_i18n( $event_day[0]->feed->date_format, $key ) . '</div>' .
|
233 |
+
'<ul>';
|
234 |
+
}
|
235 |
+
|
236 |
+
foreach ( $event_day as $num_in_day => $event ) {
|
237 |
+
//Create the markup for this event
|
238 |
+
$markup .=
|
239 |
+
'<li class="gce-feed-' . $event->feed->id . '">' .
|
240 |
+
//If this isn't a grouped list and a date title should be displayed, add the date title
|
241 |
+
( ( ! $grouped && isset( $event->title ) ) ? '<div class="gce-list-title">' . esc_html( $this->title ) . ' ' . date_i18n( $event->feed->date_format, $key ) . '</div>' : '' ) .
|
242 |
+
//Add the event markup
|
243 |
+
$event->get_event_markup( 'list', $num_in_day, $i ) .
|
244 |
+
'</li>';
|
245 |
+
|
246 |
+
$i++;
|
247 |
+
}
|
248 |
+
|
249 |
+
//If this is a grouped list, close the nested list for this day
|
250 |
+
if ( $grouped ) {
|
251 |
+
$markup .= '</ul></li>';
|
252 |
+
}
|
253 |
+
}
|
254 |
+
|
255 |
+
$markup .= '</ul>';
|
256 |
+
|
257 |
+
return $markup;
|
258 |
+
}
|
259 |
+
}
|
inc/gce-event.php → includes/class-gce-event.php
RENAMED
@@ -1,556 +1,539 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
$this->
|
24 |
-
$this->
|
25 |
-
$this->
|
26 |
-
$this->
|
27 |
-
$this->
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
function
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
//Set the display type (either tooltip or list)
|
100 |
-
$this->type = $display_type;
|
101 |
-
|
102 |
-
//Set which number event this is in day (first in day etc)
|
103 |
-
$this->num_in_day = $num_in_day;
|
104 |
-
|
105 |
-
//Set the position of this event in array of events currently being processed
|
106 |
-
$this->pos = $num;
|
107 |
-
|
108 |
-
$this->time_now = current_time( 'timestamp' );
|
109 |
-
|
110 |
-
//
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
$
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
'
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
'
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
'
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
$
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
$
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
return $m[1] .
|
298 |
-
|
299 |
-
case '
|
300 |
-
return $m[1] .
|
301 |
-
|
302 |
-
case '
|
303 |
-
return $m[1] .
|
304 |
-
|
305 |
-
case '
|
306 |
-
$
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
if (
|
330 |
-
|
331 |
-
|
332 |
-
return
|
333 |
-
|
334 |
-
case '
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
return '';
|
363 |
-
|
364 |
-
case '
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
return
|
369 |
-
|
370 |
-
case '
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
'
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
$
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
$
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
$items++;
|
541 |
-
|
542 |
-
if ( $numthisunits > 0 )
|
543 |
-
$output[] = sprintf( _n( $unitnames[0], $unitnames[1], $numthisunits ), $numthisunits );
|
544 |
-
}
|
545 |
-
|
546 |
-
$seperator = _x( ', ', 'human_time_diff' );
|
547 |
-
|
548 |
-
if ( ! empty( $output ) ) {
|
549 |
-
return implode( $seperator, $output );
|
550 |
-
} else {
|
551 |
-
$smallest = array_pop( $units );
|
552 |
-
return sprintf( $smallest[0], 1 );
|
553 |
-
}
|
554 |
-
}
|
555 |
-
}
|
556 |
-
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class GCE_Event
|
5 |
+
*
|
6 |
+
* @package GCE
|
7 |
+
* @author Phil Derksen <pderksen@gmail.com>, Nick Young <mycorpweb@gmail.com>
|
8 |
+
* @license GPL-2.0+
|
9 |
+
* @copyright 2014 Phil Derksen
|
10 |
+
*/
|
11 |
+
|
12 |
+
class GCE_Event {
|
13 |
+
|
14 |
+
public $feed;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Class constructor
|
18 |
+
*
|
19 |
+
* @since 2.0.0
|
20 |
+
*/
|
21 |
+
function __construct( GCE_Feed $feed, $id, $title, $description, $location, $start_time, $end_time, $link ) {
|
22 |
+
|
23 |
+
$this->feed = $feed;
|
24 |
+
$this->id = $id;
|
25 |
+
$this->title = $title;
|
26 |
+
$this->description = $description;
|
27 |
+
$this->location = $location;
|
28 |
+
$this->start_time = $start_time;
|
29 |
+
$this->end_time = $end_time;
|
30 |
+
$this->link = $link;
|
31 |
+
|
32 |
+
//Calculate which day type this event is (SWD = single whole day, SPD = single part day, MWD = multiple whole day, MPD = multiple part day)
|
33 |
+
if ( ( $start_time + 86400 ) <= $end_time ) {
|
34 |
+
if ( ( $start_time + 86400 ) == $end_time ) {
|
35 |
+
$this->day_type = 'SWD';
|
36 |
+
} else {
|
37 |
+
if ( ( '12:00 am' == date( 'g:i a', $start_time ) ) && ( '12:00 am' == date( 'g:i a', $end_time ) ) ) {
|
38 |
+
$this->day_type = 'MWD';
|
39 |
+
} else {
|
40 |
+
$this->day_type = 'MPD';
|
41 |
+
}
|
42 |
+
}
|
43 |
+
} else {
|
44 |
+
$this->day_type = 'SPD';
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Returns an array of days (as UNIX timestamps) that this events spans
|
50 |
+
*
|
51 |
+
* @since 2.0.0
|
52 |
+
*/
|
53 |
+
function get_days() {
|
54 |
+
//Round start date to nearest day
|
55 |
+
$start_time = mktime( 0, 0, 0, date( 'm', $this->start_time ), date( 'd', $this->start_time ) , date( 'Y', $this->start_time ) );
|
56 |
+
|
57 |
+
$days = array();
|
58 |
+
|
59 |
+
//If multiple day events should be handled, and this event is a multi-day event, add multiple day event to required days
|
60 |
+
if ( $this->feed->multiple_day_events && ( 'MPD' == $this->day_type || 'MWD' == $this->day_type ) ) {
|
61 |
+
$on_next_day = true;
|
62 |
+
$next_day = $start_time;
|
63 |
+
|
64 |
+
while ( $on_next_day ) {
|
65 |
+
//If the end time of the event is after 00:00 on the next day (therefore, not doesn't end on this day)
|
66 |
+
if ( $this->end_time > $next_day ) {
|
67 |
+
//If $next_day is within the event retrieval date range (specified by retrieve events from / until settings)
|
68 |
+
if ( $next_day >= $this->feed->start && $next_day < $this->feed->end ) {
|
69 |
+
$days[] = $next_day;
|
70 |
+
}
|
71 |
+
} else {
|
72 |
+
$on_next_day = false;
|
73 |
+
}
|
74 |
+
$next_day += 86400;
|
75 |
+
}
|
76 |
+
} else {
|
77 |
+
//Add event into array of events for that day
|
78 |
+
$days[] = $start_time;
|
79 |
+
}
|
80 |
+
|
81 |
+
return $days;
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Returns the markup for this event, so that it can be used in the construction of a grid / list
|
86 |
+
*
|
87 |
+
* @since 2.0.0
|
88 |
+
*/
|
89 |
+
function get_event_markup( $display_type, $num_in_day, $num ) {
|
90 |
+
|
91 |
+
// First check if we use the builder or not
|
92 |
+
$use_simple = get_post_meta( $this->feed->id, 'gce_display_simple', true );
|
93 |
+
|
94 |
+
if( empty( $use_simple ) ) {
|
95 |
+
return $this->use_builder();
|
96 |
+
}
|
97 |
+
|
98 |
+
|
99 |
+
//Set the display type (either tooltip or list)
|
100 |
+
$this->type = $display_type;
|
101 |
+
|
102 |
+
//Set which number event this is in day (first in day etc)
|
103 |
+
$this->num_in_day = $num_in_day;
|
104 |
+
|
105 |
+
//Set the position of this event in array of events currently being processed
|
106 |
+
$this->pos = $num;
|
107 |
+
|
108 |
+
$this->time_now = current_time( 'timestamp' );
|
109 |
+
|
110 |
+
// Setup the markup to return
|
111 |
+
//$display_options = get_option( 'gce_settings_general' );
|
112 |
+
|
113 |
+
$display_options['display_start'] = get_post_meta( $this->feed->id, 'gce_display_start', true );
|
114 |
+
$display_options['display_start_text'] = get_post_meta( $this->feed->id, 'gce_display_start_text', true );
|
115 |
+
$display_options['display_end'] = get_post_meta( $this->feed->id, 'gce_display_end', true );
|
116 |
+
$display_options['display_end_text'] = get_post_meta( $this->feed->id, 'gce_display_end_text', true );
|
117 |
+
$display_options['display_location'] = get_post_meta( $this->feed->id, 'gce_display_location', true );
|
118 |
+
$display_options['display_location_text'] = get_post_meta( $this->feed->id, 'gce_display_location_text', true );
|
119 |
+
$display_options['display_desc'] = get_post_meta( $this->feed->id, 'gce_display_description', true );
|
120 |
+
$display_options['display_desc_text'] = get_post_meta( $this->feed->id, 'gce_display_description_text', true );
|
121 |
+
$display_options['display_desc_limit'] = get_post_meta( $this->feed->id, 'gce_display_description_max', true );
|
122 |
+
$display_options['display_link'] = get_post_meta( $this->feed->id, 'gce_display_link', true );
|
123 |
+
$display_options['display_link_text'] = get_post_meta( $this->feed->id, 'gce_display_link_text', true );
|
124 |
+
$display_options['display_separator'] = get_post_meta( $this->feed->id, 'gce_display_separator', true );
|
125 |
+
$display_options['display_link_target'] = get_post_meta( $this->feed->id, 'gce_display_link_tab', true );
|
126 |
+
|
127 |
+
$markup = '<p class="gce-' . $this->type . '-event">' . esc_html( $this->title ) . '</p>';
|
128 |
+
|
129 |
+
$start_end = array();
|
130 |
+
|
131 |
+
//If start date / time should be displayed, set up array of start date and time
|
132 |
+
if ( ! empty( $display_options['display_start'] ) && 'none' != $display_options['display_start'] ) {
|
133 |
+
$sd = $this->start_time;
|
134 |
+
$start_end['start'] = array(
|
135 |
+
'time' => date_i18n( $this->feed->time_format, $sd ),
|
136 |
+
'date' => date_i18n( $this->feed->date_format, $sd )
|
137 |
+
);
|
138 |
+
}
|
139 |
+
|
140 |
+
//If end date / time should be displayed, set up array of end date and time
|
141 |
+
if ( ! empty( $display_options['display_end'] ) && 'none' != $display_options['display_end'] ) {
|
142 |
+
$ed = $this->end_time;
|
143 |
+
$start_end['end'] = array(
|
144 |
+
'time' => date_i18n( $this->feed->time_format, $ed ),
|
145 |
+
'date' => date_i18n( $this->feed->date_format, $ed )
|
146 |
+
);
|
147 |
+
}
|
148 |
+
|
149 |
+
//Add the correct start / end, date / time information to $markup
|
150 |
+
foreach ( $start_end as $start_or_end => $info ) {
|
151 |
+
$markup .= '<p class="gce-' . $this->type . '-' . $start_or_end . '"><span>' . esc_html( $display_options['display_' . $start_or_end . '_text'] ) . '</span> ';
|
152 |
+
|
153 |
+
if( ! empty( $display_options['display_' . $start_or_end] ) ) {
|
154 |
+
switch ( $display_options['display_' . $start_or_end] ) {
|
155 |
+
case 'time': $markup .= esc_html( $info['time'] );
|
156 |
+
break;
|
157 |
+
case 'date': $markup .= esc_html( $info['date'] );
|
158 |
+
break;
|
159 |
+
case 'time-date': $markup .= esc_html( $info['time'] . $display_options['display_separator'] . $info['date'] );
|
160 |
+
break;
|
161 |
+
case 'date-time': $markup .= esc_html( $info['date'] . $display_options['display_separator'] . $info['time'] );
|
162 |
+
}
|
163 |
+
}
|
164 |
+
|
165 |
+
$markup .= '</p>';
|
166 |
+
}
|
167 |
+
|
168 |
+
//If location should be displayed (and is not empty) add to $markup
|
169 |
+
if ( isset( $display_options['display_location'] ) ) {
|
170 |
+
$event_location = $this->location;
|
171 |
+
if ( '' != $event_location )
|
172 |
+
$markup .= '<p class="gce-' . $this->type . '-loc"><span>' . esc_html( $display_options['display_location_text'] ) . '</span> ' . esc_html( $event_location ) . '</p>';
|
173 |
+
}
|
174 |
+
|
175 |
+
//If description should be displayed (and is not empty) add to $markup
|
176 |
+
if ( isset($display_options['display_desc'] ) ) {
|
177 |
+
$event_desc = $this->description;
|
178 |
+
|
179 |
+
if ( '' != $event_desc ) {
|
180 |
+
//Limit number of words of description to display, if required
|
181 |
+
if ( '' != $display_options['display_desc_limit'] ) {
|
182 |
+
preg_match( '/([\S]+\s*){0,' . $display_options['display_desc_limit'] . '}/', $this->description, $event_desc );
|
183 |
+
$event_desc = trim( $event_desc[0] );
|
184 |
+
}
|
185 |
+
|
186 |
+
$markup .= '<p class="gce-' . $this->type . '-desc"><span>' . $display_options['display_desc_text'] . '</span> ' . make_clickable( nl2br( esc_html( $event_desc ) ) ) . '</p>';
|
187 |
+
}
|
188 |
+
}
|
189 |
+
|
190 |
+
//If link should be displayed add to $markup
|
191 |
+
if ( isset($display_options['display_link'] ) ) {
|
192 |
+
$target = ( ! empty( $display_options['display_link_target'] ) ? 'target="blank"' : '' );
|
193 |
+
$markup .= '<p class="gce-' . $this->type . '-link"><a href="' . esc_url( $this->link ) . '&ctz=' . esc_html( $this->feed->timezone_offset ) . '" ' . $target . '>' . esc_html( $display_options['display_link_text'] ) . '</a></p>';
|
194 |
+
}
|
195 |
+
|
196 |
+
return $markup;
|
197 |
+
|
198 |
+
}
|
199 |
+
|
200 |
+
//Return the event markup using the builder
|
201 |
+
function use_builder() {
|
202 |
+
//Array of valid shortcodes
|
203 |
+
$shortcodes = array(
|
204 |
+
//Event / feed information shortcodes
|
205 |
+
|
206 |
+
'event-title', //The event title
|
207 |
+
'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)
|
208 |
+
'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)
|
209 |
+
'start-custom', //The start time / date of the event (uses a custom PHP date format, specified in the 'format' attribute)
|
210 |
+
'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'
|
211 |
+
'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)
|
212 |
+
'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)
|
213 |
+
'end-custom', //The end time / date of the event (uses a custom PHP date format, specified in the 'format' attribute)
|
214 |
+
'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'
|
215 |
+
'location', //The event location
|
216 |
+
'description', //The event deescription (number of words can be limited by the 'limit' attribute)
|
217 |
+
'link', //Anything within this shortcode (including further shortcodes) will be linked to the Google Calendar page for this event
|
218 |
+
'url', //The raw link URL to the Google Calendar page for this event (can be used to construct more customized links)
|
219 |
+
'feed-id', //The ID of this feed (Can be useful for constructing feed specific CSS classes)
|
220 |
+
'feed-title', //The feed title
|
221 |
+
'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
|
222 |
+
'length', //How long the events lasts, in human-readable format
|
223 |
+
'event-num', //The position of the event in the current list, or the position of the event in the current month (for grids)
|
224 |
+
'event-id', //The event UID (unique identifier assigned by Google)
|
225 |
+
'cal-id', //The calendar ID
|
226 |
+
|
227 |
+
//Anything between the opening and closing tags of the following logical shortcodes (including further shortcodes) will only be displayed if:
|
228 |
+
|
229 |
+
'if-all-day', //This is an all-day event
|
230 |
+
'if-not-all-day', //This is not an all-day event
|
231 |
+
'if-title', //The event has a title
|
232 |
+
'if-description', //The event has a description
|
233 |
+
'if-location', //The event has a location
|
234 |
+
'if-tooltip', //The current display type is 'tooltip'
|
235 |
+
'if-list', //The current display type is 'list'
|
236 |
+
'if-now', //The event is taking place now (after the start time, but before the end time)
|
237 |
+
'if-not-now', //The event is not taking place now (may have ended or not yet started)
|
238 |
+
'if-started', //The event has started (and even if it has ended)
|
239 |
+
'if-not-started', //The event has not yet started
|
240 |
+
'if-ended', //The event has ended
|
241 |
+
'if-not-ended', //The event has not ended (and even if it hasn't started)
|
242 |
+
'if-first', //The event is the first in the day
|
243 |
+
'if-not-first', //The event is not the first in the day
|
244 |
+
'if-multi-day', //The event spans multiple days
|
245 |
+
'if-single-day' //The event does not span multiple days
|
246 |
+
);
|
247 |
+
|
248 |
+
$this->regex = '/(.?)\[(' . implode( '|', $shortcodes ) . ')\b(.*?)(?:(\/))?\](?:(.+?)\[\/\2\])?(.?)/s';
|
249 |
+
|
250 |
+
return $this->look_for_shortcodes( $this->feed->get_builder() );
|
251 |
+
}
|
252 |
+
|
253 |
+
//Look through the EDB markup for shortcodes
|
254 |
+
function look_for_shortcodes( $markup ) {
|
255 |
+
return preg_replace_callback( $this->regex, array( $this, 'process_shortcode' ), $markup );
|
256 |
+
}
|
257 |
+
|
258 |
+
//Parse a shortcode, returning the appropriate event information
|
259 |
+
//Much of this code is 'borrowed' from WordPress' own shortcode handling stuff!
|
260 |
+
function process_shortcode( $m ) {
|
261 |
+
if ( '[' == $m[1] && ']' == $m[6] )
|
262 |
+
return substr( $m[0], 1, -1 );
|
263 |
+
|
264 |
+
//Extract any attributes contained in the shortcode
|
265 |
+
extract( shortcode_atts( array(
|
266 |
+
'newwindow' => 'false',
|
267 |
+
'format' => '',
|
268 |
+
'limit' => '0',
|
269 |
+
'html' => 'false',
|
270 |
+
'markdown' => 'false',
|
271 |
+
'precision' => '1',
|
272 |
+
'offset' => '0',
|
273 |
+
'autolink' => 'true'
|
274 |
+
), shortcode_parse_atts( $m[3] ) ) );
|
275 |
+
|
276 |
+
//Sanitize the attributes
|
277 |
+
$newwindow = ( 'true' === $newwindow );
|
278 |
+
$format = esc_attr( $format );
|
279 |
+
$limit = absint( $limit );
|
280 |
+
$html = ( 'true' === $html );
|
281 |
+
$markdown = ( 'true' === $markdown );
|
282 |
+
$precision = absint( $precision );
|
283 |
+
$offset = intval( $offset );
|
284 |
+
$autolink = ( 'true' === $autolink );
|
285 |
+
|
286 |
+
//Do the appropriate stuff depending on which shortcode we're looking at. See valid shortcode list (above) for explanation of each shortcode
|
287 |
+
switch ( $m[2] ) {
|
288 |
+
case 'event-title':
|
289 |
+
$title = esc_html( trim( $this->title ) );
|
290 |
+
|
291 |
+
if ( $markdown && function_exists( 'Markdown' ) )
|
292 |
+
$title = Markdown( $title );
|
293 |
+
|
294 |
+
if ( $html )
|
295 |
+
$title = wp_kses_post( html_entity_decode( $title ) );
|
296 |
+
|
297 |
+
return $m[1] . $title . $m[6];
|
298 |
+
|
299 |
+
case 'start-time':
|
300 |
+
return $m[1] . date_i18n( $this->feed->time_format, $this->start_time + $offset ) . $m[6];
|
301 |
+
|
302 |
+
case 'start-date':
|
303 |
+
return $m[1] . date_i18n( $this->feed->date_format, $this->start_time + $offset ) . $m[6];
|
304 |
+
|
305 |
+
case 'start-custom':
|
306 |
+
return $m[1] . date_i18n( $format, $this->start_time + $offset ) . $m[6];
|
307 |
+
|
308 |
+
case 'start-human':
|
309 |
+
return $m[1] . $this->gce_human_time_diff( $this->start_time + $offset, $this->time_now, $precision ) . $m[6];
|
310 |
+
|
311 |
+
case 'end-time':
|
312 |
+
return $m[1] . date_i18n( $this->feed->time_format, $this->end_time + $offset ) . $m[6];
|
313 |
+
|
314 |
+
case 'end-date':
|
315 |
+
return $m[1] . date_i18n( $this->feed->date_format, $this->end_time + $offset ) . $m[6];
|
316 |
+
|
317 |
+
case 'end-custom':
|
318 |
+
return $m[1] . date_i18n( $format, $this->end_time + $offset ) . $m[6];
|
319 |
+
|
320 |
+
case 'end-human':
|
321 |
+
return $m[1] . $this->gce_human_time_diff( $this->end_time + $offset, $this->time_now, $precision ) . $m[6];
|
322 |
+
|
323 |
+
case 'location':
|
324 |
+
$location = esc_html( trim( $this->location ) );
|
325 |
+
|
326 |
+
if ( $markdown && function_exists( 'Markdown' ) )
|
327 |
+
$location = Markdown( $location );
|
328 |
+
|
329 |
+
if ( $html )
|
330 |
+
$location = wp_kses_post( html_entity_decode( $location ) );
|
331 |
+
|
332 |
+
return $m[1] . $location . $m[6];
|
333 |
+
|
334 |
+
case 'description':
|
335 |
+
$description = esc_html( trim( $this->description ) );
|
336 |
+
|
337 |
+
//If a word limit has been set, trim the description to the required length
|
338 |
+
if ( 0 != $limit ) {
|
339 |
+
preg_match( '/([\S]+\s*){0,' . $limit . '}/', esc_html( $this->description ), $description );
|
340 |
+
$description = trim( $description[0] );
|
341 |
+
}
|
342 |
+
|
343 |
+
if ( $markdown || $html ) {
|
344 |
+
if ( $markdown && function_exists( 'Markdown' ) )
|
345 |
+
$description = Markdown( $description );
|
346 |
+
|
347 |
+
if ( $html )
|
348 |
+
$description = wp_kses_post( html_entity_decode( $description ) );
|
349 |
+
}else{
|
350 |
+
//Otherwise, preserve line breaks
|
351 |
+
$description = nl2br( $description );
|
352 |
+
|
353 |
+
//Make URLs clickable if required
|
354 |
+
if ( $autolink )
|
355 |
+
$description = make_clickable( $description );
|
356 |
+
}
|
357 |
+
|
358 |
+
return $m[1] . $description . $m[6];
|
359 |
+
|
360 |
+
case 'link':
|
361 |
+
$new_window = ( $newwindow ) ? ' target="_blank"' : '';
|
362 |
+
return $m[1] . '<a href="' . esc_url( $this->link . '&ctz=' . $this->feed->timezone_offset ) . '"' . $new_window . '>' . $this->look_for_shortcodes( $m[5] ) . '</a>' . $m[6];
|
363 |
+
|
364 |
+
case 'url':
|
365 |
+
return $m[1] . esc_url( $this->link . '&ctz=' . $this->feed->get_timezone() ) . $m[6];
|
366 |
+
|
367 |
+
case 'feed-id':
|
368 |
+
return $m[1] . intval( $this->feed->get_feed_id() ) . $m[6];
|
369 |
+
|
370 |
+
case 'feed-title':
|
371 |
+
return $m[1] . esc_html( $this->feed->get_feed_title() ) . $m[6];
|
372 |
+
|
373 |
+
case 'maps-link':
|
374 |
+
$new_window = ( $newwindow ) ? ' target="_blank"' : '';
|
375 |
+
return $m[1] . '<a href="' . esc_url( '//maps.google.com?q=' . urlencode( $this->location ) ) . '"' . $new_window . '>' . $this->look_for_shortcodes( $m[5] ) . '</a>' . $m[6];
|
376 |
+
|
377 |
+
case 'length':
|
378 |
+
return $m[1] . $this->gce_human_time_diff( $this->start_time, $this->end_time, $precision ) . $m[6];
|
379 |
+
|
380 |
+
case 'event-num':
|
381 |
+
return $m[1] . intval( $this->pos ) . $m[6];
|
382 |
+
|
383 |
+
case 'event-id':
|
384 |
+
return $m[1] . esc_html( $this->id ) . $m[6];
|
385 |
+
|
386 |
+
case 'cal-id':
|
387 |
+
$cal_id = explode( '/', $this->feed->get_feed_url() );
|
388 |
+
return $m[1] . esc_html( $cal_id[5] ) . $m[6];
|
389 |
+
|
390 |
+
case 'if-all-day':
|
391 |
+
if ( 'SWD' == $this->day_type || 'MWD' == $this->day_type )
|
392 |
+
return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
|
393 |
+
|
394 |
+
return '';
|
395 |
+
|
396 |
+
case 'if-not-all-day':
|
397 |
+
if ( 'SPD' == $this->day_type || 'MPD' == $this->day_type )
|
398 |
+
return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
|
399 |
+
|
400 |
+
return '';
|
401 |
+
|
402 |
+
case 'if-title':
|
403 |
+
if ( '' != $this->title )
|
404 |
+
return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
|
405 |
+
|
406 |
+
return '';
|
407 |
+
|
408 |
+
case 'if-description':
|
409 |
+
if ( '' != $this->description )
|
410 |
+
return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
|
411 |
+
|
412 |
+
return '';
|
413 |
+
|
414 |
+
case 'if-location':
|
415 |
+
if ( '' != $this->location )
|
416 |
+
return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
|
417 |
+
|
418 |
+
return '';
|
419 |
+
|
420 |
+
case 'if-tooltip':
|
421 |
+
if ( 'tooltip' == $this->type )
|
422 |
+
return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
|
423 |
+
|
424 |
+
return '';
|
425 |
+
|
426 |
+
case 'if-list':
|
427 |
+
if ( 'list' == $this->type )
|
428 |
+
return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
|
429 |
+
|
430 |
+
return '';
|
431 |
+
|
432 |
+
case 'if-now':
|
433 |
+
if ( $this->time_now >= $this->start_time && $this->time_now < $this->end_time )
|
434 |
+
return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
|
435 |
+
|
436 |
+
return '';
|
437 |
+
|
438 |
+
case 'if-not-now':
|
439 |
+
if ( $this->end_time < $this->time_now || $this->start_time > $this->time_now )
|
440 |
+
return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
|
441 |
+
|
442 |
+
return '';
|
443 |
+
|
444 |
+
case 'if-started':
|
445 |
+
if ( $this->start_time < $this->time_now )
|
446 |
+
return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
|
447 |
+
|
448 |
+
return '';
|
449 |
+
|
450 |
+
case 'if-not-started':
|
451 |
+
if ( $this->start_time > $this->time_now )
|
452 |
+
return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
|
453 |
+
|
454 |
+
return '';
|
455 |
+
|
456 |
+
case 'if-ended':
|
457 |
+
if ( $this->end_time < $this->time_now )
|
458 |
+
return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
|
459 |
+
|
460 |
+
return '';
|
461 |
+
|
462 |
+
case 'if-not-ended':
|
463 |
+
if ( $this->end_time > $this->time_now )
|
464 |
+
return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
|
465 |
+
|
466 |
+
return '';
|
467 |
+
|
468 |
+
case 'if-first':
|
469 |
+
if ( 0 == $this->num_in_day )
|
470 |
+
return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
|
471 |
+
|
472 |
+
return '';
|
473 |
+
|
474 |
+
case 'if-not-first':
|
475 |
+
if ( 0 != $this->num_in_day )
|
476 |
+
return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
|
477 |
+
|
478 |
+
return '';
|
479 |
+
|
480 |
+
case 'if-multi-day':
|
481 |
+
if ( 'MPD' == $this->day_type || 'MWD' == $this->day_type )
|
482 |
+
return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
|
483 |
+
|
484 |
+
return '';
|
485 |
+
|
486 |
+
case 'if-single-day':
|
487 |
+
if ( 'SPD' == $this->day_type || 'SWD' == $this->day_type )
|
488 |
+
return $m[1] . $this->look_for_shortcodes( $m[5] ) . $m[6];
|
489 |
+
|
490 |
+
return '';
|
491 |
+
}
|
492 |
+
}
|
493 |
+
|
494 |
+
//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
|
495 |
+
function gce_human_time_diff( $from, $to = '', $limit = 1 ) {
|
496 |
+
$units = array(
|
497 |
+
31556926 => array( __( '%s year', 'gce' ), __( '%s years', 'gce' ) ),
|
498 |
+
2629744 => array( __( '%s month', 'gce' ), __( '%s months', 'gce' ) ),
|
499 |
+
604800 => array( __( '%s week', 'gce' ), __( '%s weeks', 'gce' ) ),
|
500 |
+
86400 => array( __( '%s day', 'gce' ), __( '%s days', 'gce' ) ),
|
501 |
+
3600 => array( __( '%s hour', 'gce' ), __( '%s hours', 'gce' ) ),
|
502 |
+
60 => array( __( '%s min', 'gce' ), __( '%s mins', 'gce' ) ),
|
503 |
+
);
|
504 |
+
|
505 |
+
if ( empty( $to ) )
|
506 |
+
$to = time();
|
507 |
+
|
508 |
+
$from = (int) $from;
|
509 |
+
$to = (int) $to;
|
510 |
+
$diff = (int) abs( $to - $from );
|
511 |
+
|
512 |
+
$items = 0;
|
513 |
+
$output = array();
|
514 |
+
|
515 |
+
foreach ( $units as $unitsec => $unitnames ) {
|
516 |
+
if ( $items >= $limit )
|
517 |
+
break;
|
518 |
+
|
519 |
+
if ( $diff < $unitsec )
|
520 |
+
continue;
|
521 |
+
|
522 |
+
$numthisunits = floor( $diff / $unitsec );
|
523 |
+
$diff = $diff - ( $numthisunits * $unitsec );
|
524 |
+
$items++;
|
525 |
+
|
526 |
+
if ( $numthisunits > 0 )
|
527 |
+
$output[] = sprintf( _n( $unitnames[0], $unitnames[1], $numthisunits ), $numthisunits );
|
528 |
+
}
|
529 |
+
|
530 |
+
$seperator = _x( ', ', 'human_time_diff' );
|
531 |
+
|
532 |
+
if ( ! empty( $output ) ) {
|
533 |
+
return implode( $seperator, $output );
|
534 |
+
} else {
|
535 |
+
$smallest = array_pop( $units );
|
536 |
+
return sprintf( $smallest[0], 1 );
|
537 |
+
}
|
538 |
+
}
|
539 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/class-gce-feed.php
ADDED
@@ -0,0 +1,271 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class GCE_Feed
|
5 |
+
*
|
6 |
+
* @package GCE
|
7 |
+
* @author Phil Derksen <pderksen@gmail.com>, Nick Young <mycorpweb@gmail.com>
|
8 |
+
* @license GPL-2.0+
|
9 |
+
* @copyright 2014 Phil Derksen
|
10 |
+
*/
|
11 |
+
|
12 |
+
class GCE_Feed {
|
13 |
+
|
14 |
+
public $id,
|
15 |
+
$feed_url,
|
16 |
+
$start,
|
17 |
+
$end,
|
18 |
+
$max,
|
19 |
+
$date_format,
|
20 |
+
$time_format,
|
21 |
+
$timezone_offset,
|
22 |
+
$cache,
|
23 |
+
$multiple_day_events,
|
24 |
+
$display_url,
|
25 |
+
$search_query,
|
26 |
+
$expand_recurring;
|
27 |
+
|
28 |
+
public $events = array();
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Class constructor
|
32 |
+
*
|
33 |
+
* @since 2.0.0
|
34 |
+
*/
|
35 |
+
public function __construct( $id ) {
|
36 |
+
// Set the ID
|
37 |
+
$this->id = $id;
|
38 |
+
|
39 |
+
// Set up all other data based on the ID
|
40 |
+
$this->setup_attributes();
|
41 |
+
|
42 |
+
// Now create the Feed
|
43 |
+
$this->create_feed();
|
44 |
+
|
45 |
+
if( $this->cache > 0 ) {
|
46 |
+
$this->cache_events();
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Set the transient to cache the events
|
52 |
+
*
|
53 |
+
* @since 2.0.0
|
54 |
+
*/
|
55 |
+
private function cache_events() {
|
56 |
+
set_transient( 'gce_feed_' . $this->id, $this->events, $this->cache );
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Set all of the feed attributes from the post meta options
|
61 |
+
*
|
62 |
+
* @since 2.0.0
|
63 |
+
*/
|
64 |
+
private function setup_attributes() {
|
65 |
+
$date_format = get_post_meta( $this->id, 'gce_date_format', true );
|
66 |
+
$time_format = get_post_meta( $this->id, 'gce_time_format', true );
|
67 |
+
|
68 |
+
$this->feed_url = get_post_meta( $this->id, 'gce_feed_url', true );
|
69 |
+
$this->start = $this->set_feed_length( get_post_meta( $this->id, 'gce_retrieve_from', true ), 'start' );
|
70 |
+
$this->end = $this->set_feed_length( get_post_meta( $this->id, 'gce_retrieve_until', true ), 'end' );
|
71 |
+
$this->max = get_post_meta( $this->id, 'gce_retrieve_max', true );
|
72 |
+
$this->date_format = ( ! empty( $date_format ) ? $date_format : get_option( 'date_format' ) );
|
73 |
+
$this->time_format = ( ! empty( $time_format ) ? $time_format : get_option( 'time_format' ) );
|
74 |
+
$this->timezone_offset = get_post_meta( $this->id, 'gce_timezone_offset', true );
|
75 |
+
$this->cache = get_post_meta( $this->id, 'gce_cache', true );
|
76 |
+
$this->multiple_day_events = get_post_meta( $this->id, 'gce_multi_day_events', true );
|
77 |
+
$this->search_query = get_post_meta( $this->id, 'gce_search_query', true );
|
78 |
+
$this->expand_recurring = get_post_meta( $this->id, 'gce_expand_recurring', true );
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Create the feed URL
|
83 |
+
*
|
84 |
+
* @since 2.0.0
|
85 |
+
*/
|
86 |
+
private function create_feed() {
|
87 |
+
//Break the feed URL up into its parts (scheme, host, path, query)
|
88 |
+
|
89 |
+
if( empty( $this->feed_url ) ) {
|
90 |
+
if( current_user_can( 'manage_options' ) ) {
|
91 |
+
echo '<p>' . __( 'The feed URL has not been set. Please make sure to set it correctly in the Feed settings.', 'gce' ) . '</p>';
|
92 |
+
}
|
93 |
+
|
94 |
+
return;
|
95 |
+
}
|
96 |
+
|
97 |
+
$url_parts = parse_url( $this->feed_url );
|
98 |
+
|
99 |
+
$scheme = ( is_ssl() ? 'https://' : 'http://' );
|
100 |
+
|
101 |
+
$scheme_and_host = $scheme . $url_parts['host'];
|
102 |
+
|
103 |
+
//Remove the exisitng projection from the path, and replace it with '/full-noattendees'
|
104 |
+
$path = substr( $url_parts['path'], 0, strrpos( $url_parts['path'], '/' ) ) . '/full-noattendees';
|
105 |
+
|
106 |
+
//Add the default parameters to the querystring (retrieving JSON, not XML)
|
107 |
+
$query = '?alt=json&singleevents=true&sortorder=ascending&orderby=starttime';
|
108 |
+
|
109 |
+
$gmt_offset = $this->timezone_offset * 3600;
|
110 |
+
|
111 |
+
//Append the feed specific parameters to the querystring
|
112 |
+
$query .= '&start-min=' . date( 'Y-m-d\TH:i:s', $this->start - $gmt_offset );
|
113 |
+
$query .= '&start-max=' . date( 'Y-m-d\TH:i:s', $this->end - $gmt_offset );
|
114 |
+
$query .= '&max-results=' . $this->max;
|
115 |
+
|
116 |
+
// Set the timezone offset
|
117 |
+
if ( ! empty( $this->timezone_offset ) && $this->timezone_offset != 'default' ) {
|
118 |
+
$query .= '&ctz=' . $this->timezone_offset;
|
119 |
+
}
|
120 |
+
|
121 |
+
if ( ! empty( $this->search_query ) ) {
|
122 |
+
$query .= '&q=' . rawurlencode( $this->search_query );
|
123 |
+
}
|
124 |
+
|
125 |
+
if ( $this->expand_recurring ) {
|
126 |
+
$query .= '&singleevents=true';
|
127 |
+
}
|
128 |
+
|
129 |
+
//Put the URL back together
|
130 |
+
$this->display_url = $scheme_and_host . $path . $query;
|
131 |
+
|
132 |
+
// Get all the feed data
|
133 |
+
$this->get_feed_data( $this->display_url );
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Make remote call to get the feed data
|
138 |
+
*
|
139 |
+
* @since 2.0.0
|
140 |
+
*/
|
141 |
+
private function get_feed_data( $url ) {
|
142 |
+
$raw_data = wp_remote_get( $url, array(
|
143 |
+
'sslverify' => false, //sslverify is set to false to ensure https URLs work reliably. Data source is Google's servers, so is trustworthy
|
144 |
+
'timeout' => 10 //Increase timeout from the default 5 seconds to ensure even large feeds are retrieved successfully
|
145 |
+
) );
|
146 |
+
|
147 |
+
// First check for transient data to use
|
148 |
+
if( false !== get_transient( 'gce_feed_' . $this->id ) ) {
|
149 |
+
$this->events = get_transient( 'gce_feed_' . $this->id );
|
150 |
+
} else {
|
151 |
+
//If $raw_data is a WP_Error, something went wrong
|
152 |
+
if ( ! is_wp_error( $raw_data ) ) {
|
153 |
+
//If response code isn't 200, something went wrong
|
154 |
+
if ( 200 == $raw_data['response']['code'] ) {
|
155 |
+
//Attempt to convert the returned JSON into an array
|
156 |
+
$raw_data = json_decode( $raw_data['body'], true );
|
157 |
+
|
158 |
+
//If decoding was successful
|
159 |
+
if ( ! empty( $raw_data ) ) {
|
160 |
+
//If there are some entries (events) to process
|
161 |
+
if ( isset( $raw_data['feed']['entry'] ) ) {
|
162 |
+
//Loop through each event, extracting the relevant information
|
163 |
+
foreach ( $raw_data['feed']['entry'] as $event ) {
|
164 |
+
$id = ( isset( $event['gCal$uid']['value'] ) ? esc_html( substr( $event['gCal$uid']['value'], 0, strpos( $event['gCal$uid']['value'], '@' ) ) ) : '' );
|
165 |
+
$title = ( isset( $event['title']['$t'] ) ? esc_html( $event['title']['$t'] ) : '' );
|
166 |
+
$description = ( isset( $event['content']['$t'] ) ? esc_html( $event['content']['$t'] ) : '' );
|
167 |
+
$link = ( isset( $event['link'][0]['href'] ) ? esc_url( $event['link'][0]['href'] ) : '' );
|
168 |
+
$location = ( isset( $event['gd$where'][0]['valueString'] ) ? esc_html( $event['gd$where'][0]['valueString'] ) : '' );
|
169 |
+
$start_time = ( isset( $event['gd$when'][0]['startTime'] ) ? $this->iso_to_ts( $event['gd$when'][0]['startTime'] ) : '' );
|
170 |
+
$end_time = ( isset( $event['gd$when'][0]['endTime'] ) ? $this->iso_to_ts( $event['gd$when'][0]['endTime'] ) : '' );
|
171 |
+
|
172 |
+
//Create a GCE_Event using the above data. Add it to the array of events
|
173 |
+
$this->events[] = new GCE_Event( $this, $id, $title, $description, $location, $start_time, $end_time, $link );
|
174 |
+
}
|
175 |
+
}
|
176 |
+
} else {
|
177 |
+
//json_decode failed
|
178 |
+
$this->error = __( 'Some data was retrieved, but could not be parsed successfully. Please ensure your feed URL is correct.', 'gce' );
|
179 |
+
}
|
180 |
+
} else {
|
181 |
+
//The response code wasn't 200, so generate a helpful(ish) error message depending on error code
|
182 |
+
switch ( $raw_data['response']['code'] ) {
|
183 |
+
case 404:
|
184 |
+
$this->error = __( 'The feed could not be found (404). Please ensure your feed URL is correct.', 'gce' );
|
185 |
+
break;
|
186 |
+
case 403:
|
187 |
+
$this->error = __( 'Access to this feed was denied (403). Please ensure you have public sharing enabled for your calendar.', 'gce' );
|
188 |
+
break;
|
189 |
+
default:
|
190 |
+
$this->error = sprintf( __( 'The feed data could not be retrieved. Error code: %s. Please ensure your feed URL is correct.', 'gce' ), $raw_data['response']['code'] );
|
191 |
+
}
|
192 |
+
}
|
193 |
+
}else{
|
194 |
+
//Generate an error message from the returned WP_Error
|
195 |
+
$this->error = $raw_data->get_error_message() . __( ' Please ensure your feed URL is correct.', 'gce' );
|
196 |
+
}
|
197 |
+
}
|
198 |
+
|
199 |
+
if( ! empty( $this->error ) ) {
|
200 |
+
if( current_user_can( 'manage_options' ) ) {
|
201 |
+
echo $this->error;
|
202 |
+
return;
|
203 |
+
}
|
204 |
+
}
|
205 |
+
}
|
206 |
+
|
207 |
+
/**
|
208 |
+
* Convert an ISO date/time to a UNIX timestamp
|
209 |
+
*
|
210 |
+
* @since 2.0.0
|
211 |
+
*/
|
212 |
+
private function iso_to_ts( $iso ) {
|
213 |
+
sscanf( $iso, "%u-%u-%uT%u:%u:%uZ", $year, $month, $day, $hour, $minute, $second );
|
214 |
+
return mktime( $hour, $minute, $second, $month, $day, $year );
|
215 |
+
}
|
216 |
+
|
217 |
+
/**
|
218 |
+
* Return feed start/end
|
219 |
+
*
|
220 |
+
* @since 2.0.0
|
221 |
+
*/
|
222 |
+
private function set_feed_length( $value, $type ) {
|
223 |
+
// All times start at 00:00
|
224 |
+
switch ( $value ) {
|
225 |
+
case 'today':
|
226 |
+
$return = mktime( 0, 0, 0, date( 'm' ), date( 'j' ), date( 'Y' ) );
|
227 |
+
break;
|
228 |
+
case 'start_week':
|
229 |
+
$return = mktime( 0, 0, 0, date( 'm' ), ( date( 'j' ) - date( 'w' ) ), date( 'Y' ) );
|
230 |
+
break;
|
231 |
+
case 'start_month':
|
232 |
+
$return = mktime( 0, 0, 0, date( 'm' ), 1, date( 'Y' ) );
|
233 |
+
break;
|
234 |
+
case 'end_month':
|
235 |
+
$return = mktime( 0, 0, 0, date( 'm' ) + 1, 1, date( 'Y' ) );
|
236 |
+
break;
|
237 |
+
case 'custom_date':
|
238 |
+
if( $type == 'start' ) {
|
239 |
+
$date = get_post_meta( $this->id, 'gce_custom_from', true );
|
240 |
+
$fallback = mktime( 0, 0, 0, date( 'm' ), 1, date( 'Y' ) );
|
241 |
+
} else {
|
242 |
+
$date = get_post_meta( $this->id, 'gce_custom_until', true );
|
243 |
+
$fallback = mktime( 0, 0, 0, date( 'm' ) + 1, 1, date( 'Y' ) );
|
244 |
+
}
|
245 |
+
|
246 |
+
if( ! empty( $date ) ) {
|
247 |
+
$date = explode( '/', $date );
|
248 |
+
$return = mktime( 0, 0, 0, $date[0], $date[1], $date[2] );
|
249 |
+
} else {
|
250 |
+
$return = $fallback;
|
251 |
+
}
|
252 |
+
break;
|
253 |
+
default:
|
254 |
+
if( $type == 'start' ) {
|
255 |
+
$return = 0; //any - 1970-01-01 00:00
|
256 |
+
} else {
|
257 |
+
// Set default end time
|
258 |
+
$return = 2145916800;
|
259 |
+
}
|
260 |
+
}
|
261 |
+
|
262 |
+
return $return;
|
263 |
+
}
|
264 |
+
|
265 |
+
function get_builder() {
|
266 |
+
|
267 |
+
$this->builder = get_post( $this->id )->post_content;
|
268 |
+
|
269 |
+
return $this->builder;
|
270 |
+
}
|
271 |
+
}
|
includes/gce-feed-cpt.php
ADDED
@@ -0,0 +1,289 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Custom Post Type functions
|
5 |
+
*
|
6 |
+
* @package GCE
|
7 |
+
* @author Phil Derksen <pderksen@gmail.com>, Nick Young <mycorpweb@gmail.com>
|
8 |
+
* @license GPL-2.0+
|
9 |
+
* @copyright 2014 Phil Derksen
|
10 |
+
*/
|
11 |
+
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Register Google Calendar Events custom post type
|
15 |
+
*
|
16 |
+
* @since 2.0.0
|
17 |
+
*/
|
18 |
+
function gce_setup_cpt() {
|
19 |
+
|
20 |
+
$labels = array(
|
21 |
+
'name' => __( 'Google Calendar Feeds', 'gce' ),
|
22 |
+
'singular_name' => __( 'Feed', 'gce' ),
|
23 |
+
'menu_name' => __( 'GCal Events', 'gce' ),
|
24 |
+
'name_admin_bar' => __( 'Feed', 'gce' ),
|
25 |
+
'add_new' => __( 'Add New', 'gce' ),
|
26 |
+
'add_new_item' => __( 'Add New Feed', 'gce' ),
|
27 |
+
'new_item' => __( 'New Feed', 'gce' ),
|
28 |
+
'edit_item' => __( 'Edit Feed', 'gce' ),
|
29 |
+
'view_item' => __( 'View Feed', 'gce' ),
|
30 |
+
'all_items' => __( 'All GCal Feeds', 'gce' ),
|
31 |
+
'search_items' => __( 'Search GCal Feeds', 'gce' ),
|
32 |
+
'not_found' => __( 'No feeds found.', 'gce' ),
|
33 |
+
'not_found_in_trash' => __( 'No feeds found in Trash.', 'gce' )
|
34 |
+
);
|
35 |
+
|
36 |
+
$args = array(
|
37 |
+
'labels' => $labels,
|
38 |
+
'public' => true, // This removes the 'view' and 'preview' links from what I can tell
|
39 |
+
'publicly_queryable' => true,
|
40 |
+
'show_ui' => true,
|
41 |
+
'show_in_menu' => true,
|
42 |
+
'query_var' => true,
|
43 |
+
'capability_type' => 'post',
|
44 |
+
'has_archive' => false,
|
45 |
+
'hierarchical' => false,
|
46 |
+
'menu_icon' => 'dashicons-calendar',
|
47 |
+
'supports' => array( 'title', 'editor' )
|
48 |
+
);
|
49 |
+
|
50 |
+
register_post_type( 'gce_feed', $args );
|
51 |
+
|
52 |
+
// MUST ONLY RUN ONCE!
|
53 |
+
if( false === get_option( 'gce_cpt_setup' ) ) {
|
54 |
+
flush_rewrite_rules();
|
55 |
+
update_option( 'gce_cpt_setup', 1 );
|
56 |
+
}
|
57 |
+
|
58 |
+
}
|
59 |
+
add_action( 'init', 'gce_setup_cpt' );
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Messages for Feed actions
|
63 |
+
*
|
64 |
+
* @since 2.0.0
|
65 |
+
*/
|
66 |
+
function gce_feed_messages( $messages ) {
|
67 |
+
global $post, $post_ID;
|
68 |
+
|
69 |
+
$url1 = '<a href="' . get_permalink( $post_ID ) . '">';
|
70 |
+
$url2 = 'feed';
|
71 |
+
$url3 = '</a>';
|
72 |
+
$s1 = 'Feed';
|
73 |
+
|
74 |
+
$messages['gce_feed'] = array(
|
75 |
+
1 => sprintf( __( '%4$s updated. %1$sView %2$s%3$s', 'gce' ), $url1, $url2, $url3, $s1 ),
|
76 |
+
4 => sprintf( __( '%4$s updated. %1$sView %2$s%3$s', 'gce' ), $url1, $url2, $url3, $s1 ),
|
77 |
+
6 => sprintf( __( '%4$s published. %1$sView %2$s%3$s', 'gce' ), $url1, $url2, $url3, $s1 ),
|
78 |
+
7 => sprintf( __( '%4$s saved. %1$sView %2$s%3$s', 'gce' ), $url1, $url2, $url3, $s1 ),
|
79 |
+
8 => sprintf( __( '%4$s submitted. %1$sView %2$s%3$s', 'gce' ), $url1, $url2, $url3, $s1 ),
|
80 |
+
10 => sprintf( __( '%4$s draft updated. %1$sView %2$s%3$s', 'gce' ), $url1, $url2, $url3, $s1 )
|
81 |
+
);
|
82 |
+
|
83 |
+
return $messages;
|
84 |
+
}
|
85 |
+
add_filter( 'post_updated_messages', 'gce_feed_messages' );
|
86 |
+
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Add post meta to tie in with the Google Calendar Events custom post type
|
90 |
+
*
|
91 |
+
* @since 2.0.0
|
92 |
+
*/
|
93 |
+
function gce_cpt_meta() {
|
94 |
+
add_meta_box( 'gce_feed_meta', 'Feed Settings', 'gce_display_meta', 'gce_feed', 'advanced', 'core' );
|
95 |
+
|
96 |
+
// Sidebar meta box below publish section.
|
97 |
+
add_meta_box( 'gce_feed_sidebar_help', 'Helpful Links', 'gce_feed_sidebar_help', 'gce_feed', 'side', 'core' );
|
98 |
+
|
99 |
+
add_meta_box( 'gce_display_options_meta', 'Display Options', 'gce_display_options_meta', 'gce_feed', 'side', 'core' );
|
100 |
+
}
|
101 |
+
add_action( 'add_meta_boxes', 'gce_cpt_meta' );
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Function called to display post meta
|
105 |
+
*
|
106 |
+
* @since 2.0.0
|
107 |
+
*/
|
108 |
+
function gce_display_meta() {
|
109 |
+
include_once( GCE_DIR . '/views/admin/gce-feed-meta-display.php' );
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Function called to display help in sidebar.
|
114 |
+
*
|
115 |
+
* @since 2.0.0
|
116 |
+
*/
|
117 |
+
function gce_feed_sidebar_help() {
|
118 |
+
include_once( GCE_DIR . '/views/admin/gce-feed-sidebar-help.php' );
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Function called to display post meta
|
123 |
+
*
|
124 |
+
* @since 2.0.0
|
125 |
+
*/
|
126 |
+
function gce_display_options_meta() {
|
127 |
+
include_once( GCE_DIR . '/views/admin/display-options-meta.php' );
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Function to save post meta for the feed CPT
|
132 |
+
*
|
133 |
+
* @since 2.0.0
|
134 |
+
*/
|
135 |
+
function gce_save_meta( $post_id ) {
|
136 |
+
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
|
137 |
+
return $post_id;
|
138 |
+
}
|
139 |
+
|
140 |
+
// An array to hold all of our post meta ids so we can run them through a loop
|
141 |
+
$post_meta_fields = array(
|
142 |
+
'gce_feed_url',
|
143 |
+
'gce_retrieve_from',
|
144 |
+
'gce_retrieve_until',
|
145 |
+
'gce_retrieve_max',
|
146 |
+
'gce_date_format',
|
147 |
+
'gce_time_format',
|
148 |
+
'gce_timezone_offset',
|
149 |
+
'gce_cache',
|
150 |
+
'gce_multi_day_events',
|
151 |
+
'gce_display_mode',
|
152 |
+
'gce_custom_from',
|
153 |
+
'gce_custom_until',
|
154 |
+
'gce_search_query',
|
155 |
+
'gce_expand_recurring',
|
156 |
+
// Display options
|
157 |
+
'gce_display_start',
|
158 |
+
'gce_display_start_text',
|
159 |
+
'gce_display_end',
|
160 |
+
'gce_display_end_text',
|
161 |
+
'gce_display_separator',
|
162 |
+
'gce_display_location',
|
163 |
+
'gce_display_location_text',
|
164 |
+
'gce_display_description',
|
165 |
+
'gce_display_description_text',
|
166 |
+
'gce_display_description_max',
|
167 |
+
'gce_display_link',
|
168 |
+
'gce_display_link_tab',
|
169 |
+
'gce_display_link_text',
|
170 |
+
'gce_display_simple'
|
171 |
+
);
|
172 |
+
|
173 |
+
$post_meta_fields = apply_filters( 'gce_feed_meta', $post_meta_fields );
|
174 |
+
|
175 |
+
if ( current_user_can( 'edit_post', $post_id ) ) {
|
176 |
+
// Loop through our array and make sure it is posted and not empty in order to update it, otherwise we delete it
|
177 |
+
foreach ( $post_meta_fields as $pmf ) {
|
178 |
+
if ( isset( $_POST[$pmf] ) && ! empty( $_POST[$pmf] ) ) {
|
179 |
+
if( $pmf == 'gce_feed_url' ) {
|
180 |
+
update_post_meta( $post_id, $pmf, esc_url( $_POST[$pmf] ) );
|
181 |
+
} else {
|
182 |
+
update_post_meta( $post_id, $pmf, stripslashes( $_POST[$pmf] ) );
|
183 |
+
}
|
184 |
+
} else {
|
185 |
+
// We want max to be set to 25 by default if nothing is entered
|
186 |
+
if( $pmf == 'gce_retrieve_max' ) {
|
187 |
+
update_post_meta( $post_id, $pmf, 25 );
|
188 |
+
} else {
|
189 |
+
delete_post_meta( $post_id, $pmf );
|
190 |
+
}
|
191 |
+
}
|
192 |
+
}
|
193 |
+
}
|
194 |
+
|
195 |
+
return $post_id;
|
196 |
+
}
|
197 |
+
add_action( 'save_post', 'gce_save_meta' );
|
198 |
+
|
199 |
+
|
200 |
+
/**
|
201 |
+
* Add column headers to our "All Feeds" CPT page
|
202 |
+
*
|
203 |
+
* @since 2.0.0
|
204 |
+
*/
|
205 |
+
function gce_add_column_headers( $defaults ) {
|
206 |
+
|
207 |
+
$new_columns = array(
|
208 |
+
'cb' => $defaults['cb'],
|
209 |
+
'feed-id' => 'Feed ID',
|
210 |
+
'feed-sc' => 'Feed Shortcode',
|
211 |
+
'max-events' => 'Max Events',
|
212 |
+
'display-type' => 'Display Type'
|
213 |
+
);
|
214 |
+
|
215 |
+
return array_merge( $defaults, $new_columns );
|
216 |
+
}
|
217 |
+
add_filter( 'manage_gce_feed_posts_columns', 'gce_add_column_headers' );
|
218 |
+
|
219 |
+
|
220 |
+
/**
|
221 |
+
* Fill out the columns
|
222 |
+
*
|
223 |
+
* @since 2.0.0
|
224 |
+
*/
|
225 |
+
function gce_column_content( $column_name, $post_ID ) {
|
226 |
+
|
227 |
+
switch ( $column_name ) {
|
228 |
+
|
229 |
+
case 'feed-id':
|
230 |
+
echo $post_ID;
|
231 |
+
break;
|
232 |
+
case 'feed-sc':
|
233 |
+
echo '<code>[gcal id="' . $post_ID . '"]</code>';
|
234 |
+
break;
|
235 |
+
case 'max-events':
|
236 |
+
$max = get_post_meta( $post_ID, 'gce_retrieve_max', true );
|
237 |
+
echo $max;
|
238 |
+
break;
|
239 |
+
case 'display-type':
|
240 |
+
$display = get_post_meta( $post_ID, 'gce_display_mode', true );
|
241 |
+
|
242 |
+
if( $display == 'grid' ) {
|
243 |
+
echo 'Grid';
|
244 |
+
} else if( $display == 'list' ) {
|
245 |
+
echo 'List';
|
246 |
+
} else {
|
247 |
+
echo 'Grouped List';
|
248 |
+
}
|
249 |
+
break;
|
250 |
+
}
|
251 |
+
}
|
252 |
+
add_action( 'manage_gce_feed_posts_custom_column', 'gce_column_content', 10, 2 );
|
253 |
+
|
254 |
+
/**
|
255 |
+
* Add the "Clear Cache" action to the CPT action links
|
256 |
+
*
|
257 |
+
* @since 2.0.0
|
258 |
+
*/
|
259 |
+
function gce_cpt_actions( $actions, $post ) {
|
260 |
+
if( $post->post_type == 'gce_feed' ) {
|
261 |
+
$actions['clear_cache'] = '<a href="' . add_query_arg( array( 'clear_cache' => $post->ID ) ). '">Clear Cache</a>';
|
262 |
+
}
|
263 |
+
|
264 |
+
return $actions;
|
265 |
+
}
|
266 |
+
add_filter( 'post_row_actions', 'gce_cpt_actions', 10, 2 );
|
267 |
+
|
268 |
+
|
269 |
+
/**
|
270 |
+
* Function to clear cache if on the post listing page
|
271 |
+
*
|
272 |
+
* @since 2.0.0
|
273 |
+
*/
|
274 |
+
function gce_clear_cache_link() {
|
275 |
+
if( isset( $_REQUEST['clear_cache'] ) ) {
|
276 |
+
$post_id = absint( $_REQUEST['clear_cache'] );
|
277 |
+
|
278 |
+
gce_clear_cache( $post_id );
|
279 |
+
|
280 |
+
settings_errors( 'gce-notices' );
|
281 |
+
}
|
282 |
+
}
|
283 |
+
add_action( 'admin_init', 'gce_clear_cache_link' );
|
284 |
+
|
285 |
+
|
286 |
+
function gce_clear_cache_on_save( $post_id ) {
|
287 |
+
delete_transient( 'gce_feed_' . $post_id );
|
288 |
+
}
|
289 |
+
add_action( 'save_post_gce_feed', 'gce_clear_cache_on_save' );
|
includes/misc-functions.php
ADDED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* Function to display the calendar to the screen
|
5 |
+
*
|
6 |
+
* @since 2.0.0
|
7 |
+
*/
|
8 |
+
function gce_print_calendar( $feed_ids, $display = 'grid', $args = array() ) {
|
9 |
+
|
10 |
+
$defaults = array(
|
11 |
+
'title_text' => '',
|
12 |
+
'max_events' => 25,
|
13 |
+
'sort' => 'asc',
|
14 |
+
'grouped' => 0,
|
15 |
+
'month' => null,
|
16 |
+
'year' => null,
|
17 |
+
'widget' => 0
|
18 |
+
);
|
19 |
+
|
20 |
+
$args = array_merge( $defaults, $args );
|
21 |
+
|
22 |
+
extract( $args );
|
23 |
+
|
24 |
+
$ids = explode( '-', $feed_ids );
|
25 |
+
|
26 |
+
//Create new display object, passing array of feed id(s)
|
27 |
+
$d = new GCE_Display( $ids, $title_text, $max_events, $sort );
|
28 |
+
$markup = '';
|
29 |
+
|
30 |
+
if( 'grid' == $display ) {
|
31 |
+
|
32 |
+
$markup = '<script type="text/javascript">jQuery(document).ready(function($){gce_ajaxify("' . ( $widget == 1 ? 'gce-widget-' : 'gce-page-grid-' ) . $feed_ids
|
33 |
+
. '", "' . $feed_ids . '", "' . absint( $max_events ) . '", "' . $title_text . '", "' . ( $widget == 1 ? 'widget' : 'page' ) . '");});</script>';
|
34 |
+
|
35 |
+
if( $widget == 1 ) {
|
36 |
+
$markup .= '<div class="gce-widget-grid" id="gce-widget-' . $feed_ids . '">';
|
37 |
+
} else {
|
38 |
+
$markup .= '<div class="gce-page-grid" id="gce-page-grid-' . $feed_ids . '">';
|
39 |
+
}
|
40 |
+
|
41 |
+
$markup .= $d->get_grid( $year, $month );
|
42 |
+
$markup .= '</div>';
|
43 |
+
|
44 |
+
} else if( 'list' == $display || 'list-grouped' == $display ) {
|
45 |
+
$markup = '<div class="gce-page-list">' . $d->get_list( $grouped ) . '</div>';
|
46 |
+
}
|
47 |
+
|
48 |
+
return $markup;
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* AJAX function for grid pagination
|
53 |
+
*
|
54 |
+
* @since 2.0.0
|
55 |
+
*/
|
56 |
+
function gce_ajax() {
|
57 |
+
if ( isset( $_GET['gce_feed_ids'] ) ) {
|
58 |
+
$ids = $_GET['gce_feed_ids'];
|
59 |
+
$title = $_GET['gce_title_text'];
|
60 |
+
$max = $_GET['gce_max_events'];
|
61 |
+
$month = $_GET['gce_month'];
|
62 |
+
$year = $_GET['gce_year'];
|
63 |
+
|
64 |
+
$title = ( 'null' == $title ) ? null : $title;
|
65 |
+
|
66 |
+
$args = array(
|
67 |
+
'title_text' => $title,
|
68 |
+
'max_events' => $max,
|
69 |
+
'month' => $month,
|
70 |
+
'year' => $year,
|
71 |
+
);
|
72 |
+
|
73 |
+
if ( 'page' == $_GET['gce_type'] ) {
|
74 |
+
echo gce_print_calendar( $ids, 'grid', $args );
|
75 |
+
} elseif ( 'widget' == $_GET['gce_type'] ) {
|
76 |
+
$args['widget'] = 1;
|
77 |
+
echo gce_print_calendar( $ids, 'grid', $args );
|
78 |
+
}
|
79 |
+
}
|
80 |
+
die();
|
81 |
+
}
|
82 |
+
add_action( 'wp_ajax_nopriv_gce_ajax', 'gce_ajax' );
|
83 |
+
add_action( 'wp_ajax_gce_ajax', 'gce_ajax' );
|
84 |
+
|
85 |
+
function gce_feed_content( $content ) {
|
86 |
+
global $post;
|
87 |
+
|
88 |
+
if( $post->post_type == 'gce_feed' ) {
|
89 |
+
$content = '[gcal id="' . $post->ID . '"]';
|
90 |
+
}
|
91 |
+
|
92 |
+
return $content;
|
93 |
+
}
|
94 |
+
add_filter( 'the_content', 'gce_feed_content' );
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Google Analytics campaign URL.
|
98 |
+
*
|
99 |
+
* @since 2.0.0
|
100 |
+
*
|
101 |
+
* @param string $base_url Plain URL to navigate to
|
102 |
+
* @param string $source GA "source" tracking value
|
103 |
+
* @param string $medium GA "medium" tracking value
|
104 |
+
* @param string $campaign GA "campaign" tracking value
|
105 |
+
* @return string $url Full Google Analytics campaign URL
|
106 |
+
*/
|
107 |
+
function gce_ga_campaign_url( $base_url, $source, $medium, $campaign ) {
|
108 |
+
// $medium examples: 'sidebar_link', 'banner_image'
|
109 |
+
|
110 |
+
$url = add_query_arg( array(
|
111 |
+
'utm_source' => $source,
|
112 |
+
'utm_medium' => $medium,
|
113 |
+
'utm_campaign' => $campaign
|
114 |
+
), $base_url );
|
115 |
+
|
116 |
+
return $url;
|
117 |
+
}
|
{inc → includes}/php-calendar.php
RENAMED
@@ -1,83 +1,83 @@
|
|
1 |
-
<?php
|
2 |
-
# PHP Calendar (version 2.3), written by Keith Devens
|
3 |
-
# http://keithdevens.com/software/php_calendar
|
4 |
-
# see example at http://keithdevens.com/weblog
|
5 |
-
# License: http://keithdevens.com/software/license
|
6 |
-
|
7 |
-
/*
|
8 |
-
Changes made to original PHP Calendar script by me (Ross Hanney):
|
9 |
-
|
10 |
-
- Renamed CSS classes to fit with my plugin
|
11 |
-
- Slight modification of lines 63-71 to use Unix timestamp rather than day number
|
12 |
-
- Renamed function to prevent conflicts
|
13 |
-
- Replaced strftime with date_i18n
|
14 |
-
- Use of $wp_locale to get weekday initials
|
15 |
-
- Replaced htmlentities() with esc_attr() and esc_html()
|
16 |
-
- Other small markup changes
|
17 |
-
- Replaced gmmktime() with mktime()
|
18 |
-
*/
|
19 |
-
|
20 |
-
function gce_generate_calendar( $year, $month, $days = array(), $day_name_length = 3, $month_href = NULL, $first_day = 0, $pn = array() ) {
|
21 |
-
global $wp_locale;
|
22 |
-
|
23 |
-
$first_of_month = mktime( 0, 0, 0, $month, 1, $year );
|
24 |
-
#remember that mktime will automatically correct if invalid dates are entered
|
25 |
-
# for instance, mktime(0,0,0,12,32,1997) will be the date for Jan 1, 1998
|
26 |
-
# this provides a built in "rounding" feature to generate_calendar()
|
27 |
-
|
28 |
-
$day_names = array(); #generate all the day names according to the current locale
|
29 |
-
for ( $n = 0, $t = ( 3 + $first_day ) * 86400; $n < 7; $n++, $t += 86400 ) { #January 4, 1970 was a Sunday
|
30 |
-
$day_names[$n]['full'] = date_i18n( 'l', $t, true );
|
31 |
-
$day_names[$n]['initial'] = $wp_locale->get_weekday_initial( date_i18n( 'l', $t, true ) );
|
32 |
-
}
|
33 |
-
|
34 |
-
list( $month, $year, $month_name, $weekday ) = explode( ',', date_i18n( 'm, Y, F, w', $first_of_month ) );
|
35 |
-
$weekday = ( $weekday + 7 - $first_day ) % 7; #adjust for $first_day
|
36 |
-
$title = esc_html( $month_name ) . ' ' . $year; #note that some locales don't capitalize month and day names
|
37 |
-
|
38 |
-
#Begin calendar. Uses a real <caption>. See http://diveintomark.org/archives/2002/07/03
|
39 |
-
list( $p, $pl ) = each( $pn );
|
40 |
-
list( $n, $nl ) = each( $pn ); #previous and next links, if applicable
|
41 |
-
|
42 |
-
if ( $p )
|
43 |
-
$p = '<span class="gce-prev">' . ( ( $pl ) ? ( '<a class="gce-change-month" title="Previous month" name="' . $pl . '">' . $p . '</a>' ) : $p ) . '</span> ';
|
44 |
-
if ( $n )
|
45 |
-
$n = ' <span class="gce-next">' . ( ( $nl ) ? ( '<a class="gce-change-month" title="Next month" name="' . $nl . '">' . $n . '</a>' ) : $n ) . '</span>';
|
46 |
-
|
47 |
-
$calendar = '<table class="gce-calendar">' . "\n" . '<caption class="gce-caption">' . $p . '<span class="gce-month-title">' . ( ( $month_href ) ? ( '<a href="' . esc_attr( $month_href ) . '">' . $title . '</a>' ) : $title ) . '</span>' . $n . "</caption>\n<tr>";
|
48 |
-
|
49 |
-
if ( $day_name_length ) { #if the day names should be shown ($day_name_length > 0)
|
50 |
-
#if day_name_length is >3, the full name of the day will be printed
|
51 |
-
foreach ( $day_names as $d ) {
|
52 |
-
$calendar .= '<th><abbr title="' . esc_attr( $d['full'] ) . '">' . esc_html( $d['initial'] ) . '</abbr></th>';
|
53 |
-
}
|
54 |
-
|
55 |
-
$calendar .= "</tr>\n<tr>";
|
56 |
-
}
|
57 |
-
|
58 |
-
$time_now = current_time( 'timestamp' );
|
59 |
-
$today = mktime( 0, 0, 0, date( 'm', $time_now ), date( 'd', $time_now ), date( 'Y', $time_now ) );
|
60 |
-
|
61 |
-
if ( $weekday > 0 ) $calendar .= '<td colspan="' . $weekday . '"> </td>'; #initial 'empty' days
|
62 |
-
for ( $day = 1, $days_in_month = date( 't', $first_of_month ); $day <= $days_in_month; $day++, $weekday++ ) {
|
63 |
-
if ( 7 == $weekday ) {
|
64 |
-
$weekday = 0; #start a new week
|
65 |
-
$calendar .= "</tr>\n<tr>";
|
66 |
-
}
|
67 |
-
|
68 |
-
$timestamp = mktime( 0, 0, 0, $month, $day, $year );
|
69 |
-
|
70 |
-
if ( isset( $days[$timestamp] ) && is_array( $days[$timestamp] ) ) {
|
71 |
-
list( $link, $classes, $content ) = $days[$timestamp];
|
72 |
-
$calendar .= '<td' . ( ( $classes ) ? ( ' class="' . $classes . '">' ) : '>' ) . ( ( $link ) ? ( '<a href="' . $link . '"><span class="gce-day-number">' . $day . '</span></a>' . $content ) : '<span class="gce-day-number">' . $day . '</span>' . $content ) . '</td>';
|
73 |
-
}else{
|
74 |
-
$css_class = ( $timestamp < $time_now ) ? 'gce-day-past' : 'gce-day-future';
|
75 |
-
$calendar .= '<td class="' . $css_class . '"><span class="gce-day-number">' . $day . '</span></td>';
|
76 |
-
}
|
77 |
-
}
|
78 |
-
|
79 |
-
if ( 7 != $weekday ) $calendar .= '<td colspan="' . ( 7 - $weekday ) . '"> </td>'; #remaining "empty" days
|
80 |
-
|
81 |
-
return $calendar . "</tr>\n</table>\n";
|
82 |
-
}
|
83 |
?>
|
1 |
+
<?php
|
2 |
+
# PHP Calendar (version 2.3), written by Keith Devens
|
3 |
+
# http://keithdevens.com/software/php_calendar
|
4 |
+
# see example at http://keithdevens.com/weblog
|
5 |
+
# License: http://keithdevens.com/software/license
|
6 |
+
|
7 |
+
/*
|
8 |
+
Changes made to original PHP Calendar script by me (Ross Hanney):
|
9 |
+
|
10 |
+
- Renamed CSS classes to fit with my plugin
|
11 |
+
- Slight modification of lines 63-71 to use Unix timestamp rather than day number
|
12 |
+
- Renamed function to prevent conflicts
|
13 |
+
- Replaced strftime with date_i18n
|
14 |
+
- Use of $wp_locale to get weekday initials
|
15 |
+
- Replaced htmlentities() with esc_attr() and esc_html()
|
16 |
+
- Other small markup changes
|
17 |
+
- Replaced gmmktime() with mktime()
|
18 |
+
*/
|
19 |
+
|
20 |
+
function gce_generate_calendar( $year, $month, $days = array(), $day_name_length = 3, $month_href = NULL, $first_day = 0, $pn = array() ) {
|
21 |
+
global $wp_locale;
|
22 |
+
|
23 |
+
$first_of_month = mktime( 0, 0, 0, $month, 1, $year );
|
24 |
+
#remember that mktime will automatically correct if invalid dates are entered
|
25 |
+
# for instance, mktime(0,0,0,12,32,1997) will be the date for Jan 1, 1998
|
26 |
+
# this provides a built in "rounding" feature to generate_calendar()
|
27 |
+
|
28 |
+
$day_names = array(); #generate all the day names according to the current locale
|
29 |
+
for ( $n = 0, $t = ( 3 + $first_day ) * 86400; $n < 7; $n++, $t += 86400 ) { #January 4, 1970 was a Sunday
|
30 |
+
$day_names[$n]['full'] = date_i18n( 'l', $t, true );
|
31 |
+
$day_names[$n]['initial'] = $wp_locale->get_weekday_initial( date_i18n( 'l', $t, true ) );
|
32 |
+
}
|
33 |
+
|
34 |
+
list( $month, $year, $month_name, $weekday ) = explode( ',', date_i18n( 'm, Y, F, w', $first_of_month ) );
|
35 |
+
$weekday = ( $weekday + 7 - $first_day ) % 7; #adjust for $first_day
|
36 |
+
$title = esc_html( $month_name ) . ' ' . $year; #note that some locales don't capitalize month and day names
|
37 |
+
|
38 |
+
#Begin calendar. Uses a real <caption>. See http://diveintomark.org/archives/2002/07/03
|
39 |
+
list( $p, $pl ) = each( $pn );
|
40 |
+
list( $n, $nl ) = each( $pn ); #previous and next links, if applicable
|
41 |
+
|
42 |
+
if ( $p )
|
43 |
+
$p = '<span class="gce-prev">' . ( ( $pl ) ? ( '<a class="gce-change-month" title="Previous month" name="' . $pl . '">' . $p . '</a>' ) : $p ) . '</span> ';
|
44 |
+
if ( $n )
|
45 |
+
$n = ' <span class="gce-next">' . ( ( $nl ) ? ( '<a class="gce-change-month" title="Next month" name="' . $nl . '">' . $n . '</a>' ) : $n ) . '</span>';
|
46 |
+
|
47 |
+
$calendar = '<table class="gce-calendar">' . "\n" . '<caption class="gce-caption">' . $p . '<span class="gce-month-title">' . ( ( $month_href ) ? ( '<a href="' . esc_attr( $month_href ) . '">' . $title . '</a>' ) : $title ) . '</span>' . $n . "</caption>\n<tr>";
|
48 |
+
|
49 |
+
if ( $day_name_length ) { #if the day names should be shown ($day_name_length > 0)
|
50 |
+
#if day_name_length is >3, the full name of the day will be printed
|
51 |
+
foreach ( $day_names as $d ) {
|
52 |
+
$calendar .= '<th><abbr title="' . esc_attr( $d['full'] ) . '">' . esc_html( $d['initial'] ) . '</abbr></th>';
|
53 |
+
}
|
54 |
+
|
55 |
+
$calendar .= "</tr>\n<tr>";
|
56 |
+
}
|
57 |
+
|
58 |
+
$time_now = current_time( 'timestamp' );
|
59 |
+
$today = mktime( 0, 0, 0, date( 'm', $time_now ), date( 'd', $time_now ), date( 'Y', $time_now ) );
|
60 |
+
|
61 |
+
if ( $weekday > 0 ) $calendar .= '<td colspan="' . $weekday . '"> </td>'; #initial 'empty' days
|
62 |
+
for ( $day = 1, $days_in_month = date( 't', $first_of_month ); $day <= $days_in_month; $day++, $weekday++ ) {
|
63 |
+
if ( 7 == $weekday ) {
|
64 |
+
$weekday = 0; #start a new week
|
65 |
+
$calendar .= "</tr>\n<tr>";
|
66 |
+
}
|
67 |
+
|
68 |
+
$timestamp = mktime( 0, 0, 0, $month, $day, $year );
|
69 |
+
|
70 |
+
if ( isset( $days[$timestamp] ) && is_array( $days[$timestamp] ) ) {
|
71 |
+
list( $link, $classes, $content ) = $days[$timestamp];
|
72 |
+
$calendar .= '<td' . ( ( $classes ) ? ( ' class="' . $classes . '">' ) : '>' ) . ( ( $link ) ? ( '<a href="' . $link . '"><span class="gce-day-number">' . $day . '</span></a>' . $content ) : '<span class="gce-day-number">' . $day . '</span>' . $content ) . '</td>';
|
73 |
+
}else{
|
74 |
+
$css_class = ( $timestamp < $time_now ) ? 'gce-day-past' : 'gce-day-future';
|
75 |
+
$calendar .= '<td class="' . $css_class . '"><span class="gce-day-number">' . $day . '</span></td>';
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
if ( 7 != $weekday ) $calendar .= '<td colspan="' . ( 7 - $weekday ) . '"> </td>'; #remaining "empty" days
|
80 |
+
|
81 |
+
return $calendar . "</tr>\n</table>\n";
|
82 |
+
}
|
83 |
?>
|
includes/register-settings.php
ADDED
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Register all settings needed for the Settings API.
|
5 |
+
*
|
6 |
+
* @package gce
|
7 |
+
* @subpackage Includes
|
8 |
+
* @author Phil Derksen <pderksen@gmail.com>, Nick Young <mycorpweb@gmail.com>
|
9 |
+
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly.
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Main function to register all of the plugin settings
|
18 |
+
*
|
19 |
+
* @since 2.0.0
|
20 |
+
*/
|
21 |
+
function gce_register_settings() {
|
22 |
+
|
23 |
+
$gce_settings = array(
|
24 |
+
|
25 |
+
/* General Settings */
|
26 |
+
'general' => array(
|
27 |
+
'save_settings' => array(
|
28 |
+
'id' => 'save_settings',
|
29 |
+
'name' => __( 'Save Settings', 'gce' ),
|
30 |
+
'desc' => __( 'Save your settings when uninstalling this plugin. Useful when upgrading or re-installing.', 'gce' ),
|
31 |
+
'type' => 'checkbox'
|
32 |
+
)
|
33 |
+
)
|
34 |
+
);
|
35 |
+
|
36 |
+
/* If the options do not exist then create them for each section */
|
37 |
+
if ( false == get_option( 'gce_settings_general' ) ) {
|
38 |
+
add_option( 'gce_settings_general' );
|
39 |
+
}
|
40 |
+
|
41 |
+
/* Add the General Settings section */
|
42 |
+
add_settings_section(
|
43 |
+
'gce_settings_general',
|
44 |
+
__( 'General Settings', 'gce' ),
|
45 |
+
'__return_false',
|
46 |
+
'gce_settings_general'
|
47 |
+
);
|
48 |
+
|
49 |
+
foreach ( $gce_settings['general'] as $option ) {
|
50 |
+
add_settings_field(
|
51 |
+
'gce_settings_general[' . $option['id'] . ']',
|
52 |
+
$option['name'],
|
53 |
+
function_exists( 'gce_' . $option['type'] . '_callback' ) ? 'gce_' . $option['type'] . '_callback' : 'gce_missing_callback',
|
54 |
+
'gce_settings_general',
|
55 |
+
'gce_settings_general',
|
56 |
+
gce_get_settings_field_args( $option, 'general' )
|
57 |
+
);
|
58 |
+
}
|
59 |
+
|
60 |
+
/* Register all settings or we will get an error when trying to save */
|
61 |
+
register_setting( 'gce_settings_general', 'gce_settings_general', 'gce_settings_sanitize' );
|
62 |
+
|
63 |
+
}
|
64 |
+
add_action( 'admin_init', 'gce_register_settings' );
|
65 |
+
|
66 |
+
/*
|
67 |
+
* Return generic add_settings_field $args parameter array.
|
68 |
+
*
|
69 |
+
* @since 2.0.0
|
70 |
+
*
|
71 |
+
* @param string $option Single settings option key.
|
72 |
+
* @param string $section Section of settings apge.
|
73 |
+
* @return array $args parameter to use with add_settings_field call.
|
74 |
+
*/
|
75 |
+
function gce_get_settings_field_args( $option, $section ) {
|
76 |
+
$settings_args = array(
|
77 |
+
'id' => $option['id'],
|
78 |
+
'desc' => $option['desc'],
|
79 |
+
'name' => $option['name'],
|
80 |
+
'section' => $section,
|
81 |
+
'size' => isset( $option['size'] ) ? $option['size'] : null,
|
82 |
+
'options' => isset( $option['options'] ) ? $option['options'] : '',
|
83 |
+
'std' => isset( $option['std'] ) ? $option['std'] : ''
|
84 |
+
);
|
85 |
+
|
86 |
+
// Link label to input using 'label_for' argument if text, textarea, password, select, or variations of.
|
87 |
+
// Just add to existing settings args array if needed.
|
88 |
+
if ( in_array( $option['type'], array( 'text', 'select', 'textarea', 'password', 'number' ) ) ) {
|
89 |
+
$settings_args = array_merge( $settings_args, array( 'label_for' => 'gce_settings_' . $section . '[' . $option['id'] . ']' ) );
|
90 |
+
}
|
91 |
+
|
92 |
+
return $settings_args;
|
93 |
+
}
|
94 |
+
|
95 |
+
/*
|
96 |
+
* Single checkbox callback function
|
97 |
+
*
|
98 |
+
* @since 2.0.0
|
99 |
+
*
|
100 |
+
*/
|
101 |
+
function gce_checkbox_callback( $args ) {
|
102 |
+
global $gce_options;
|
103 |
+
|
104 |
+
$checked = isset( $gce_options[$args['id']] ) ? checked( 1, $gce_options[$args['id']], false ) : '';
|
105 |
+
$html = "\n" . '<input type="checkbox" id="gce_settings_' . $args['section'] . '[' . $args['id'] . ']" name="gce_settings_' . $args['section'] . '[' . $args['id'] . ']" value="1" ' . $checked . '/>' . "\n";
|
106 |
+
|
107 |
+
// Render description text directly to the right in a label if it exists.
|
108 |
+
if ( ! empty( $args['desc'] ) )
|
109 |
+
$html .= '<label for="gce_settings_' . $args['section'] . '[' . $args['id'] . ']"> ' . $args['desc'] . '</label>' . "\n";
|
110 |
+
|
111 |
+
echo $html;
|
112 |
+
}
|
113 |
+
|
114 |
+
/*
|
115 |
+
* Function we can use to sanitize the input data and return it when saving options
|
116 |
+
*
|
117 |
+
* @since 2.0.0
|
118 |
+
*
|
119 |
+
*/
|
120 |
+
function gce_settings_sanitize( $input ) {
|
121 |
+
//add_settings_error( 'gce-notices', '', '', '' );
|
122 |
+
return $input;
|
123 |
+
}
|
124 |
+
|
125 |
+
/*
|
126 |
+
* Default callback function if correct one does not exist
|
127 |
+
*
|
128 |
+
* @since 2.0.0
|
129 |
+
*
|
130 |
+
*/
|
131 |
+
function gce_missing_callback( $args ) {
|
132 |
+
printf( __( 'The callback function used for the <strong>%s</strong> setting is missing.', 'gce' ), $args['id'] );
|
133 |
+
}
|
134 |
+
|
135 |
+
/*
|
136 |
+
* Function used to return an array of all of the plugin settings
|
137 |
+
*
|
138 |
+
* @since 2.0.0
|
139 |
+
*
|
140 |
+
*/
|
141 |
+
function gce_get_settings() {
|
142 |
+
|
143 |
+
// Set default settings
|
144 |
+
// If this is the first time running we need to set the defaults
|
145 |
+
if ( ! get_option( 'gce_upgrade_has_run' ) ) {
|
146 |
+
|
147 |
+
$general = get_option( 'gce_settings_general' );
|
148 |
+
|
149 |
+
$general['save_settings'] = 1;
|
150 |
+
|
151 |
+
update_option( 'gce_settings_general', $general );
|
152 |
+
}
|
153 |
+
|
154 |
+
$general_settings = is_array( get_option( 'gce_settings_general' ) ) ? get_option( 'gce_settings_general' ) : array();
|
155 |
+
|
156 |
+
return $general_settings;
|
157 |
+
}
|
includes/shortcodes.php
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shortcode functions
|
5 |
+
*
|
6 |
+
* @package GCE
|
7 |
+
* @author Phil Derksen <pderksen@gmail.com>, Nick Young <mycorpweb@gmail.com>
|
8 |
+
* @license GPL-2.0+
|
9 |
+
* @copyright 2014 Phil Derksen
|
10 |
+
*/
|
11 |
+
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Adds support for the new [gcal] shortcode
|
15 |
+
*
|
16 |
+
* Supports the old [google-calendar-events] shortcode
|
17 |
+
*
|
18 |
+
* @since 2.0.0
|
19 |
+
*/
|
20 |
+
function gce_gcal_shortcode( $attr ) {
|
21 |
+
|
22 |
+
extract( shortcode_atts( array(
|
23 |
+
'id' => null,
|
24 |
+
'display' => '',
|
25 |
+
'max' => 0,
|
26 |
+
'order' => 'asc',
|
27 |
+
'title' => null,
|
28 |
+
'type' => null,
|
29 |
+
), $attr, 'gce_feed' ) );
|
30 |
+
|
31 |
+
// If no ID is specified then return
|
32 |
+
if( empty( $id ) ) {
|
33 |
+
return;
|
34 |
+
}
|
35 |
+
|
36 |
+
$feed_ids = explode( ',', $id );
|
37 |
+
|
38 |
+
foreach( $feed_ids as $k => $v ) {
|
39 |
+
// Check for an old ID attached to this feed ID first
|
40 |
+
$q = new WP_Query( "post_type=gce_feed&meta_key=old_gce_id&meta_value=$v&order=ASC" );
|
41 |
+
|
42 |
+
if( $q->have_posts() ) {
|
43 |
+
$q->the_post();
|
44 |
+
// Set our ID to the old ID if found
|
45 |
+
$feed_ids[$k] = get_the_ID();
|
46 |
+
$v = get_the_ID();
|
47 |
+
}
|
48 |
+
|
49 |
+
if( empty( $display ) ) {
|
50 |
+
$display = get_post_meta( $v, 'gce_display_mode', true );
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
+
// Port over old options
|
55 |
+
if( $type != null ) {
|
56 |
+
if( 'ajax' == $type ) {
|
57 |
+
$display = 'grid';
|
58 |
+
} else {
|
59 |
+
$display = $type;
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
$args = array(
|
64 |
+
'title_text' => $title,
|
65 |
+
'max_events' => $max,
|
66 |
+
'sort' => $order,
|
67 |
+
'grouped' => ( $display == 'list-grouped' ? 1 : 0 ),
|
68 |
+
'month' => null,
|
69 |
+
'year' => null,
|
70 |
+
'widget' => 0
|
71 |
+
);
|
72 |
+
|
73 |
+
$feed_ids = implode( '-', $feed_ids );
|
74 |
+
|
75 |
+
return gce_print_calendar( $feed_ids, $display, $args );
|
76 |
+
|
77 |
+
}
|
78 |
+
add_shortcode( 'gcal', 'gce_gcal_shortcode' );
|
79 |
+
add_shortcode( 'google-calendar-events', 'gce_gcal_shortcode' );
|
index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
js/admin.js
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Admin JavaScript functions
|
3 |
+
*
|
4 |
+
* @package GCE
|
5 |
+
* @author Phil Derksen <pderksen@gmail.com>, Nick Young <mycorpweb@gmail.com>
|
6 |
+
* @license GPL-2.0+
|
7 |
+
* @copyright 2014 Phil Derksen
|
8 |
+
*/
|
9 |
+
|
10 |
+
(function ($) {
|
11 |
+
"use strict";
|
12 |
+
$(function () {
|
13 |
+
|
14 |
+
// Show the hidden text box if custom date is selected (Retrieve From)
|
15 |
+
$('#gce_retrieve_from').on('change', function() {
|
16 |
+
|
17 |
+
if( $(this).val() == 'custom_date' ) {
|
18 |
+
$('#gce_custom_from').show();
|
19 |
+
} else {
|
20 |
+
$('#gce_custom_from').hide();
|
21 |
+
}
|
22 |
+
});
|
23 |
+
|
24 |
+
// Show the hidden text box if custom date is selected (Retrieve Until)
|
25 |
+
$('#gce_retrieve_until').on('change', function() {
|
26 |
+
|
27 |
+
if( $(this).val() == 'custom_date' ) {
|
28 |
+
$('#gce_custom_until').show();
|
29 |
+
} else {
|
30 |
+
$('#gce_custom_until').hide();
|
31 |
+
}
|
32 |
+
});
|
33 |
+
|
34 |
+
// Add jQuery date picker to our 2 custom date fields
|
35 |
+
$('#gce_custom_from').datepicker();
|
36 |
+
$('#gce_custom_until').datepicker();
|
37 |
+
|
38 |
+
});
|
39 |
+
}(jQuery));
|
40 |
+
|
41 |
+
|
js/gce-admin-script.js
DELETED
@@ -1,29 +0,0 @@
|
|
1 |
-
function correct_options(){
|
2 |
-
val = jQuery('select[name="gce_options[use_builder]"]').val();
|
3 |
-
|
4 |
-
if(val == 'true'){
|
5 |
-
jQuery('.gce-simple-display-options').next('.form-table').hide();
|
6 |
-
jQuery('.gce-simple-display-options').hide();
|
7 |
-
jQuery('.gce-simple-display-options').prev('h3').hide();
|
8 |
-
|
9 |
-
jQuery('.gce-event-builder').next('.form-table').show();
|
10 |
-
jQuery('.gce-event-builder').show();
|
11 |
-
jQuery('.gce-event-builder').prev('h3').show();
|
12 |
-
}else{
|
13 |
-
jQuery('.gce-simple-display-options').next('.form-table').show();
|
14 |
-
jQuery('.gce-simple-display-options').show();
|
15 |
-
jQuery('.gce-simple-display-options').prev('h3').show();
|
16 |
-
|
17 |
-
jQuery('.gce-event-builder').next('.form-table').hide();
|
18 |
-
jQuery('.gce-event-builder').hide();
|
19 |
-
jQuery('.gce-event-builder').prev('h3').hide();
|
20 |
-
}
|
21 |
-
}
|
22 |
-
|
23 |
-
jQuery(document).ready(function(){
|
24 |
-
correct_options();
|
25 |
-
|
26 |
-
jQuery('select[name="gce_options[use_builder]"]').change(function(e){
|
27 |
-
correct_options();
|
28 |
-
});
|
29 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/gce-script.js
CHANGED
@@ -1,45 +1,58 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
function
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
});
|
40 |
-
});
|
41 |
-
}
|
42 |
-
|
43 |
-
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
});
|
1 |
+
|
2 |
+
/**
|
3 |
+
* Public JS functions
|
4 |
+
*
|
5 |
+
* @package GCE
|
6 |
+
* @author Phil Derksen <pderksen@gmail.com>, Nick Young <mycorpweb@gmail.com>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @copyright 2014 Phil Derksen
|
9 |
+
*/
|
10 |
+
|
11 |
+
|
12 |
+
function gce_ajaxify(target, feed_ids, max_events, title_text, type){
|
13 |
+
|
14 |
+
//Add click event to change month links
|
15 |
+
jQuery('#' + target + ' .gce-change-month').click(function(){
|
16 |
+
//Extract month and year
|
17 |
+
var month_year = jQuery(this).attr('name').split('-', 2);
|
18 |
+
//Add loading text to table caption
|
19 |
+
jQuery('#' + target + ' caption').html('Loading...');
|
20 |
+
//Send AJAX request
|
21 |
+
jQuery.get(gce.ajaxurl,{
|
22 |
+
action:'gce_ajax',
|
23 |
+
gce_type:type,
|
24 |
+
gce_feed_ids:feed_ids,
|
25 |
+
gce_title_text:title_text,
|
26 |
+
gce_widget_id:target,
|
27 |
+
gce_max_events:max_events,
|
28 |
+
gce_month:month_year[0],
|
29 |
+
gce_year:month_year[1]
|
30 |
+
}, function(data){
|
31 |
+
//Replace existing data with returned AJAX data
|
32 |
+
if(type == 'widget'){
|
33 |
+
jQuery('#' + target).html(data);
|
34 |
+
}else{
|
35 |
+
//console.log( 'Replacing content...' );
|
36 |
+
jQuery('#' + target).replaceWith(data);
|
37 |
+
}
|
38 |
+
gce_tooltips('#' + target + ' .gce-has-events');
|
39 |
+
});
|
40 |
+
});
|
41 |
+
}
|
42 |
+
|
43 |
+
function gce_tooltips(target_items){
|
44 |
+
jQuery(target_items).each(function(){
|
45 |
+
//Add qtip to all target items
|
46 |
+
jQuery(this).qtip({
|
47 |
+
content: jQuery(this).children('.gce-event-info'),
|
48 |
+
position: { corner: { target: 'center', tooltip: 'bottomLeft' }, adjust: { screen: true } },
|
49 |
+
hide: { fixed: true, delay: 100, effect: { length: 0 } },
|
50 |
+
show: { solo: true, delay: 0, effect: { length: 0 } },
|
51 |
+
style: { padding: "0", classes: { tooltip: 'gce-qtip', tip: 'gce-qtip-tip', title: 'gce-qtip-title', content: 'gce-qtip-content', active: 'gce-qtip-active' }, border: { width: 0 } }
|
52 |
+
});
|
53 |
+
});
|
54 |
+
}
|
55 |
+
|
56 |
+
jQuery(document).ready(function(){
|
57 |
+
gce_tooltips('.gce-has-events');
|
58 |
});
|
languages/google-calendar-events-de_DE.mo
DELETED
Binary file
|
languages/google-calendar-events-de_DE.po
DELETED
@@ -1,1016 +0,0 @@
|
|
1 |
-
# Copyright (C) 2010 Google Calendar Events
|
2 |
-
# This file is distributed under the same license as the Google Calendar Events package.
|
3 |
-
msgid ""
|
4 |
-
msgstr ""
|
5 |
-
"Project-Id-Version: Google Calendar Events 0.7.1\n"
|
6 |
-
"Report-Msgid-Bugs-To: http://wordpress.org/tag/google-calendar-events\n"
|
7 |
-
"POT-Creation-Date: 2011-07-17 10:47:22+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: 2013-03-15 13:44+0100\n"
|
12 |
-
"Last-Translator: Bertram Rützler <bertram@ruetzler.net>\n"
|
13 |
-
"Language-Team: Bertram Rützler <bertram@ruetzler.net>\n"
|
14 |
-
"X-Poedit-Language: German\n"
|
15 |
-
"X-Poedit-Country: AUSTRIA\n"
|
16 |
-
|
17 |
-
#: admin/edit.php:9
|
18 |
-
msgid "Edit Feed"
|
19 |
-
msgstr "Ereignisfeed bearbeiten"
|
20 |
-
|
21 |
-
#: admin/edit.php:11
|
22 |
-
#: admin/add.php:10
|
23 |
-
#: admin/refresh.php:11
|
24 |
-
#: admin/delete.php:11
|
25 |
-
msgid "Feed ID"
|
26 |
-
msgstr "Ereignisfeed ID"
|
27 |
-
|
28 |
-
#: admin/edit.php:12
|
29 |
-
#: admin/add.php:11
|
30 |
-
#: admin/refresh.php:12
|
31 |
-
#: admin/delete.php:12
|
32 |
-
msgid "Feed Title"
|
33 |
-
msgstr "Titel des Ereignisfeeds"
|
34 |
-
|
35 |
-
#: admin/edit.php:13
|
36 |
-
#: admin/add.php:12
|
37 |
-
msgid "Feed URL"
|
38 |
-
msgstr "URL des Ereignisfeeds"
|
39 |
-
|
40 |
-
#: admin/edit.php:14
|
41 |
-
#: admin/add.php:13
|
42 |
-
msgid "Retrieve events from"
|
43 |
-
msgstr "Ereignisse abrufen von"
|
44 |
-
|
45 |
-
#: admin/edit.php:15
|
46 |
-
#: admin/add.php:14
|
47 |
-
msgid "Retrieve events until"
|
48 |
-
msgstr "Ereignisse abrufen bis"
|
49 |
-
|
50 |
-
#: admin/edit.php:16
|
51 |
-
#: admin/add.php:15
|
52 |
-
msgid "Maximum number of events to retrieve"
|
53 |
-
msgstr "Maximale Anzahl der abzurufenden Ereignisse"
|
54 |
-
|
55 |
-
#: admin/edit.php:17
|
56 |
-
#: admin/add.php:16
|
57 |
-
msgid "Date format"
|
58 |
-
msgstr "Datumsformat"
|
59 |
-
|
60 |
-
#: admin/edit.php:18
|
61 |
-
#: admin/add.php:17
|
62 |
-
msgid "Time format"
|
63 |
-
msgstr "Zeitformat"
|
64 |
-
|
65 |
-
#: admin/edit.php:19
|
66 |
-
#: admin/add.php:18
|
67 |
-
msgid "Timezone adjustment"
|
68 |
-
msgstr "Adjustierung der Zeitzone"
|
69 |
-
|
70 |
-
#: admin/edit.php:20
|
71 |
-
#: admin/add.php:19
|
72 |
-
msgid "Cache duration"
|
73 |
-
msgstr "Cachedauer"
|
74 |
-
|
75 |
-
#: admin/edit.php:21
|
76 |
-
#: admin/add.php:20
|
77 |
-
msgid "Show multiple day events on each day?"
|
78 |
-
msgstr "Mehrere Ereignisse an einem Tag anzeigen?"
|
79 |
-
|
80 |
-
#: admin/edit.php:23
|
81 |
-
#: admin/add.php:22
|
82 |
-
msgid "Display Options"
|
83 |
-
msgstr "Anzeigeeinstellungen"
|
84 |
-
|
85 |
-
#: admin/edit.php:24
|
86 |
-
#: admin/add.php:23
|
87 |
-
msgid "Select display customization method"
|
88 |
-
msgstr "Art der Personalisierung der Anzeige auswählen"
|
89 |
-
|
90 |
-
#: admin/edit.php:26
|
91 |
-
#: admin/add.php:25
|
92 |
-
msgid "Event Display Builder"
|
93 |
-
msgstr "Ereignisanzeige-Generator"
|
94 |
-
|
95 |
-
#: admin/edit.php:27
|
96 |
-
#: admin/add.php:26
|
97 |
-
msgid "Event display builder HTML and shortcodes"
|
98 |
-
msgstr "Ereignisanzeige-Generator HTML und Shortcodes"
|
99 |
-
|
100 |
-
#: admin/edit.php:29
|
101 |
-
#: admin/add.php:28
|
102 |
-
msgid "Simple Display Options"
|
103 |
-
msgstr "Einfache Anzeige-Optionen"
|
104 |
-
|
105 |
-
#: admin/edit.php:30
|
106 |
-
#: admin/add.php:29
|
107 |
-
msgid "Display start time / date?"
|
108 |
-
msgstr "Start-/Endzeit anzeigen?"
|
109 |
-
|
110 |
-
#: admin/edit.php:31
|
111 |
-
#: admin/add.php:30
|
112 |
-
msgid "Display end time / date?"
|
113 |
-
msgstr "Start-/Enddatum anzeigen?"
|
114 |
-
|
115 |
-
#: admin/edit.php:32
|
116 |
-
#: admin/add.php:31
|
117 |
-
msgid "Separator text / characters"
|
118 |
-
msgstr "Trennzeichen"
|
119 |
-
|
120 |
-
#: admin/edit.php:33
|
121 |
-
#: admin/add.php:32
|
122 |
-
msgid "Display location?"
|
123 |
-
msgstr "Ort anzeigen?"
|
124 |
-
|
125 |
-
#: admin/edit.php:34
|
126 |
-
#: admin/add.php:33
|
127 |
-
msgid "Display description?"
|
128 |
-
msgstr "Beschreibung anzeigen?"
|
129 |
-
|
130 |
-
#: admin/edit.php:35
|
131 |
-
#: admin/add.php:34
|
132 |
-
msgid "Display link to event?"
|
133 |
-
msgstr "Verknüpfung zum Ereignis anzeigen?"
|
134 |
-
|
135 |
-
#: admin/edit.php:40
|
136 |
-
msgid "Make any changes you require to the feed details below, then click the Save Changes button."
|
137 |
-
msgstr "Bitte unten alle notwendigen Änderungen am Ereignisfeed durchführen und dann auf \"Änderungen speichern\" klicken."
|
138 |
-
|
139 |
-
#: admin/edit.php:59
|
140 |
-
#: admin/add.php:63
|
141 |
-
msgid "Anything you like. 'Upcoming Club Events', for example."
|
142 |
-
msgstr "Alles, was du willst, z.B. \"Nächste Ereignisse\""
|
143 |
-
|
144 |
-
#: admin/edit.php:70
|
145 |
-
msgid "This will probably be something like: <code>http://www.google.com/calendar/feeds/your-email@gmail.com/public/full</code>."
|
146 |
-
msgstr "Wahrscheinlich etwas wie: <code>http://www.google.com/calendar/feeds/your-email@gmail.com/public/full</code>."
|
147 |
-
|
148 |
-
#: admin/edit.php:72
|
149 |
-
msgid "or: <code>http://www.google.com/calendar/feeds/your-email@gmail.com/private-d65741b037h695ff274247f90746b2ty/basic</code>."
|
150 |
-
msgstr "oder: <code>http://www.google.com/calendar/feeds/your-email@gmail.com/private-d65741b037h695ff274247f90746b2ty/basic</code>."
|
151 |
-
|
152 |
-
#: admin/edit.php:83
|
153 |
-
msgid "The point in time at which to start retrieving events. Use the text-box to specify an additional offset from you chosen start point. The offset should be provided in seconds (3600 = 1 hour, 86400 = 1 day) and can be negative. If you have selected the 'Specific date / time' option, enter a <a href=\"http://www.timestampgenerator.com\" target=\"_blank\">UNIX timestamp</a> in the text-box."
|
154 |
-
msgstr "Der Zeitpunkt, ab dem Ereignisse empfangen werden sollen. Verwende die Text-Box, um einen zusätzlichen Offset vom gewählten Startpunkt anzugeben. Der Offset sollte in Sekunden angegeben werden (3600 = 1 Stunde, 86400 = 1 Tag) und kann negativ sein. Wenn die Option \"Bestimmtes Datum / Zeit\" ausgewählt wurde, bitte einen <a href=\"http://www.timestampgenerator.com\" target=\"_blank\">UNIX timestamp</a> in der Textbox angeben."
|
155 |
-
|
156 |
-
#: admin/edit.php:103
|
157 |
-
#: admin/add.php:105
|
158 |
-
msgid "The point in time at which to stop retrieving events. The instructions for the above option also apply here."
|
159 |
-
msgstr "Der Zeitpunkt, an dem das Empfangen von Ereignissen beendet werden soll. Die Anweisungen von oben gelten hier ebenfalls."
|
160 |
-
|
161 |
-
#: admin/edit.php:124
|
162 |
-
#: admin/add.php:124
|
163 |
-
msgid "Set this to a few more than you actually want to display (due to caching and timezone issues). The exact number to display can be configured per shortcode / widget."
|
164 |
-
msgstr "Setze diesen Wert auf etwas mehr, als tatsächlich angezeigt werden soll (aus Caching- und Zeitzonengründen). Die exakte Anzahl der anzuzeigenden Ereignisse kann über einen Shortcode oder das Widget konfiguriert werden."
|
165 |
-
|
166 |
-
#: admin/edit.php:135
|
167 |
-
#: admin/add.php:133
|
168 |
-
msgid "In <a href=\"http://php.net/manual/en/function.date.php\" target=\"_blank\">PHP date format</a>. Leave this blank if you'd rather stick with the default format for your blog."
|
169 |
-
msgstr "In <a href=\"http://php.net/manual/de/function.date.php\" target=\"_blank\">PHP-Datumsformat</a>. Lass dieses Feld leer, wenn du beim Standard-Format deines Blogs bleiben möchtest."
|
170 |
-
|
171 |
-
#: admin/edit.php:146
|
172 |
-
#: admin/add.php:142
|
173 |
-
msgid "In <a href=\"http://php.net/manual/en/function.date.php\" target=\"_blank\">PHP date format</a>. Again, leave this blank to stick with the default."
|
174 |
-
msgstr "In <a href=\"http://php.net/manual/de/function.date.php\" target=\"_blank\">PHP-Datumsformat</a>. Lass dieses Feld leer, wenn du beim Standard-Format deines Blogs bleiben möchtest."
|
175 |
-
|
176 |
-
#: admin/edit.php:161
|
177 |
-
#: admin/add.php:155
|
178 |
-
msgid "If you are having problems with dates and times displaying in the wrong timezone, select a city in your required timezone here."
|
179 |
-
msgstr "Wenn Probleme im Zusammenhang mit Zeitzonen auftauchen, wähle hier eine Stadt aus der gewünschten Zeitzone."
|
180 |
-
|
181 |
-
#: admin/edit.php:172
|
182 |
-
#: admin/add.php:164
|
183 |
-
msgid "The length of time, in seconds, to cache the feed (43200 = 12 hours). If this feed changes regularly, you may want to reduce the cache duration."
|
184 |
-
msgstr "Dauer, wie lang der Ereignisfeed zwischengespeichert werden soll (43200 = 12 Stunden). Wenn der Ereignisfeed sich regelmäßig ändern, könnte es gut sein, diesen Wert zu reduzieren."
|
185 |
-
|
186 |
-
#: admin/edit.php:183
|
187 |
-
#: admin/add.php:173
|
188 |
-
msgid "Show events that span multiple days on each day that they span, rather than just the first day."
|
189 |
-
msgstr "Ereignisse, die sich über mehrere Tage erstecken, an jedem Tag anzeigen und nicht nur am ersten."
|
190 |
-
|
191 |
-
#: admin/edit.php:194
|
192 |
-
#: admin/add.php:184
|
193 |
-
msgid "These settings control what information will be displayed for this feed in the tooltip (for grids), or in a list."
|
194 |
-
msgstr "Diese Einstellungen kontrollieren, welche Informationen für diesen Ereignisfeed im Tooltip (bei Kalender) oder in der Liste angezeigt werden."
|
195 |
-
|
196 |
-
#: admin/edit.php:202
|
197 |
-
#: admin/add.php:190
|
198 |
-
msgid "It is recommended that you use the event display builder option, as it provides much more flexibility than the simple display options. The event display builder can do everything the simple display options can, plus lots more!"
|
199 |
-
msgstr "Es ist empfehlenswert, den \"Ereignisanzeige-Generator\" zu verwenden, da er deutlich flexibler ist als die einfachen Anzeige-Optionen. Der Generator kann alles, was auch die einfachen Anzeige-Optionen können - und noch vieles mehr!"
|
200 |
-
|
201 |
-
#: admin/edit.php:205
|
202 |
-
#: admin/add.php:193
|
203 |
-
msgid "Event display builder"
|
204 |
-
msgstr "Ereignisanzeige-Generator"
|
205 |
-
|
206 |
-
#: admin/edit.php:206
|
207 |
-
#: admin/add.php:194
|
208 |
-
msgid "Simple display options"
|
209 |
-
msgstr "Einfache Anzeige-Optionen"
|
210 |
-
|
211 |
-
#: admin/edit.php:214
|
212 |
-
msgid "Use the event display builder to customize how event information will be displayed in the grid tooltips and in lists. Use HTML and the shortcodes (explained below) to display the information you require. A basic example display format is provided as a starting point. For more information, take a look at the <a href=\"http://www.rhanney.co.uk/plugins/google-calendar-events/event-display-builder\" target=\"_blank\">event display builder guide</a>."
|
213 |
-
msgstr "Verwende den \"Ereignisanzeige-Generator\", um die Art, wie die Information in den Kalender-Infoboxen und Listen angezeigt werden soll, zu personalisieren. Verwende HTML und Shortcodes (Erklärung weiter unten), um die benötigen Informationen anzuzeigen. Ein einfaches Beispiel steht als Anfangspunkt zur Verfügung. Für weitere Information wirf einen Blick auf den <a href=\"http://www.rhanney.co.uk/plugins/google-calendar-events/event-display-builder\" target=\"_blank\">event display builder guide</a>."
|
214 |
-
|
215 |
-
#: admin/edit.php:224
|
216 |
-
msgid "(More information on all of the below shortcodes and attributes, and working examples, can be found in the <a href=\"http://www.rhanney.co.uk/plugins/google-calendar-events/event-display-builder\" target=\"_blank\">event display builder guide</a>)"
|
217 |
-
msgstr "(Weitere Informationen über die unten angeführten Shortcodes und Attribute sowie Beispiele können im <a href=\"http://www.rhanney.co.uk/plugins/google-calendar-events/event-display-builder\" target=\"_blank\">event display builder guide</a> gefunden werden.)"
|
218 |
-
|
219 |
-
#: admin/edit.php:225
|
220 |
-
#: admin/add.php:224
|
221 |
-
msgid "Event information shortcodes:"
|
222 |
-
msgstr "Ereignis-Informations-Shortcodes:"
|
223 |
-
|
224 |
-
#: admin/edit.php:227
|
225 |
-
#: admin/add.php:226
|
226 |
-
msgid "The event title (possible attributes: <code>html</code>, <code>markdown</code>)"
|
227 |
-
msgstr "Der Titel des Ereignisses (mögliche Attribute: <code>html</code>, <code>markdown</code>)"
|
228 |
-
|
229 |
-
#: admin/edit.php:228
|
230 |
-
#: admin/add.php:227
|
231 |
-
msgid "The event start time. Will use the time format specified in the above settings"
|
232 |
-
msgstr "Die Startzeit des Ereignisses, als Format wird das oben festgelegte verwendet."
|
233 |
-
|
234 |
-
#: admin/edit.php:229
|
235 |
-
#: admin/add.php:228
|
236 |
-
msgid "The event start date. Will use the date format specified in the above settings"
|
237 |
-
msgstr "Das Startdatum des Ereignisses, als Format wird das oben festgelegte verwendet."
|
238 |
-
|
239 |
-
#: admin/edit.php:230
|
240 |
-
#: admin/add.php:229
|
241 |
-
msgid "The event start date / time. Will use the format specified in the <code>format</code> attribute (possible attributes: <code>format</code>)"
|
242 |
-
msgstr "Startzeit und -datum des Ereignisses, als Format wird das im <code>format</code>-Attribut festgelegte verwendet. (Mögliche Attribute: <code>format</code>)"
|
243 |
-
|
244 |
-
#: admin/edit.php:231
|
245 |
-
#: admin/add.php:230
|
246 |
-
msgid "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' (possible attributes: <code>precision</code>)"
|
247 |
-
msgstr "Der Unterschied zwischen der Startzeit des Ereignisses und der Zeit jetzt, in \"human-readable\" Format, also \"1 Stunde\", \"4 Tage\", \"15 Minuten\" (mögliche Attribute: <code>precision</code>)"
|
248 |
-
|
249 |
-
#: admin/edit.php:232
|
250 |
-
#: admin/add.php:231
|
251 |
-
msgid "The event end time. Will use the time format specified in the above settings"
|
252 |
-
msgstr "Die Endzeit des Ereignisses, als Format wird das oben festgelegte verwendet."
|
253 |
-
|
254 |
-
#: admin/edit.php:233
|
255 |
-
#: admin/add.php:232
|
256 |
-
msgid "The event end date. Will use the date format specified in the above settings"
|
257 |
-
msgstr "Das Enddatum des Ereignisses, als Format wird das oben festgelegte verwendet."
|
258 |
-
|
259 |
-
#: admin/edit.php:234
|
260 |
-
#: admin/add.php:233
|
261 |
-
msgid "The event end date / time. Will use the format specified in the <code>format</code> attribute (possible attributes: <code>format</code>)"
|
262 |
-
msgstr "Endzeit und -datum des Ereignisses, als Format wird das im <code>format</code>-Attribut festgelegte verwendet. (Mögliche Attribute: <code>format</code>)"
|
263 |
-
|
264 |
-
#: admin/edit.php:235
|
265 |
-
#: admin/add.php:234
|
266 |
-
msgid "The difference between the end time of the event and the time now, in human-readable format (possible attributes: <code>precision</code>)"
|
267 |
-
msgstr "Der Unterschied zwischen der Endzeit des Ereignisses und der Zeit jetzt, in \"human-readable\" Format, also \"1 Stunde\", \"4 Tage\", \"15 Minuten\" (mögliche Attribute: <code>precision</code>)"
|
268 |
-
|
269 |
-
#: admin/edit.php:236
|
270 |
-
#: admin/add.php:235
|
271 |
-
msgid "The event location (possible attributes: <code>html</code>, <code>markdown</code>)"
|
272 |
-
msgstr "Veranstaltungsort (mögliche Attribute: <code>html</code>, <code>markdown</code>)"
|
273 |
-
|
274 |
-
#: admin/edit.php:237
|
275 |
-
#: admin/add.php:236
|
276 |
-
msgid "Anything between the opening and closing shortcode tags (inlcuding further shortcodes) will be linked to Google Maps, using the event location as a search parameter (possible attributes: <code>newwindow</code>)"
|
277 |
-
msgstr "Alles zwischen den Shortcode-Tags (auch weitere Shortcodes) wird mit Google Maps verlinkt, unter der Verwendung des Veranstaltungsortes als Suchparameter (mögliche Attribute: <code>newwindow</code>)"
|
278 |
-
|
279 |
-
#: admin/edit.php:238
|
280 |
-
#: admin/add.php:237
|
281 |
-
msgid "The event description (possible attributes: <code>html</code>, <code>markdown</code>, <code>limit</code>)"
|
282 |
-
msgstr "Beschreibung des Ereignisses (mögliche Attribute: <code>html</code>, <code>markdown</code>, <code>limit</code>)"
|
283 |
-
|
284 |
-
#: admin/edit.php:239
|
285 |
-
#: admin/add.php:238
|
286 |
-
msgid "Anything between the opening and closing shortcode tags (inlcuding further shortcodes) will be linked to the Google Calendar page for the event (possible attributes: <code>newwindow</code>)"
|
287 |
-
msgstr "Alles zwischen den Shortcode-Tags (auch weitere Shortcodes) wird mit der Seite des Google Kalenders für dieses Ereignis verknüpft. (mögliche Attribute: <code>newwindow</code>)"
|
288 |
-
|
289 |
-
#: admin/edit.php:240
|
290 |
-
#: admin/add.php:239
|
291 |
-
msgid "The raw URL to the Google Calendar page for the event"
|
292 |
-
msgstr "Die URL zur Google Kalender-Seite für dieses Ereignis."
|
293 |
-
|
294 |
-
#: admin/edit.php:241
|
295 |
-
#: admin/add.php:240
|
296 |
-
msgid "The length of the event, in human-readable format (possible attributes: <code>precision</code>)"
|
297 |
-
msgstr "Die Dauer des Ereignisses, in \"human-readable\" Format (mögliche Attribute: <code>precision</code>)"
|
298 |
-
|
299 |
-
#: admin/edit.php:242
|
300 |
-
#: admin/add.php:241
|
301 |
-
msgid "The position of the event in the current list, or the position of the event in the current month (for grids)"
|
302 |
-
msgstr "Position des Ereignisses in der aktuellen Liste, oder die Position des Ereignisses im aktuellen Monat (bei Kalendern)"
|
303 |
-
|
304 |
-
#: admin/edit.php:243
|
305 |
-
#: admin/add.php:242
|
306 |
-
msgid "The event UID (a unique identifier assigned to the event by Google)"
|
307 |
-
msgstr "Die UID des Ereignisses (ein eindeutiger Marker, der von Google zugewiesen wird)"
|
308 |
-
|
309 |
-
#: admin/edit.php:245
|
310 |
-
#: admin/add.php:244
|
311 |
-
msgid "Feed information shortcodes:"
|
312 |
-
msgstr "Shortcodes für die Information des Ereignisfeeds:"
|
313 |
-
|
314 |
-
#: admin/edit.php:247
|
315 |
-
#: admin/add.php:246
|
316 |
-
msgid "The title of the feed from which the event comes"
|
317 |
-
msgstr "Titel des Ereignisfeeds, von dem das Ereignis kommt"
|
318 |
-
|
319 |
-
#: admin/edit.php:248
|
320 |
-
#: admin/add.php:247
|
321 |
-
msgid "The ID of the feed from which the event comes"
|
322 |
-
msgstr "ID des Ereignisfeeds, von dem das Ereignis kommt"
|
323 |
-
|
324 |
-
#: admin/edit.php:249
|
325 |
-
#: admin/add.php:248
|
326 |
-
msgid "The calendar ID (a unique identifier assigned to the calendar by Google)"
|
327 |
-
msgstr "Kalender-ID (ein eindeutiger Marker, der von Google zugeteilt wird)"
|
328 |
-
|
329 |
-
#: admin/edit.php:251
|
330 |
-
#: admin/add.php:250
|
331 |
-
msgid "Conditional shortcodes:"
|
332 |
-
msgstr "Bedingte Shortcodes:"
|
333 |
-
|
334 |
-
#: admin/edit.php:252
|
335 |
-
#: admin/add.php:251
|
336 |
-
msgid "Anything entered between the opening and closing tags of each of the following shortcodes will only be displayed if its condition (below) is met."
|
337 |
-
msgstr "Alles, was zwischen den Shortcode-Tags von jedem der nachfolgenden Shortcodes steht, wird nur angezeigt, wenn die Bedingung (unten) erfüllt ist."
|
338 |
-
|
339 |
-
#: admin/edit.php:254
|
340 |
-
#: admin/add.php:253
|
341 |
-
msgid "The event is an all-day event"
|
342 |
-
msgstr "Das Ereignis erstreckt sich über den ganzen Tag."
|
343 |
-
|
344 |
-
#: admin/edit.php:255
|
345 |
-
#: admin/add.php:254
|
346 |
-
msgid "The event is not an all-day event"
|
347 |
-
msgstr "Das Ereignis erstreckt sich nicht über den ganzen Tag."
|
348 |
-
|
349 |
-
#: admin/edit.php:256
|
350 |
-
#: admin/add.php:255
|
351 |
-
msgid "The event has a title"
|
352 |
-
msgstr "Das Ereignis hat einen Titel."
|
353 |
-
|
354 |
-
#: admin/edit.php:257
|
355 |
-
#: admin/add.php:256
|
356 |
-
msgid "The event has a description"
|
357 |
-
msgstr "Das Ereignis hat eine Beschreibung."
|
358 |
-
|
359 |
-
#: admin/edit.php:258
|
360 |
-
#: admin/add.php:257
|
361 |
-
msgid "The event has a location"
|
362 |
-
msgstr "Das Ereignis hat einen Veranstaltungsort."
|
363 |
-
|
364 |
-
#: admin/edit.php:259
|
365 |
-
#: admin/add.php:258
|
366 |
-
msgid "The event is to be displayed in a tooltip (not a list)"
|
367 |
-
msgstr "Das Ereignis soll in einer Infobox (und nicht in einer Liste) angezeigt werden."
|
368 |
-
|
369 |
-
#: admin/edit.php:260
|
370 |
-
#: admin/add.php:259
|
371 |
-
msgid "The event is to be displayed in a list (not a tooltip)"
|
372 |
-
msgstr "Das Ereignis soll in einer Liste (und nicht in einer Infobox) angezeigt werden."
|
373 |
-
|
374 |
-
#: admin/edit.php:261
|
375 |
-
#: admin/add.php:260
|
376 |
-
msgid "The event is taking place now (after the start time, but before the end time)"
|
377 |
-
msgstr "Das Ereignis findet gerade statt. (Wir sind also nach der Start-, aber vor der Endzeit.)"
|
378 |
-
|
379 |
-
#: admin/edit.php:262
|
380 |
-
#: admin/add.php:261
|
381 |
-
msgid "The event is not taking place now (may have ended or not yet started)"
|
382 |
-
msgstr "Das Ereignis findet gerade nicht statt, hat also noch nicht begonnen oder ist schon zu Ende."
|
383 |
-
|
384 |
-
#: admin/edit.php:263
|
385 |
-
#: admin/add.php:262
|
386 |
-
msgid "The event has started (even if it has also ended)"
|
387 |
-
msgstr "Das Ereignis hat schon begonnen (auch wenn es bereits beendet ist)."
|
388 |
-
|
389 |
-
#: admin/edit.php:264
|
390 |
-
#: admin/add.php:263
|
391 |
-
msgid "The event has not started"
|
392 |
-
msgstr "Das Ereignis hat noch nicht begonnen."
|
393 |
-
|
394 |
-
#: admin/edit.php:265
|
395 |
-
#: admin/add.php:264
|
396 |
-
msgid "The event has ended"
|
397 |
-
msgstr "Das Ereignis ist schon zu Ende."
|
398 |
-
|
399 |
-
#: admin/edit.php:266
|
400 |
-
#: admin/add.php:265
|
401 |
-
msgid "The event has not ended (even if it hasn't started)"
|
402 |
-
msgstr "Das Ereignis hat noch nicht geendet (auch, wenn es noch gar nicht begonnen hat)."
|
403 |
-
|
404 |
-
#: admin/edit.php:267
|
405 |
-
#: admin/add.php:266
|
406 |
-
msgid "The event is the first of the day"
|
407 |
-
msgstr "Das Ereignis ist das erste des Tages."
|
408 |
-
|
409 |
-
#: admin/edit.php:268
|
410 |
-
#: admin/add.php:267
|
411 |
-
msgid "The event is not the first of the day"
|
412 |
-
msgstr "Das Ereignis ist nicht das erste des Tages."
|
413 |
-
|
414 |
-
#: admin/edit.php:269
|
415 |
-
#: admin/add.php:268
|
416 |
-
msgid "The event spans multiple days"
|
417 |
-
msgstr "Das Ereignis dauert mehrere Tage."
|
418 |
-
|
419 |
-
#: admin/edit.php:270
|
420 |
-
#: admin/add.php:269
|
421 |
-
msgid "The event does not span multiple days"
|
422 |
-
msgstr "Das Ereignis dauert nicht mehrere Tage."
|
423 |
-
|
424 |
-
#: admin/edit.php:272
|
425 |
-
#: admin/add.php:271
|
426 |
-
msgid "Attributes:"
|
427 |
-
msgstr "Attribute:"
|
428 |
-
|
429 |
-
#: admin/edit.php:273
|
430 |
-
#: admin/add.php:272
|
431 |
-
msgid "The possible attributes mentioned above are explained here:"
|
432 |
-
msgstr "Die oben angeführten Attribute sind hier erklärt:"
|
433 |
-
|
434 |
-
#: admin/edit.php:275
|
435 |
-
#: admin/add.php:274
|
436 |
-
msgid "Whether or not to parse HTML that has been entered in the relevant field. Can be <code>true</code> or <code>false</code>"
|
437 |
-
msgstr "Ob HTML-Code in diesem Feld auszuführen ist oder nicht. Kann <code>true</code> oder <code>false</code> sein."
|
438 |
-
|
439 |
-
#: admin/edit.php:276
|
440 |
-
#: admin/add.php:275
|
441 |
-
msgid "Whether or not to parse <a href=\"http://daringfireball.net/projects/markdown\" target=\"_blank\">Markdown</a> that has been entered in the relevant field. <a href=\"http://michelf.com/projects/php-markdown\" target=\"_blank\">PHP Markdown</a> must be installed for this to work. Can be <code>true</code> or <code>false</code>"
|
442 |
-
msgstr "Ob ein <a href=\"http://daringfireball.net/projects/markdown\" target=\"_blank\">Markdown</a> in dem entsprechenden Feld auszuführen ist oder nicht. <a href=\"http://michelf.com/projects/php-markdown\" target=\"_blank\">PHP Markdown</a> muss zuvor installiert werden, damit das funktionert. Kann <code>true</code> oder <code>false</code> sein."
|
443 |
-
|
444 |
-
#: admin/edit.php:277
|
445 |
-
#: admin/add.php:276
|
446 |
-
msgid "The word limit for the field. Should be specified as a positive integer"
|
447 |
-
msgstr "Begrenzung der Zeichen für das Feld. Sollte eine positive Ganzzahl sein."
|
448 |
-
|
449 |
-
#: admin/edit.php:278
|
450 |
-
#: admin/add.php:277
|
451 |
-
msgid "The date / time format to use. Should specified as a <a href=\"http://php.net/manual/en/function.date.php\" target=\"_blank\">PHP date format</a> string"
|
452 |
-
msgstr "Das zu verwendende Zeit- und Datumsformat. Sollte als <a href=\"http://php.net/manual/de/function.date.php\" target=\"_blank\">PHP-Datums-Format</a> angegeben sein."
|
453 |
-
|
454 |
-
#: admin/edit.php:279
|
455 |
-
#: admin/add.php:278
|
456 |
-
msgid "Whether or not the link should open in a new window / tab. Can be <code>true</code> or <code>false</code>"
|
457 |
-
msgstr "Ob ein Link in einem neuen Fenster geöffnet werden soll oder nicht. Kann <code>true</code> oder <code>false</code> sein."
|
458 |
-
|
459 |
-
#: admin/edit.php:280
|
460 |
-
#: admin/add.php:279
|
461 |
-
msgid "How precise to be when displaying a time difference in human-readable format. Should be specified as a positive integer"
|
462 |
-
msgstr "Wie genau die Zeit beim \"human-readable\" Format sein soll. Sollte als positive Ganzzahl angegeben werden."
|
463 |
-
|
464 |
-
#: admin/edit.php:281
|
465 |
-
#: admin/add.php:280
|
466 |
-
msgid "An offset (in seconds) to apply to start / end times before display. Should be specified as a (positive or negative) integer"
|
467 |
-
msgstr "Ein Offset (in Sekunden), der Start- und Endzeiten hinzugefügt werden soll. Kann als (positive oder negative) Ganzzahl angegeben werden."
|
468 |
-
|
469 |
-
#: admin/edit.php:282
|
470 |
-
#: admin/add.php:281
|
471 |
-
msgid "Whether or not to automatically convert URLs in the description to links. Can be <code>true</code> or <code>false</code>"
|
472 |
-
msgstr "Ob URLs in der Beschreibung automatisch in Links umgewandelt werden sollen oder nicht. Kann <code>true</code> oder <code>false</code> sein."
|
473 |
-
|
474 |
-
#: admin/edit.php:290
|
475 |
-
#: admin/add.php:289
|
476 |
-
msgid "You can use some HTML in the text fields, but ensure it is valid or things might go wonky. Text fields can be empty too."
|
477 |
-
msgstr "In den Textfeldern kann HTML-Code verwendet werden, aber stelle sicher, dass dieser auch gültig ist, sonst können lustige Ergebnisse heraus kommen. Die Textfelder können auch leer bleiben."
|
478 |
-
|
479 |
-
#: admin/edit.php:298
|
480 |
-
#: admin/add.php:295
|
481 |
-
msgid "Select how to display the start date / time."
|
482 |
-
msgstr "Wähle, wie Startzeit und -datum angezeigt werden sollen."
|
483 |
-
|
484 |
-
#: admin/edit.php:301
|
485 |
-
#: admin/add.php:298
|
486 |
-
msgid "Don't display start time or date"
|
487 |
-
msgstr "Startzeit und -datum nicht anzeigen"
|
488 |
-
|
489 |
-
#: admin/edit.php:302
|
490 |
-
#: admin/add.php:299
|
491 |
-
msgid "Display start time"
|
492 |
-
msgstr "Startzeit anzeigen"
|
493 |
-
|
494 |
-
#: admin/edit.php:303
|
495 |
-
#: admin/add.php:300
|
496 |
-
msgid "Display start date"
|
497 |
-
msgstr "Startdatum anzeigen"
|
498 |
-
|
499 |
-
#: admin/edit.php:304
|
500 |
-
#: admin/add.php:301
|
501 |
-
msgid "Display start time and date (in that order)"
|
502 |
-
msgstr "Startzeit und -datum (in dieser Reihenfolge) anzeigen"
|
503 |
-
|
504 |
-
#: admin/edit.php:305
|
505 |
-
#: admin/add.php:302
|
506 |
-
msgid "Display start date and time (in that order)"
|
507 |
-
msgstr "Startdatum und -zeit (in dieser Reihenfolge) anzeigen"
|
508 |
-
|
509 |
-
#: admin/edit.php:308
|
510 |
-
#: admin/add.php:305
|
511 |
-
msgid "Text to display before the start time."
|
512 |
-
msgstr "Text, der vor der Startzeit angezeigt wird"
|
513 |
-
|
514 |
-
#: admin/edit.php:318
|
515 |
-
#: admin/add.php:313
|
516 |
-
msgid "Select how to display the end date / time."
|
517 |
-
msgstr "Wähle, wie Endzeit und -datum angezeigt werden sollen."
|
518 |
-
|
519 |
-
#: admin/edit.php:321
|
520 |
-
#: admin/add.php:316
|
521 |
-
msgid "Don't display end time or date"
|
522 |
-
msgstr "Endzeit und -datum nicht anzeigen."
|
523 |
-
|
524 |
-
#: admin/edit.php:322
|
525 |
-
#: admin/add.php:317
|
526 |
-
msgid "Display end time"
|
527 |
-
msgstr "Endzeit anzeigen."
|
528 |
-
|
529 |
-
#: admin/edit.php:323
|
530 |
-
#: admin/add.php:318
|
531 |
-
msgid "Display end date"
|
532 |
-
msgstr "Enddatum anzeigen."
|
533 |
-
|
534 |
-
#: admin/edit.php:324
|
535 |
-
#: admin/add.php:319
|
536 |
-
msgid "Display end time and date (in that order)"
|
537 |
-
msgstr "Endzeit und -datum (in dieser Reihenfolge) anzeigen"
|
538 |
-
|
539 |
-
#: admin/edit.php:325
|
540 |
-
#: admin/add.php:320
|
541 |
-
msgid "Display end date and time (in that order)"
|
542 |
-
msgstr "Enddatum und -zeit (in dieser Reihenfolge) anzeigen"
|
543 |
-
|
544 |
-
#: admin/edit.php:328
|
545 |
-
#: admin/add.php:323
|
546 |
-
msgid "Text to display before the end time."
|
547 |
-
msgstr "Text, der vor der Endzeit angezeigt wird"
|
548 |
-
|
549 |
-
#: admin/edit.php:338
|
550 |
-
#: admin/add.php:331
|
551 |
-
msgid "If you have chosen to display both the time and date above, enter the text / characters to display between the time and date here (including any spaces)."
|
552 |
-
msgstr "Wenn gewählt wurde, Zeit und Datum anzuzeigen, welcher Text (welche Zeichen) sollen zwischen Zeit und Datum stehen (inkl. allfälliger Leerzeichen)."
|
553 |
-
|
554 |
-
#: admin/edit.php:349
|
555 |
-
#: admin/add.php:340
|
556 |
-
msgid "Show the location of events?"
|
557 |
-
msgstr "Veranstaltungsort anzeigen?"
|
558 |
-
|
559 |
-
#: admin/edit.php:351
|
560 |
-
#: admin/add.php:342
|
561 |
-
msgid "Text to display before the location."
|
562 |
-
msgstr "Text, der vor dem Veranstaltungsort anzuzeigen ist."
|
563 |
-
|
564 |
-
#: admin/edit.php:362
|
565 |
-
msgid "Show the description of events? (URLs in the description will be made into links)."
|
566 |
-
msgstr "Beschreibung der Ereignisse anzeigen? (URLs in der Beschreibung werden in Links umgewandelt.)"
|
567 |
-
|
568 |
-
#: admin/edit.php:364
|
569 |
-
#: admin/add.php:353
|
570 |
-
msgid "Text to display before the description."
|
571 |
-
msgstr "Text, der vor der Beschreibung anzuzeigen ist."
|
572 |
-
|
573 |
-
#: admin/edit.php:368
|
574 |
-
#: admin/add.php:357
|
575 |
-
msgid "Maximum number of words to show from description. Leave blank for no limit."
|
576 |
-
msgstr "Maximale Anzahl der Wörter der Beschreibung, die angezeigt werden. Leer lassen für kein Limit."
|
577 |
-
|
578 |
-
#: admin/edit.php:379
|
579 |
-
#: admin/add.php:366
|
580 |
-
msgid "Show a link to the Google Calendar page for an event?"
|
581 |
-
msgstr "Einen Link zu der Google Kalender-Seite für ein Ereignis anzeigen?"
|
582 |
-
|
583 |
-
#: admin/edit.php:382
|
584 |
-
#: admin/add.php:369
|
585 |
-
msgid "Links open in a new window / tab?"
|
586 |
-
msgstr "Links in neuem Fenster / Tab öffnen?"
|
587 |
-
|
588 |
-
#: admin/edit.php:384
|
589 |
-
#: admin/add.php:371
|
590 |
-
msgid "The link text to be displayed."
|
591 |
-
msgstr "Text des Links, der angezeigt wird."
|
592 |
-
|
593 |
-
#: admin/add.php:8
|
594 |
-
msgid "Add a Feed"
|
595 |
-
msgstr "Ereignisfeed hinzufügen"
|
596 |
-
|
597 |
-
#: admin/add.php:39
|
598 |
-
msgid "Enter the feed details below, then click the Add Feed button."
|
599 |
-
msgstr "Bitte unten die Details des Ereignisfeeds eingeben und dann auf \"Hinzufügen\" klicken."
|
600 |
-
|
601 |
-
#: admin/add.php:72
|
602 |
-
msgid "This will probably be something like:"
|
603 |
-
msgstr "Das wird in etwas sein wie:"
|
604 |
-
|
605 |
-
#: admin/add.php:74
|
606 |
-
msgid "or:"
|
607 |
-
msgstr "oder:"
|
608 |
-
|
609 |
-
#: admin/add.php:84
|
610 |
-
msgid "The point in time at which to start retrieving events. Use the text-box to specify an additional offset from you chosen start point. The offset should be provided in seconds (3600 = 1 hour, 86400 = 1 day) and can be negative. If you have selected the 'Specific date / time' option, enter a"
|
611 |
-
msgstr "Der Zeitpunkt, ab dem Ereignisse abgerufen werden sollen. Verwende das Textfeld, um einen möglichen Offset vom gewählten Startpunkt festzusetzen. Der Offset sollte in Sekunden (3600 = 1 Stunde, 86400 = 1 Tag) angegeben werden und kann auch negativ sein. Wenn die \"Bestimmes Datum / Zeit\"-Option gewählt wurde, gib einen"
|
612 |
-
|
613 |
-
#: admin/add.php:85
|
614 |
-
msgid "UNIX timestamp"
|
615 |
-
msgstr "UNIX timestamp"
|
616 |
-
|
617 |
-
#: admin/add.php:86
|
618 |
-
msgid "in the text-box."
|
619 |
-
msgstr "in dem Textfeld an."
|
620 |
-
|
621 |
-
#: admin/add.php:90
|
622 |
-
#: admin/add.php:108
|
623 |
-
msgid "Now"
|
624 |
-
msgstr "Jetzt"
|
625 |
-
|
626 |
-
#: admin/add.php:91
|
627 |
-
#: admin/add.php:109
|
628 |
-
msgid "00:00 today"
|
629 |
-
msgstr "Heute 00:00"
|
630 |
-
|
631 |
-
#: admin/add.php:92
|
632 |
-
#: admin/add.php:110
|
633 |
-
msgid "Start of current week"
|
634 |
-
msgstr "Beginn der aktuellen Woche"
|
635 |
-
|
636 |
-
#: admin/add.php:93
|
637 |
-
#: admin/add.php:111
|
638 |
-
msgid "Start of current month"
|
639 |
-
msgstr "Beginn des aktuellen Monats"
|
640 |
-
|
641 |
-
#: admin/add.php:94
|
642 |
-
#: admin/add.php:112
|
643 |
-
msgid "End of current month"
|
644 |
-
msgstr "Ende des aktuellen Monats"
|
645 |
-
|
646 |
-
#: admin/add.php:95
|
647 |
-
msgid "The beginning of time"
|
648 |
-
msgstr "Der Anfang der Zeit"
|
649 |
-
|
650 |
-
#: admin/add.php:96
|
651 |
-
#: admin/add.php:114
|
652 |
-
msgid "Specific date / time"
|
653 |
-
msgstr "Bestimmtes Datum / Zeit"
|
654 |
-
|
655 |
-
#: admin/add.php:113
|
656 |
-
msgid "The end of time"
|
657 |
-
msgstr "Das Ende der Zeit"
|
658 |
-
|
659 |
-
#: admin/add.php:203
|
660 |
-
msgid "Use the event display builder to customize how event information will be displayed in the grid tooltips and in lists. Use HTML and the shortcodes (explained below) to display the information you require. A basic example display format is provided as a starting point. For more information, take a look at the"
|
661 |
-
msgstr "Verwende den Ereignisanzeige-Generator um die Art, wie die Information in den Kalender-Infoboxen und Listen dargestellt wird, zu personalisieren. Verwende HTML und Shortcodes (Erklärung weiter unten) um die benötigte Information anzuzeigen. Ein einfaches Beispiel wird als möglicher Anfang zur Verfügung gestellt. Für weitere Informationen, wende dich an das"
|
662 |
-
|
663 |
-
#: admin/add.php:204
|
664 |
-
#: admin/add.php:222
|
665 |
-
msgid "event display builder guide"
|
666 |
-
msgstr "Handbuch für den Ergebnisanzeige-Generator"
|
667 |
-
|
668 |
-
#: admin/add.php:221
|
669 |
-
msgid "(More information on all of the below shortcodes and attributes, and working examples, can be found in the"
|
670 |
-
msgstr "(Weitere Informationen über die Shortcodes und Attribute sowie Beispiele gibt es im"
|
671 |
-
|
672 |
-
#: admin/add.php:351
|
673 |
-
msgid "Show the description of events? (URLs in the description will be made into links)."
|
674 |
-
msgstr "Beschreibung der Ereignisse anzeigen? (Die URLs in der Beschreibung werden in Links umgewandelt.)"
|
675 |
-
|
676 |
-
#: admin/refresh.php:9
|
677 |
-
msgid "Refresh Feed Cache"
|
678 |
-
msgstr "Cache aktualisieren"
|
679 |
-
|
680 |
-
#: admin/refresh.php:17
|
681 |
-
msgid "The plugin will automatically refresh the cache when it expires, but you can manually clear the cache now by clicking the button below."
|
682 |
-
msgstr "Das Plugin wird den Cache automatisch aktualisieren, wenn er abläuft, aber du kannst dies jederzeit händisch durchführen, indem du auf den entsprechenden Button klickst."
|
683 |
-
|
684 |
-
#: admin/refresh.php:18
|
685 |
-
msgid "Are you want you want to clear the cache data for this feed?"
|
686 |
-
msgstr "Willst du wirklich die Cache-Daten für diesen Ereignisfeed löschen?"
|
687 |
-
|
688 |
-
#: admin/delete.php:9
|
689 |
-
#: google-calendar-events.php:276
|
690 |
-
msgid "Delete Feed"
|
691 |
-
msgstr "Feed löschen"
|
692 |
-
|
693 |
-
#: admin/delete.php:17
|
694 |
-
msgid "Are you want you want to delete this feed? (Remember to remove / adjust any widgets or shortcodes associated with this feed)."
|
695 |
-
msgstr "Willst du wirklich diesen Ereignisfeed löschen? (Vergiss nicht, Widgets und Shortcodes, die mit dem Ereignisfeed verknüpft sind zu aktualisieren, bzw. zu löschen.)"
|
696 |
-
|
697 |
-
#: admin/main.php:2
|
698 |
-
msgid "Add a New Feed"
|
699 |
-
msgstr "Ereignisfeed hinzufügen"
|
700 |
-
|
701 |
-
#: admin/main.php:4
|
702 |
-
msgid "Click here to add a new feed"
|
703 |
-
msgstr "Klicke hier, um einen Ereignisfeed hinzuzufügen"
|
704 |
-
|
705 |
-
#: admin/main.php:4
|
706 |
-
#: google-calendar-events.php:253
|
707 |
-
msgid "Add Feed"
|
708 |
-
msgstr "Ereignisfeed hinzufügen"
|
709 |
-
|
710 |
-
#: admin/main.php:7
|
711 |
-
msgid "Current Feeds"
|
712 |
-
msgstr "Derzeitige Ereignisfeeds"
|
713 |
-
|
714 |
-
#: admin/main.php:16
|
715 |
-
msgid "You haven't added any Google Calendar feeds yet."
|
716 |
-
msgstr "Du hast keine Google Kalender-Ereignisfeed hinzugefügt bis jetzt."
|
717 |
-
|
718 |
-
#: admin/main.php:24
|
719 |
-
#: admin/main.php:32
|
720 |
-
msgid "ID"
|
721 |
-
msgstr "ID"
|
722 |
-
|
723 |
-
#: admin/main.php:25
|
724 |
-
#: admin/main.php:33
|
725 |
-
msgid "Title"
|
726 |
-
msgstr "Titel"
|
727 |
-
|
728 |
-
#: admin/main.php:26
|
729 |
-
#: admin/main.php:34
|
730 |
-
msgid "URL"
|
731 |
-
msgstr "URL"
|
732 |
-
|
733 |
-
#: admin/main.php:47
|
734 |
-
msgid "Refresh"
|
735 |
-
msgstr "Aktualisieren"
|
736 |
-
|
737 |
-
#: admin/main.php:47
|
738 |
-
msgid "Edit"
|
739 |
-
msgstr "Bearbeiten"
|
740 |
-
|
741 |
-
#: admin/main.php:47
|
742 |
-
msgid "Delete"
|
743 |
-
msgstr "Löschen"
|
744 |
-
|
745 |
-
#: admin/main.php:61
|
746 |
-
msgid "General Options"
|
747 |
-
msgstr "Allgemeine Einstellungen"
|
748 |
-
|
749 |
-
#: admin/main.php:65
|
750 |
-
msgid "Custom stylesheet URL"
|
751 |
-
msgstr "Eigene Stylesheet-URL"
|
752 |
-
|
753 |
-
#: admin/main.php:67
|
754 |
-
msgid "If you want to alter the default plugin styling, create a new stylesheet on your server (not in the <code>google-calendar-events</code> directory) and then enter its URL below."
|
755 |
-
msgstr "If you want to alter the default plugin styling, create a new stylesheet on your server (not in the <code>google-calendar-events</code> directory) and then enter its URL below."
|
756 |
-
|
757 |
-
#: admin/main.php:72
|
758 |
-
msgid "Add JavaScript to footer?"
|
759 |
-
msgstr "JavaScript zum Footer hinzufügen?"
|
760 |
-
|
761 |
-
#: admin/main.php:74
|
762 |
-
msgid "If you are having issues with tooltips not appearing or the AJAX functionality not working, try ticking the checkbox below."
|
763 |
-
msgstr "Wenn du Probleme mit den Infoboxen hast oder AJAX nicht funktioniert, versuche, die Checkbox zu aktivieren."
|
764 |
-
|
765 |
-
#: admin/main.php:79
|
766 |
-
msgid "Loading text"
|
767 |
-
msgstr "Ladetext"
|
768 |
-
|
769 |
-
#: admin/main.php:81
|
770 |
-
msgid "Text to display while calendar data is loading (on AJAX requests)."
|
771 |
-
msgstr "Text, der anzuzeigen ist, während der Kalender geladen wird (bei AJAX-Anfragen)."
|
772 |
-
|
773 |
-
#: admin/main.php:86
|
774 |
-
msgid "Error message"
|
775 |
-
msgstr "Fehlermeldung"
|
776 |
-
|
777 |
-
#: admin/main.php:88
|
778 |
-
msgid "An error message to display to non-admin users if events cannot be displayed for any reason (admins will see a message indicating the cause of the problem)."
|
779 |
-
msgstr "Eine Fehlermeldung, die Nicht-Administratoren gezeigt wird, wenn Ereignisse nicht angezeigt werden können. (Administratoren sehen eine genauere Meldung, die auch den Ursprung des Fehlers beinhaltet.)"
|
780 |
-
|
781 |
-
#: admin/main.php:93
|
782 |
-
msgid "Optimise event retrieval?"
|
783 |
-
msgstr "Abrufen der Ereignisse optimieren?"
|
784 |
-
|
785 |
-
#: admin/main.php:95
|
786 |
-
msgid "If this option is enabled, the plugin will use an experimental feature of the Google Data API, which can improve performance significantly, especially with large numbers of events. Google could potentially remove / change this feature at any time."
|
787 |
-
msgstr "Wenn diese Option aktiviert ist, wird das Plugin eine experimentelle Funktion der Google Daten-API verwenden, die die Performance (vor allem bei einer großen Anzahl von Ereignissen) deutlich verbessern sollte. Google kann diese Funktion theoretisch zu jeder Zeit löschen oder verändern."
|
788 |
-
|
789 |
-
#: admin/main.php:100
|
790 |
-
msgid "Use old styles?"
|
791 |
-
msgstr "Alte Style-Definitionen verwenden?"
|
792 |
-
|
793 |
-
#: admin/main.php:102
|
794 |
-
msgid "Some CSS changes were made in version 0.7. If this option is enabled, the old CSS will still be added along with the main stylesheet. You should consider updating your stylesheet so that you don't need this enabled."
|
795 |
-
msgstr "In Version 0.7 wurden einige Änderungen an den Stylesheets durchgeführt. Wenn diese Option aktiviert ist, wird das alte CSS weiterhin angefügt. Du solltest dich daran machen, deine Stylesheets zu aktualisieren, damit diese Option nicht mehr notwendig ist."
|
796 |
-
|
797 |
-
#: admin/main.php:111
|
798 |
-
msgid "Save"
|
799 |
-
msgstr "Speichern"
|
800 |
-
|
801 |
-
#. #-#-#-#-# plugin.pot (Google Calendar Events 0.7.1) #-#-#-#-#
|
802 |
-
#. Plugin Name of the plugin/theme
|
803 |
-
#: widget/gce-widget.php:6
|
804 |
-
#: google-calendar-events.php:231
|
805 |
-
msgid "Google Calendar Events"
|
806 |
-
msgstr "Google Calendar Events"
|
807 |
-
|
808 |
-
#: widget/gce-widget.php:7
|
809 |
-
msgid "Display a list or calendar grid of events from one or more Google Calendar feeds you have added"
|
810 |
-
msgstr "Eine Liste oder einen Kalender mit Ereignissen von einem oder mehreren Google Kalendern anzeigen"
|
811 |
-
|
812 |
-
#: widget/gce-widget.php:57
|
813 |
-
msgid "No valid Feed IDs have been entered for this widget. Please check that you have entered the IDs correctly in the widget settings (Appearance > Widgets), and that the Feeds have not been deleted."
|
814 |
-
msgstr "Es wurden keine gültigen Ereignisfeed-IDs für das Widget angegeben. Bitte überprüfe, ob du die IDs richtig in den Widget-Einstellungen (Darstellung > Widgets) angegeben hast und der Ereignisfeed auch nicht gelöscht wurde."
|
815 |
-
|
816 |
-
#: widget/gce-widget.php:100
|
817 |
-
#: google-calendar-events.php:566
|
818 |
-
msgid "No feeds have been added yet. You can add a feed in the Google Calendar Events settings."
|
819 |
-
msgstr "Es wurden keine Ereignisfeeds hinzugefügt. Du kannst einen Ereignisfeed bei den Einstellungen hinzufügen."
|
820 |
-
|
821 |
-
#: widget/gce-widget.php:129
|
822 |
-
msgid "No feeds have been added yet. You can add feeds in the Google Calendar Events settings."
|
823 |
-
msgstr "Es wurden keine Ereignisfeeds hinzugefügt. Du kannst einen Ereignisfeed bei den Einstellungen hinzufügen."
|
824 |
-
|
825 |
-
#: widget/gce-widget.php:145
|
826 |
-
msgid "Feeds to display, as a comma separated list (e.g. 1, 2, 4). Leave blank to display all feeds:"
|
827 |
-
msgstr "Ereignisfeeds, die angezeigt werden solle, als durch Komma getrennte Liste (z.b. 1, 2, 4). Leer lassen, um alle Ereignisfeeds anzuzeigen."
|
828 |
-
|
829 |
-
#: widget/gce-widget.php:149
|
830 |
-
msgid "Display events as:"
|
831 |
-
msgstr "Ereignisse anzeigen als:"
|
832 |
-
|
833 |
-
#: widget/gce-widget.php:151
|
834 |
-
msgid "Calendar Grid"
|
835 |
-
msgstr "Kalendar"
|
836 |
-
|
837 |
-
#: widget/gce-widget.php:152
|
838 |
-
msgid "Calendar Grid - with AJAX"
|
839 |
-
msgstr "Kalendar, mit AJAX"
|
840 |
-
|
841 |
-
#: widget/gce-widget.php:153
|
842 |
-
msgid "List"
|
843 |
-
msgstr "Liste"
|
844 |
-
|
845 |
-
#: widget/gce-widget.php:154
|
846 |
-
msgid "List - grouped by date"
|
847 |
-
msgstr "Liste, nach Datum gruppiert"
|
848 |
-
|
849 |
-
#: widget/gce-widget.php:157
|
850 |
-
msgid "Maximum no. events to display. Enter 0 to show all retrieved."
|
851 |
-
msgstr "Maximale Anzahl der anzuzeigenden Ereignisse. 0 eingeben, um alle empfangenen Ereignisse anzuzeigen."
|
852 |
-
|
853 |
-
#: widget/gce-widget.php:160
|
854 |
-
msgid "Sort order (only applies to lists):"
|
855 |
-
msgstr "Sortierreihenfolge (gilt nur für Listen):"
|
856 |
-
|
857 |
-
#: widget/gce-widget.php:162
|
858 |
-
msgid "Ascending"
|
859 |
-
msgstr "Aufsteigend"
|
860 |
-
|
861 |
-
#: widget/gce-widget.php:163
|
862 |
-
msgid "Descending"
|
863 |
-
msgstr "Absteigend"
|
864 |
-
|
865 |
-
#: widget/gce-widget.php:166
|
866 |
-
msgid "Display title on tooltip / list item? (e.g. 'Events on 7th March') Grouped lists always have a title displayed."
|
867 |
-
msgstr "Titel bei jedem Punkt anzeigen? (z.B. \"Ereignisse am 7. März\") Gruppierte Listen werden immer mit Titel angezeigt."
|
868 |
-
|
869 |
-
#: inc/gce-feed.php:96
|
870 |
-
msgid "Some data was retrieved, but could not be parsed successfully. Please ensure your feed URL is correct."
|
871 |
-
msgstr "Einige Daten konnten empfangen, aber nicht erfolgreich verarbeitet werden. Bitte stelle sicher, dass die URL des Ereignisfeeds richtig ist."
|
872 |
-
|
873 |
-
#: inc/gce-feed.php:102
|
874 |
-
msgid "The feed could not be found (404). Please ensure your feed URL is correct."
|
875 |
-
msgstr "Der Ereignisfeed konnte nicht gefunden werden (404). Bitte stelle sicher, dass die URL richtig ist."
|
876 |
-
|
877 |
-
#: inc/gce-feed.php:105
|
878 |
-
msgid "Access to this feed was denied (403). Please ensure you have public sharing enabled for your calendar."
|
879 |
-
msgstr "Der Zugriff auf diesen Ereignisfeed wurde verweigert (403). Bitte stelle sicher, dass du den Kalender öffentlich freigegeben hast."
|
880 |
-
|
881 |
-
#: inc/gce-feed.php:108
|
882 |
-
msgid "The feed data could not be retrieved. Error code: %s. Please ensure your feed URL is correct."
|
883 |
-
msgstr "Es konnten keine Daten vom Ereignisfeed empfangen werden. Fehlercode: %s. Bitte stelle sicher, dass die URL des Ereignisfeeds richtig ist."
|
884 |
-
|
885 |
-
#: inc/gce-event.php:484
|
886 |
-
msgid "%s year"
|
887 |
-
msgstr "%s Jahr"
|
888 |
-
|
889 |
-
#: inc/gce-event.php:484
|
890 |
-
msgid "%s years"
|
891 |
-
msgstr "%s Jahre"
|
892 |
-
|
893 |
-
#: inc/gce-event.php:485
|
894 |
-
msgid "%s month"
|
895 |
-
msgstr "%s Monat"
|
896 |
-
|
897 |
-
#: inc/gce-event.php:485
|
898 |
-
msgid "%s months"
|
899 |
-
msgstr "%s Monate"
|
900 |
-
|
901 |
-
#: inc/gce-event.php:486
|
902 |
-
msgid "%s week"
|
903 |
-
msgstr "%s Woche"
|
904 |
-
|
905 |
-
#: inc/gce-event.php:486
|
906 |
-
msgid "%s weeks"
|
907 |
-
msgstr "%s Wochen"
|
908 |
-
|
909 |
-
#: inc/gce-event.php:487
|
910 |
-
msgid "%s day"
|
911 |
-
msgstr "%s Tag"
|
912 |
-
|
913 |
-
#: inc/gce-event.php:487
|
914 |
-
msgid "%s days"
|
915 |
-
msgstr "%s Tage"
|
916 |
-
|
917 |
-
#: inc/gce-event.php:488
|
918 |
-
msgid "%s hour"
|
919 |
-
msgstr "%s Stunde"
|
920 |
-
|
921 |
-
#: inc/gce-event.php:488
|
922 |
-
msgid "%s hours"
|
923 |
-
msgstr "%s Stunden"
|
924 |
-
|
925 |
-
#: inc/gce-event.php:489
|
926 |
-
msgid "%s min"
|
927 |
-
msgstr "%s Minute"
|
928 |
-
|
929 |
-
#: inc/gce-event.php:489
|
930 |
-
msgid "%s mins"
|
931 |
-
msgstr "%s Minuten"
|
932 |
-
|
933 |
-
#: inc/gce-event.php:517
|
934 |
-
msgctxt "human_time_diff"
|
935 |
-
msgid ", "
|
936 |
-
msgstr ","
|
937 |
-
|
938 |
-
#: inc/gce-parser.php:156
|
939 |
-
msgid "1 or more of your feeds could not be displayed. The following errors occurred:"
|
940 |
-
msgstr "1 oder mehrere Ereignisfeeds konnten nicht angezeigt werden. Folgende Fehler traten auf:"
|
941 |
-
|
942 |
-
#: inc/gce-parser.php:159
|
943 |
-
msgid "Feed %s:"
|
944 |
-
msgstr "Ereignisfeed %s:"
|
945 |
-
|
946 |
-
#: inc/gce-parser.php:315
|
947 |
-
msgid "There are currently no events to display."
|
948 |
-
msgstr "Derzeit gibt es keine Ereignisse, die angezeigt werden können."
|
949 |
-
|
950 |
-
#: google-calendar-events.php:204
|
951 |
-
msgid "Settings"
|
952 |
-
msgstr "Einstellungen"
|
953 |
-
|
954 |
-
#: google-calendar-events.php:235
|
955 |
-
msgid "Notice:"
|
956 |
-
msgstr "Hinweis:"
|
957 |
-
|
958 |
-
#: google-calendar-events.php:235
|
959 |
-
msgid "The way in which Google Calendar Events stores cached data has been much improved in version 0.6. As you have upgraded from a previous version of the plugin, there is likely to be some data from the old caching system hanging around in your database that is now useless. Click below to clear expired cached data from your database."
|
960 |
-
msgstr "Die Art, wie Google Calendar Events Cache-Daten speichert, hat sich in Version 0.6 deutlich verbessert. Nachdem du von einer früheren Version dieses Plugins geupdated hast, befinden sich mit großer Wahrscheinlichkeit einige Daten des alten Cache-Systems in der Datenbank, die jetzt nicht mehr benötigt werden. Klicke daher unten auf \"Veraltete Cache-Daten löschen\", um diese aus der Datenbank zu entfernen."
|
961 |
-
|
962 |
-
#: google-calendar-events.php:236
|
963 |
-
msgid "Clear expired cached data"
|
964 |
-
msgstr "Veraltete Cache-Daten löschen"
|
965 |
-
|
966 |
-
#: google-calendar-events.php:237
|
967 |
-
msgid "or"
|
968 |
-
msgstr "oder"
|
969 |
-
|
970 |
-
#: google-calendar-events.php:238
|
971 |
-
msgid "Ignore this notice"
|
972 |
-
msgstr "Diese Notiz ignorieren"
|
973 |
-
|
974 |
-
#: google-calendar-events.php:254
|
975 |
-
#: google-calendar-events.php:260
|
976 |
-
#: google-calendar-events.php:270
|
977 |
-
#: google-calendar-events.php:277
|
978 |
-
msgid "Cancel"
|
979 |
-
msgstr "Abbrechen"
|
980 |
-
|
981 |
-
#: google-calendar-events.php:259
|
982 |
-
msgid "Refresh Feed"
|
983 |
-
msgstr "Ereignisfeed aktualisieren"
|
984 |
-
|
985 |
-
#: google-calendar-events.php:269
|
986 |
-
msgid "Save Changes"
|
987 |
-
msgstr "Änderungen speichern"
|
988 |
-
|
989 |
-
#: google-calendar-events.php:310
|
990 |
-
msgid "Old cached data cleared."
|
991 |
-
msgstr "Alte Cache-Daten gelöscht."
|
992 |
-
|
993 |
-
#: google-calendar-events.php:487
|
994 |
-
msgid "General options updated."
|
995 |
-
msgstr "Allgemeine Einstellungen aktualisiert."
|
996 |
-
|
997 |
-
#: google-calendar-events.php:546
|
998 |
-
msgid "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."
|
999 |
-
msgstr "Für diesen Code wurden keine gültigen Ereignisfeed-IDs angegeben. Bitte überprüfe, ob die IDs richtig sind und die Ereignisfeeds auch nicht gelöscht wurden."
|
1000 |
-
|
1001 |
-
#. Plugin URI of the plugin/theme
|
1002 |
-
msgid "http://www.rhanney.co.uk/plugins/google-calendar-events"
|
1003 |
-
msgstr "http://www.rhanney.co.uk/plugins/google-calendar-events"
|
1004 |
-
|
1005 |
-
#. Description of the plugin/theme
|
1006 |
-
msgid "Parses Google Calendar feeds and displays the events as a calendar grid or list on a page, post or widget."
|
1007 |
-
msgstr "Verarbeitet Google Calendar Feeds und zeigt die Ereignisse als Kalender oder Liste auf einer Seite, in einem Beitrag oder als Widget an."
|
1008 |
-
|
1009 |
-
#. Author of the plugin/theme
|
1010 |
-
msgid "Ross Hanney"
|
1011 |
-
msgstr "Ross Hanney"
|
1012 |
-
|
1013 |
-
#. Author URI of the plugin/theme
|
1014 |
-
msgid "http://www.rhanney.co.uk"
|
1015 |
-
msgstr "http://www.rhanney.co.uk"
|
1016 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/google-calendar-events-hu_HU.mo
DELETED
Binary file
|
languages/google-calendar-events-hu_HU.po
DELETED
@@ -1,500 +0,0 @@
|
|
1 |
-
# Translation of the WordPress plugin Google Calendar Events 0.4 by Ross Hanney.
|
2 |
-
# Copyright (C) 2010 Ross Hanney
|
3 |
-
# This file is distributed under the same license as the Google Calendar Events package.
|
4 |
-
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
5 |
-
#
|
6 |
-
msgid ""
|
7 |
-
msgstr ""
|
8 |
-
"Project-Id-Version: Google Calendar Events 0.4\n"
|
9 |
-
"Report-Msgid-Bugs-To: http://wordpress.org/tag/google-calendar-events\n"
|
10 |
-
"POT-Creation-Date: 2010-08-19 10:31+0000\n"
|
11 |
-
"PO-Revision-Date: 2010-08-31 09:01+0100\n"
|
12 |
-
"Last-Translator: Takács Dániel <daniel.takacs@gmail.com>\n"
|
13 |
-
"Language-Team: Hungarian <daniel.takacs@gmail.com>\n"
|
14 |
-
"MIME-Version: 1.0\n"
|
15 |
-
"Content-Type: text/plain; charset=utf-8\n"
|
16 |
-
"Content-Transfer-Encoding: 8bit\n"
|
17 |
-
"X-Poedit-Language: Hungarian\n"
|
18 |
-
"X-Poedit-Country: Hungary\n"
|
19 |
-
|
20 |
-
#: admin/add.php:9
|
21 |
-
msgid "Add a Feed"
|
22 |
-
msgstr "Csatorna hozzáadása"
|
23 |
-
|
24 |
-
#: admin/add.php:11
|
25 |
-
#: admin/delete.php:11
|
26 |
-
#: admin/edit.php:11
|
27 |
-
msgid "Feed ID"
|
28 |
-
msgstr "Csatorna azonosítója"
|
29 |
-
|
30 |
-
#: admin/add.php:12
|
31 |
-
#: admin/delete.php:12
|
32 |
-
#: admin/edit.php:12
|
33 |
-
msgid "Feed Title"
|
34 |
-
msgstr "Csatorna címe"
|
35 |
-
|
36 |
-
#: admin/add.php:13
|
37 |
-
#: admin/edit.php:13
|
38 |
-
msgid "Feed URL"
|
39 |
-
msgstr "Csatorna URL"
|
40 |
-
|
41 |
-
#: admin/add.php:14
|
42 |
-
#: admin/edit.php:14
|
43 |
-
msgid "Retrieve past events for current month?"
|
44 |
-
msgstr "A jelenlegi hónapban történt, de már eltelt eseményeket is lekérdezzem?"
|
45 |
-
|
46 |
-
#: admin/add.php:15
|
47 |
-
#: admin/edit.php:15
|
48 |
-
msgid "Maximum number of events to retrieve"
|
49 |
-
msgstr "A lekérdezendő események maximális száma"
|
50 |
-
|
51 |
-
#: admin/add.php:16
|
52 |
-
#: admin/edit.php:16
|
53 |
-
msgid "Number of days in the future to retrieve events for"
|
54 |
-
msgstr "A lekérdezendő következő napok száma"
|
55 |
-
|
56 |
-
#: admin/add.php:17
|
57 |
-
#: admin/edit.php:17
|
58 |
-
msgid "Date format"
|
59 |
-
msgstr "Dátum formátuma"
|
60 |
-
|
61 |
-
#: admin/add.php:18
|
62 |
-
#: admin/edit.php:18
|
63 |
-
msgid "Time format"
|
64 |
-
msgstr "Idő formátuma"
|
65 |
-
|
66 |
-
#: admin/add.php:19
|
67 |
-
#: admin/edit.php:19
|
68 |
-
msgid "Timezone adjustment"
|
69 |
-
msgstr "Időzóna beállítása"
|
70 |
-
|
71 |
-
#: admin/add.php:20
|
72 |
-
#: admin/edit.php:20
|
73 |
-
msgid "Cache duration"
|
74 |
-
msgstr "Tároló frissítése"
|
75 |
-
|
76 |
-
#: admin/add.php:21
|
77 |
-
#: admin/edit.php:21
|
78 |
-
msgid "Show multiple day events on each day?"
|
79 |
-
msgstr "A több napos események minden nap külön látszódjanak?"
|
80 |
-
|
81 |
-
#: admin/add.php:23
|
82 |
-
#: admin/edit.php:23
|
83 |
-
msgid "Display Options"
|
84 |
-
msgstr "Megjelenítési beállítások"
|
85 |
-
|
86 |
-
#: admin/add.php:24
|
87 |
-
#: admin/edit.php:24
|
88 |
-
msgid "Display start time / date?"
|
89 |
-
msgstr "Látszódjon a kezdő idő / dátum?"
|
90 |
-
|
91 |
-
#: admin/add.php:25
|
92 |
-
#: admin/edit.php:25
|
93 |
-
msgid "Display end time / date?"
|
94 |
-
msgstr "Látszódjon a befejező idő / dátum?"
|
95 |
-
|
96 |
-
#: admin/add.php:26
|
97 |
-
#: admin/edit.php:26
|
98 |
-
msgid "Separator text / characters"
|
99 |
-
msgstr "Elválasztó szöveg / karakterek"
|
100 |
-
|
101 |
-
#: admin/add.php:27
|
102 |
-
#: admin/edit.php:27
|
103 |
-
msgid "Display location?"
|
104 |
-
msgstr "Látszódjon a hely?"
|
105 |
-
|
106 |
-
#: admin/add.php:28
|
107 |
-
#: admin/edit.php:28
|
108 |
-
msgid "Display description?"
|
109 |
-
msgstr "Látszódjon a leírás?"
|
110 |
-
|
111 |
-
#: admin/add.php:29
|
112 |
-
#: admin/edit.php:29
|
113 |
-
msgid "Display link to event?"
|
114 |
-
msgstr "Látszódjon az eseményre mutató linK:"
|
115 |
-
|
116 |
-
#: admin/add.php:34
|
117 |
-
msgid "Enter the feed details below, then click the Add Feed button."
|
118 |
-
msgstr "Addja meg a csatorna részleteit, majd nyomja meg a Csatorna hozzáadása gombot."
|
119 |
-
|
120 |
-
#: admin/add.php:58
|
121 |
-
#: admin/edit.php:53
|
122 |
-
msgid "Anything you like. 'Upcoming Club Events', for example."
|
123 |
-
msgstr "Ami tetszik, pl. \"A következő Klub programok.\""
|
124 |
-
|
125 |
-
#: admin/add.php:67
|
126 |
-
#: admin/edit.php:64
|
127 |
-
msgid "This will probably be something like: <code>http://www.google.com/calendar/feeds/your-email@gmail.com/public/full</code>."
|
128 |
-
msgstr "Ez valahogy így fog kinézni: <code>http://www.google.com/calendar/feeds/your-email@gmail.com/public/full</code>."
|
129 |
-
|
130 |
-
#: admin/add.php:76
|
131 |
-
#: admin/edit.php:75
|
132 |
-
msgid "If checked, events will be retrieved from the first of this month onwards. If unchecked, events will be retrieved from today onwards."
|
133 |
-
msgstr "Ha be van jelölve, akkor a jelenlegi hónap első napjától lesznek listázva az események, ha nem, akkor csak az adott naptól."
|
134 |
-
|
135 |
-
#: admin/add.php:85
|
136 |
-
#: admin/edit.php:86
|
137 |
-
msgid "The default number of events to retrieve from a Google Calendar feed is 25, but you may want less for a list, or more for a calendar grid."
|
138 |
-
msgstr "A Google Naptár csatornájának alapértelmezett beállítása 25 esemény lekérdezése egyszerre, de ennél lehet többet és kevesebbet is beállítani."
|
139 |
-
|
140 |
-
#: admin/add.php:94
|
141 |
-
#: admin/edit.php:97
|
142 |
-
msgid "The number of days in the future to retrieve events for (from 12:00am today). Leave blank for no day limit."
|
143 |
-
msgstr "Ahány napot lekérdezzen a jövőben (ma déli 12 órától kezdve). Hagyja üresen, ha nem akar limitet beállítani."
|
144 |
-
|
145 |
-
#: admin/add.php:103
|
146 |
-
#: admin/edit.php:108
|
147 |
-
msgid "In <a href=\"http://php.net/manual/en/function.date.php\">PHP date format</a>. Leave this blank if you'd rather stick with the default format for your blog."
|
148 |
-
msgstr "<a href=\"http://php.net/manual/en/function.date.php\">PHP dátum formátum</a>. Hagyja üresen, ha a honlap alapértelmezését szeretné meghagyni."
|
149 |
-
|
150 |
-
#: admin/add.php:112
|
151 |
-
#: admin/edit.php:119
|
152 |
-
msgid "In <a href=\"http://php.net/manual/en/function.date.php\">PHP date format</a>. Again, leave this blank to stick with the default."
|
153 |
-
msgstr "<a href=\"http://php.net/manual/en/function.date.php\">PHP dátum formátum</a>. Hagyja üresen ezt is, ha a honlap alapértelmezését szeretné meghagyni."
|
154 |
-
|
155 |
-
#: admin/add.php:125
|
156 |
-
#: admin/edit.php:134
|
157 |
-
msgid "If you are having problems with dates and times displaying in the wrong timezone, select a city in your required timezone here."
|
158 |
-
msgstr "Ha valami probléma adódik a dátumokkal és az idővel, itt tudja kiválasztani az időzónájának megfelelő várost."
|
159 |
-
|
160 |
-
#: admin/add.php:134
|
161 |
-
#: admin/edit.php:145
|
162 |
-
msgid "The length of time, in seconds, to cache the feed (43200 = 12 hours). If this feed changes regularly, you may want to reduce the cache duration."
|
163 |
-
msgstr "A tároló lejáratának ideje, másodpercben (43200 másodperc = 1 óra). Ha a csatorna rendszeresen frissül, érdemes kisebb időközre állítani."
|
164 |
-
|
165 |
-
#: admin/add.php:143
|
166 |
-
#: admin/edit.php:156
|
167 |
-
msgid "Show events that span multiple days on each day that they span (There are some limitations of this feature to be aware of)."
|
168 |
-
msgstr "A több napon keresztül tartó események az időtartamuk alatt minden egyes nap külön jelenjenek meg. (Néhány korlátozást figyelembe kell venni ennél a lehetőségnél.)"
|
169 |
-
|
170 |
-
#: admin/add.php:154
|
171 |
-
#: admin/edit.php:167
|
172 |
-
msgid "These settings control what information will be displayed for this feed in the tooltip (for grids), or in a list."
|
173 |
-
msgstr "Ezek a beállítások adják meg azt, hogy milyen információk jelenjenek meg a csatornáról a tippek közt (a naptárdobozban) vagy egy listában."
|
174 |
-
|
175 |
-
#: admin/add.php:155
|
176 |
-
#: admin/edit.php:168
|
177 |
-
msgid "You can use some HTML in the text fields, but ensure it is valid or things might go wonky. Text fields can be empty too."
|
178 |
-
msgstr "Használhat HTML-t is a szövegmezőkben, de mindig győződjön meg, hogy szabványos kódot adott meg, különben könnyen összekuszálódhatnak a dolgok. A szövegmezők üresen is maradhatnak."
|
179 |
-
|
180 |
-
#: admin/add.php:161
|
181 |
-
#: admin/edit.php:176
|
182 |
-
msgid "Select how to display the start date / time."
|
183 |
-
msgstr "Válassza ki, hogyan jelenjen meg a kezdő idő / dátum."
|
184 |
-
|
185 |
-
#: admin/add.php:164
|
186 |
-
#: admin/edit.php:179
|
187 |
-
msgid "Don't display start time or date"
|
188 |
-
msgstr "Ne mutassa a kezdő időt vagy dátumot"
|
189 |
-
|
190 |
-
#: admin/add.php:165
|
191 |
-
#: admin/edit.php:180
|
192 |
-
msgid "Display start time"
|
193 |
-
msgstr "Mutassa a kezdő időt"
|
194 |
-
|
195 |
-
#: admin/add.php:166
|
196 |
-
#: admin/edit.php:181
|
197 |
-
msgid "Display start date"
|
198 |
-
msgstr "Mutassa a kezdő dátumot"
|
199 |
-
|
200 |
-
#: admin/add.php:167
|
201 |
-
#: admin/edit.php:182
|
202 |
-
msgid "Display start time and date (in that order)"
|
203 |
-
msgstr "Mutassa a kezdő időt és dátumot (ebben a sorrendben)"
|
204 |
-
|
205 |
-
#: admin/add.php:168
|
206 |
-
#: admin/edit.php:183
|
207 |
-
msgid "Display start date and time (in that order)"
|
208 |
-
msgstr "Mutassa a kezdő dátumot és időt (ebben a sorrendben)"
|
209 |
-
|
210 |
-
#: admin/add.php:171
|
211 |
-
#: admin/edit.php:186
|
212 |
-
msgid "Text to display before the start time."
|
213 |
-
msgstr "A kezdő idő előtt megjelenítendő szöveg."
|
214 |
-
|
215 |
-
#: admin/add.php:179
|
216 |
-
#: admin/edit.php:196
|
217 |
-
msgid "Select how to display the end date / time."
|
218 |
-
msgstr "Válassza ki, hogyan jelenjen meg a befejező idő / dátum."
|
219 |
-
|
220 |
-
#: admin/add.php:182
|
221 |
-
#: admin/edit.php:199
|
222 |
-
msgid "Don't display end time or date"
|
223 |
-
msgstr "Ne mutassa a befejező időt vagy dátumot"
|
224 |
-
|
225 |
-
#: admin/add.php:183
|
226 |
-
#: admin/edit.php:200
|
227 |
-
msgid "Display end time"
|
228 |
-
msgstr "Mutassa a befejező időt"
|
229 |
-
|
230 |
-
#: admin/add.php:184
|
231 |
-
#: admin/edit.php:201
|
232 |
-
msgid "Display end date"
|
233 |
-
msgstr "Mutassa a befejező dátumot"
|
234 |
-
|
235 |
-
#: admin/add.php:185
|
236 |
-
#: admin/edit.php:202
|
237 |
-
msgid "Display end time and date (in that order)"
|
238 |
-
msgstr "Mutassa a befejező időt és dátumot (ebben a sorrendben)"
|
239 |
-
|
240 |
-
#: admin/add.php:186
|
241 |
-
#: admin/edit.php:203
|
242 |
-
msgid "Display end date and time (in that order)"
|
243 |
-
msgstr "Mutassa a befejező dátumot és időt (ebben a sorrendben)"
|
244 |
-
|
245 |
-
#: admin/add.php:189
|
246 |
-
#: admin/edit.php:206
|
247 |
-
msgid "Text to display before the end time."
|
248 |
-
msgstr "A befejező idő előtt megjelenítendő szöveg."
|
249 |
-
|
250 |
-
#: admin/add.php:197
|
251 |
-
#: admin/edit.php:216
|
252 |
-
msgid "If you have chosen to display both the time and date above, enter the text / characters to display between the time and date here (including any spaces)."
|
253 |
-
msgstr "Ha azt választotta feljebb, hogy mind az idő, mind a dátum látszódjék, írja be az elválasztó szöveget / karaktereket, ami az idő és a dátum közt legyen (akármennyi szóközzel)."
|
254 |
-
|
255 |
-
#: admin/add.php:206
|
256 |
-
#: admin/edit.php:227
|
257 |
-
msgid "Show the location of events?"
|
258 |
-
msgstr "Látszódjon az esemény helye?"
|
259 |
-
|
260 |
-
#: admin/add.php:208
|
261 |
-
#: admin/edit.php:229
|
262 |
-
msgid "Text to display before the location."
|
263 |
-
msgstr "A hely előtt megjelenítendő szöveg."
|
264 |
-
|
265 |
-
#: admin/add.php:217
|
266 |
-
msgid "Show the description of events? (URLs in the description will be made into links)."
|
267 |
-
msgstr "Látszódjon az esemény leírása? (A leírásban lévő URL-ek linkként jelennek meg)."
|
268 |
-
|
269 |
-
#: admin/add.php:219
|
270 |
-
#: admin/edit.php:242
|
271 |
-
msgid "Text to display before the description."
|
272 |
-
msgstr "A leírás előtt megjelenítendő szöveg."
|
273 |
-
|
274 |
-
#: admin/add.php:223
|
275 |
-
#: admin/edit.php:246
|
276 |
-
msgid "Maximum number of words to show from description. Leave blank for no limit."
|
277 |
-
msgstr "A leírásból megjelenítendő szavak maximális száma. Hagyja üresen, ha nem akar limitet beállítani."
|
278 |
-
|
279 |
-
#: admin/add.php:232
|
280 |
-
#: admin/edit.php:257
|
281 |
-
msgid "Show a link to the Google Calendar page for an event?"
|
282 |
-
msgstr "Mutasson link a Google Naptárra az eseményeknél?"
|
283 |
-
|
284 |
-
#: admin/add.php:235
|
285 |
-
#: admin/edit.php:260
|
286 |
-
msgid "Links open in a new window / tab?"
|
287 |
-
msgstr "A link új ablakon / fülön nyíljon?"
|
288 |
-
|
289 |
-
#: admin/add.php:237
|
290 |
-
#: admin/edit.php:262
|
291 |
-
msgid "The link text to be displayed."
|
292 |
-
msgstr "A megjelenítendő link szövege"
|
293 |
-
|
294 |
-
#: admin/delete.php:9
|
295 |
-
#: google-calendar-events.php:201
|
296 |
-
msgid "Delete Feed"
|
297 |
-
msgstr "Csatorna törlése"
|
298 |
-
|
299 |
-
#: admin/delete.php:17
|
300 |
-
msgid "Are you want you want to delete this feed? (Remember to remove / adjust any widgets or shortcodes associated with this feed)."
|
301 |
-
msgstr "Biztosan törölni akarja a csatornát? (Ne felejtse el eltávolítani vagy módosítani a csatornára hivatkozó összes dobozt vagy kódrészletet)."
|
302 |
-
|
303 |
-
#: admin/edit.php:9
|
304 |
-
msgid "Edit Feed"
|
305 |
-
msgstr "Csatorna szerkesztése"
|
306 |
-
|
307 |
-
#: admin/edit.php:34
|
308 |
-
msgid "Make any changes you require to the feed details below, then click the Save Changes button."
|
309 |
-
msgstr "Végezze el a szükséges módosításokat alább, majd nyomja meg a Változtatások mentése gombot."
|
310 |
-
|
311 |
-
#: admin/edit.php:240
|
312 |
-
msgid "Show the description of events? (URLs in the description will be made into links)."
|
313 |
-
msgstr "Látszódjon az esemény leírása? (A leírásban lévő URL-ek linkként jelennek meg)."
|
314 |
-
|
315 |
-
#: admin/main.php:2
|
316 |
-
msgid "Add a New Feed"
|
317 |
-
msgstr "Új csatorna hozzáadása"
|
318 |
-
|
319 |
-
#: admin/main.php:4
|
320 |
-
msgid "Click here to add a new feed"
|
321 |
-
msgstr "Kattintson ide új csatorna hozzáadásához"
|
322 |
-
|
323 |
-
#: admin/main.php:4
|
324 |
-
#: google-calendar-events.php:186
|
325 |
-
msgid "Add Feed"
|
326 |
-
msgstr "Csatorna hozzáadása"
|
327 |
-
|
328 |
-
#: admin/main.php:7
|
329 |
-
msgid "Current Feeds"
|
330 |
-
msgstr "Jelenlegi csatornák"
|
331 |
-
|
332 |
-
#: admin/main.php:16
|
333 |
-
msgid "You haven't added any Google Calendar feeds yet."
|
334 |
-
msgstr "Még nem adott hozzá egyetlen Google Naptár csatornát sem."
|
335 |
-
|
336 |
-
#: admin/main.php:24
|
337 |
-
#: admin/main.php:32
|
338 |
-
msgid "ID"
|
339 |
-
msgstr "Azonosító"
|
340 |
-
|
341 |
-
#: admin/main.php:25
|
342 |
-
#: admin/main.php:33
|
343 |
-
msgid "Title"
|
344 |
-
msgstr "Cím"
|
345 |
-
|
346 |
-
#: admin/main.php:26
|
347 |
-
#: admin/main.php:34
|
348 |
-
msgid "URL"
|
349 |
-
msgstr "URL"
|
350 |
-
|
351 |
-
#: admin/main.php:47
|
352 |
-
msgid "Edit"
|
353 |
-
msgstr "Szerkeszt"
|
354 |
-
|
355 |
-
#: admin/main.php:47
|
356 |
-
msgid "Delete"
|
357 |
-
msgstr "Töröl"
|
358 |
-
|
359 |
-
#: admin/main.php:61
|
360 |
-
msgid "General Options"
|
361 |
-
msgstr "Beállítások"
|
362 |
-
|
363 |
-
#: admin/main.php:65
|
364 |
-
msgid "Custom stylesheet URL"
|
365 |
-
msgstr "Saját stíluslap elérési útvonala"
|
366 |
-
|
367 |
-
#: admin/main.php:67
|
368 |
-
msgid ""
|
369 |
-
"If you want to make changes to the default CSS, make a copy of <code>google-calendar-events/css/gce-style.css</code> on your server. Make any \r\n"
|
370 |
-
"\t\t\t\tchanges to the copy. Enter the URL to the copied file below."
|
371 |
-
msgstr ""
|
372 |
-
"Ha szeretné megváltoztatni az eredeti CSS-t, készítsen egy másolatot a <code>google-calendar-events/css/gce-style.css</code> fájlról a szerveren. \r\n"
|
373 |
-
"\t\t\t\tVégezze el a módosításokat, majd írja be a másolat URL-jét alább."
|
374 |
-
|
375 |
-
#: admin/main.php:73
|
376 |
-
msgid "Add JavaScript to footer?"
|
377 |
-
msgstr "Adhatok JavaScriptet a lábléchez?"
|
378 |
-
|
379 |
-
#: admin/main.php:75
|
380 |
-
msgid "If you are having issues with tooltips not appearing or the AJAX functionality not working, try ticking the checkbox below."
|
381 |
-
msgstr "Ha nem jelennek meg a tippek, vagy az AJAX-funkciók nem működnek, próbálkozzon az alábbi jelölőnégyzet kipipálásával."
|
382 |
-
|
383 |
-
#: admin/main.php:80
|
384 |
-
msgid "Loading text"
|
385 |
-
msgstr "Töltés közbeni szöveg"
|
386 |
-
|
387 |
-
#: admin/main.php:82
|
388 |
-
msgid "Text to display while calendar data is loading (on AJAX requests)"
|
389 |
-
msgstr "Az AJAX-kérések töltődése során megjelenő szöveg."
|
390 |
-
|
391 |
-
#: admin/main.php:91
|
392 |
-
msgid "Save"
|
393 |
-
msgstr "Mentés"
|
394 |
-
|
395 |
-
#: google-calendar-events.php:148
|
396 |
-
msgid "Settings"
|
397 |
-
msgstr "Beállítások"
|
398 |
-
|
399 |
-
#: google-calendar-events.php:163
|
400 |
-
msgid "New Feed Added Successfully."
|
401 |
-
msgstr "Az új csatorná sikeresen hozzáadta."
|
402 |
-
|
403 |
-
#: google-calendar-events.php:166
|
404 |
-
msgid "Feed Details Updated Successfully."
|
405 |
-
msgstr "A csatorna részletei sikeresen frissültek."
|
406 |
-
|
407 |
-
#: google-calendar-events.php:169
|
408 |
-
msgid "Feed Deleted Successfully."
|
409 |
-
msgstr "A csatorna sikeresen törlődött."
|
410 |
-
|
411 |
-
#. #-#-#-#-# plugin.pot (Google Calendar Events 0.3.1) #-#-#-#-#
|
412 |
-
#. Plugin Name of the plugin/theme
|
413 |
-
#: google-calendar-events.php:176
|
414 |
-
#: widget/gce-widget.php:6
|
415 |
-
msgid "Google Calendar Events"
|
416 |
-
msgstr "Google Naptár Események"
|
417 |
-
|
418 |
-
#: google-calendar-events.php:187
|
419 |
-
#: google-calendar-events.php:195
|
420 |
-
#: google-calendar-events.php:202
|
421 |
-
msgid "Cancel"
|
422 |
-
msgstr "Mégsem"
|
423 |
-
|
424 |
-
#: google-calendar-events.php:194
|
425 |
-
msgid "Save Changes"
|
426 |
-
msgstr "Változások mentése"
|
427 |
-
|
428 |
-
#: google-calendar-events.php:353
|
429 |
-
msgid "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."
|
430 |
-
msgstr "Nincs érvényes Csatornaazonosító megadva ehhez a kódrészlethez. Kérem, ellenőrizze, hogy az azonosítót helyesen adta-e meg, és hogy a csatornát nem törölte-e."
|
431 |
-
|
432 |
-
#: google-calendar-events.php:369
|
433 |
-
#: widget/gce-widget.php:76
|
434 |
-
msgid "No feeds have been added yet. You can add a feed in the Google Calendar Events settings."
|
435 |
-
msgstr "Még nem adott meg csatornát. Csatornát a Google Naptár Események beállításánál tud hozzáadni."
|
436 |
-
|
437 |
-
#: google-calendar-events.php:428
|
438 |
-
#: google-calendar-events.php:445
|
439 |
-
#: widget/gce-widget.php:146
|
440 |
-
#: widget/gce-widget.php:158
|
441 |
-
#, php-format
|
442 |
-
msgid "The following feeds were not parsed successfully: %s. Please check that the feed URLs are correct and that the feeds have public sharing enabled."
|
443 |
-
msgstr "A következő csatornákat nem lehetett feldolgozni: %s. Kérem, ellenőrizze, hogy a csatornák URL-je helyes-e, és hogy a csatornák nyilvánossá lettek-e téve."
|
444 |
-
|
445 |
-
#: inc/gce-parser.php:213
|
446 |
-
msgid "There are currently no upcoming events."
|
447 |
-
msgstr "Nincs esemény a közeljövőben."
|
448 |
-
|
449 |
-
#: widget/gce-widget.php:6
|
450 |
-
msgid "Display a list or calendar grid of events from one or more Google Calendar feeds you have added"
|
451 |
-
msgstr "Listát vagy hagyományos naptárat jelenít meg a megadott Google Naptár csatornából vagy csatornákból."
|
452 |
-
|
453 |
-
#: widget/gce-widget.php:40
|
454 |
-
msgid "No valid Feed IDs have been entered for this widget. Please check that you have entered the IDs correctly and that the Feeds have not been deleted."
|
455 |
-
msgstr "Nincs érvényes azonosító adva ehhez a dobozhoz. Kérem, ellenőrizze, hogy helyesen adta-e meg az azonosítót, és hogy a csatoránt nem törölte-e."
|
456 |
-
|
457 |
-
#: widget/gce-widget.php:99
|
458 |
-
msgid "No feeds have been added yet. You can add feeds in the Google Calendar Events settings."
|
459 |
-
msgstr "Még nem adott meg csatornát. Csatornát a Google Naptár Események beállításánál tud hozzáadni."
|
460 |
-
|
461 |
-
#: widget/gce-widget.php:113
|
462 |
-
msgid "Feed IDs to display in this widget, separated by commas (e.g. 1, 2, 4):"
|
463 |
-
msgstr "A dobozban megjelenítendő csatornák azonosítója, vesszővel elválasztva (pl. 1, 2, 4):"
|
464 |
-
|
465 |
-
#: widget/gce-widget.php:117
|
466 |
-
msgid "Display as:"
|
467 |
-
msgstr "Megjelenítés mint:"
|
468 |
-
|
469 |
-
#: widget/gce-widget.php:119
|
470 |
-
msgid "Calendar Grid"
|
471 |
-
msgstr "Naptárdoboz"
|
472 |
-
|
473 |
-
#: widget/gce-widget.php:120
|
474 |
-
msgid "Calendar Grid - with AJAX"
|
475 |
-
msgstr "Naptárdoboz - AJAX"
|
476 |
-
|
477 |
-
#: widget/gce-widget.php:121
|
478 |
-
msgid "List"
|
479 |
-
msgstr "Lista"
|
480 |
-
|
481 |
-
#: widget/gce-widget.php:122
|
482 |
-
msgid "List - grouped by date"
|
483 |
-
msgstr "Lista dátum szerint csoportosítva"
|
484 |
-
|
485 |
-
#. Plugin URI of the plugin/theme
|
486 |
-
msgid "http://www.rhanney.co.uk/plugins/google-calendar-events"
|
487 |
-
msgstr "http://www.rhanney.co.uk/plugins/google-calendar-events"
|
488 |
-
|
489 |
-
#. Description of the plugin/theme
|
490 |
-
msgid "Parses Google Calendar feeds and displays the events as a calendar grid or list on a page, post or widget."
|
491 |
-
msgstr "Google Naptár csatornákat dolgoz fel és jeleníti meg naptárdobozként vagy listában a megadott oldalon, bejegyzésben vagy dobozban."
|
492 |
-
|
493 |
-
#. Author of the plugin/theme
|
494 |
-
msgid "Ross Hanney"
|
495 |
-
msgstr "Ross Hanney"
|
496 |
-
|
497 |
-
#. Author URI of the plugin/theme
|
498 |
-
msgid "http://www.rhanney.co.uk"
|
499 |
-
msgstr "http://www.rhanney.co.uk"
|
500 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/google-calendar-events.pot
DELETED
@@ -1,1053 +0,0 @@
|
|
1 |
-
# Copyright (C) 2010 Google Calendar Events
|
2 |
-
# This file is distributed under the same license as the Google Calendar Events package.
|
3 |
-
msgid ""
|
4 |
-
msgstr ""
|
5 |
-
"Project-Id-Version: Google Calendar Events 0.7.1\n"
|
6 |
-
"Report-Msgid-Bugs-To: http://wordpress.org/tag/google-calendar-events\n"
|
7 |
-
"POT-Creation-Date: 2011-07-17 10:47:22+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: 2010-MO-DA HO:MI+ZONE\n"
|
12 |
-
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
-
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
-
|
15 |
-
#: admin/edit.php:9
|
16 |
-
msgid "Edit Feed"
|
17 |
-
msgstr ""
|
18 |
-
|
19 |
-
#: admin/edit.php:11 admin/add.php:10 admin/refresh.php:11 admin/delete.php:11
|
20 |
-
msgid "Feed ID"
|
21 |
-
msgstr ""
|
22 |
-
|
23 |
-
#: admin/edit.php:12 admin/add.php:11 admin/refresh.php:12 admin/delete.php:12
|
24 |
-
msgid "Feed Title"
|
25 |
-
msgstr ""
|
26 |
-
|
27 |
-
#: admin/edit.php:13 admin/add.php:12
|
28 |
-
msgid "Feed URL"
|
29 |
-
msgstr ""
|
30 |
-
|
31 |
-
#: admin/edit.php:14 admin/add.php:13
|
32 |
-
msgid "Retrieve events from"
|
33 |
-
msgstr ""
|
34 |
-
|
35 |
-
#: admin/edit.php:15 admin/add.php:14
|
36 |
-
msgid "Retrieve events until"
|
37 |
-
msgstr ""
|
38 |
-
|
39 |
-
#: admin/edit.php:16 admin/add.php:15
|
40 |
-
msgid "Maximum number of events to retrieve"
|
41 |
-
msgstr ""
|
42 |
-
|
43 |
-
#: admin/edit.php:17 admin/add.php:16
|
44 |
-
msgid "Date format"
|
45 |
-
msgstr ""
|
46 |
-
|
47 |
-
#: admin/edit.php:18 admin/add.php:17
|
48 |
-
msgid "Time format"
|
49 |
-
msgstr ""
|
50 |
-
|
51 |
-
#: admin/edit.php:19 admin/add.php:18
|
52 |
-
msgid "Timezone adjustment"
|
53 |
-
msgstr ""
|
54 |
-
|
55 |
-
#: admin/edit.php:20 admin/add.php:19
|
56 |
-
msgid "Cache duration"
|
57 |
-
msgstr ""
|
58 |
-
|
59 |
-
#: admin/edit.php:21 admin/add.php:20
|
60 |
-
msgid "Show multiple day events on each day?"
|
61 |
-
msgstr ""
|
62 |
-
|
63 |
-
#: admin/edit.php:23 admin/add.php:22
|
64 |
-
msgid "Display Options"
|
65 |
-
msgstr ""
|
66 |
-
|
67 |
-
#: admin/edit.php:24 admin/add.php:23
|
68 |
-
msgid "Select display customization method"
|
69 |
-
msgstr ""
|
70 |
-
|
71 |
-
#: admin/edit.php:26 admin/add.php:25
|
72 |
-
msgid "Event Display Builder"
|
73 |
-
msgstr ""
|
74 |
-
|
75 |
-
#: admin/edit.php:27 admin/add.php:26
|
76 |
-
msgid "Event display builder HTML and shortcodes"
|
77 |
-
msgstr ""
|
78 |
-
|
79 |
-
#: admin/edit.php:29 admin/add.php:28
|
80 |
-
msgid "Simple Display Options"
|
81 |
-
msgstr ""
|
82 |
-
|
83 |
-
#: admin/edit.php:30 admin/add.php:29
|
84 |
-
msgid "Display start time / date?"
|
85 |
-
msgstr ""
|
86 |
-
|
87 |
-
#: admin/edit.php:31 admin/add.php:30
|
88 |
-
msgid "Display end time / date?"
|
89 |
-
msgstr ""
|
90 |
-
|
91 |
-
#: admin/edit.php:32 admin/add.php:31
|
92 |
-
msgid "Separator text / characters"
|
93 |
-
msgstr ""
|
94 |
-
|
95 |
-
#: admin/edit.php:33 admin/add.php:32
|
96 |
-
msgid "Display location?"
|
97 |
-
msgstr ""
|
98 |
-
|
99 |
-
#: admin/edit.php:34 admin/add.php:33
|
100 |
-
msgid "Display description?"
|
101 |
-
msgstr ""
|
102 |
-
|
103 |
-
#: admin/edit.php:35 admin/add.php:34
|
104 |
-
msgid "Display link to event?"
|
105 |
-
msgstr ""
|
106 |
-
|
107 |
-
#: admin/edit.php:40
|
108 |
-
msgid ""
|
109 |
-
"Make any changes you require to the feed details below, then click the Save "
|
110 |
-
"Changes button."
|
111 |
-
msgstr ""
|
112 |
-
|
113 |
-
#: admin/edit.php:59 admin/add.php:63
|
114 |
-
msgid "Anything you like. 'Upcoming Club Events', for example."
|
115 |
-
msgstr ""
|
116 |
-
|
117 |
-
#: admin/edit.php:70
|
118 |
-
msgid ""
|
119 |
-
"This will probably be something like: <code>http://www.google.com/calendar/"
|
120 |
-
"feeds/your-email@gmail.com/public/full</code>."
|
121 |
-
msgstr ""
|
122 |
-
|
123 |
-
#: admin/edit.php:72
|
124 |
-
msgid ""
|
125 |
-
"or: <code>http://www.google.com/calendar/feeds/your-email@gmail.com/private-"
|
126 |
-
"d65741b037h695ff274247f90746b2ty/basic</code>."
|
127 |
-
msgstr ""
|
128 |
-
|
129 |
-
#: admin/edit.php:83
|
130 |
-
msgid ""
|
131 |
-
"The point in time at which to start retrieving events. Use the text-box to "
|
132 |
-
"specify an additional offset from you chosen start point. The offset should "
|
133 |
-
"be provided in seconds (3600 = 1 hour, 86400 = 1 day) and can be negative. "
|
134 |
-
"If you have selected the 'Specific date / time' option, enter a <a href="
|
135 |
-
"\"http://www.timestampgenerator.com\" target=\"_blank\">UNIX timestamp</a> "
|
136 |
-
"in the text-box."
|
137 |
-
msgstr ""
|
138 |
-
|
139 |
-
#: admin/edit.php:103 admin/add.php:105
|
140 |
-
msgid ""
|
141 |
-
"The point in time at which to stop retrieving events. The instructions for "
|
142 |
-
"the above option also apply here."
|
143 |
-
msgstr ""
|
144 |
-
|
145 |
-
#: admin/edit.php:124 admin/add.php:124
|
146 |
-
msgid ""
|
147 |
-
"Set this to a few more than you actually want to display (due to caching and "
|
148 |
-
"timezone issues). The exact number to display can be configured per "
|
149 |
-
"shortcode / widget."
|
150 |
-
msgstr ""
|
151 |
-
|
152 |
-
#: admin/edit.php:135 admin/add.php:133
|
153 |
-
msgid ""
|
154 |
-
"In <a href=\"http://php.net/manual/en/function.date.php\" target=\"_blank"
|
155 |
-
"\">PHP date format</a>. Leave this blank if you'd rather stick with the "
|
156 |
-
"default format for your blog."
|
157 |
-
msgstr ""
|
158 |
-
|
159 |
-
#: admin/edit.php:146 admin/add.php:142
|
160 |
-
msgid ""
|
161 |
-
"In <a href=\"http://php.net/manual/en/function.date.php\" target=\"_blank"
|
162 |
-
"\">PHP date format</a>. Again, leave this blank to stick with the default."
|
163 |
-
msgstr ""
|
164 |
-
|
165 |
-
#: admin/edit.php:161 admin/add.php:155
|
166 |
-
msgid ""
|
167 |
-
"If you are having problems with dates and times displaying in the wrong "
|
168 |
-
"timezone, select a city in your required timezone here."
|
169 |
-
msgstr ""
|
170 |
-
|
171 |
-
#: admin/edit.php:172 admin/add.php:164
|
172 |
-
msgid ""
|
173 |
-
"The length of time, in seconds, to cache the feed (43200 = 12 hours). If "
|
174 |
-
"this feed changes regularly, you may want to reduce the cache duration."
|
175 |
-
msgstr ""
|
176 |
-
|
177 |
-
#: admin/edit.php:183 admin/add.php:173
|
178 |
-
msgid ""
|
179 |
-
"Show events that span multiple days on each day that they span, rather than "
|
180 |
-
"just the first day."
|
181 |
-
msgstr ""
|
182 |
-
|
183 |
-
#: admin/edit.php:194 admin/add.php:184
|
184 |
-
msgid ""
|
185 |
-
"These settings control what information will be displayed for this feed in "
|
186 |
-
"the tooltip (for grids), or in a list."
|
187 |
-
msgstr ""
|
188 |
-
|
189 |
-
#: admin/edit.php:202 admin/add.php:190
|
190 |
-
msgid ""
|
191 |
-
"It is recommended that you use the event display builder option, as it "
|
192 |
-
"provides much more flexibility than the simple display options. The event "
|
193 |
-
"display builder can do everything the simple display options can, plus lots "
|
194 |
-
"more!"
|
195 |
-
msgstr ""
|
196 |
-
|
197 |
-
#: admin/edit.php:205 admin/add.php:193
|
198 |
-
msgid "Event display builder"
|
199 |
-
msgstr ""
|
200 |
-
|
201 |
-
#: admin/edit.php:206 admin/add.php:194
|
202 |
-
msgid "Simple display options"
|
203 |
-
msgstr ""
|
204 |
-
|
205 |
-
#: admin/edit.php:214
|
206 |
-
msgid ""
|
207 |
-
"Use the event display builder to customize how event information will be "
|
208 |
-
"displayed in the grid tooltips and in lists. Use HTML and the shortcodes "
|
209 |
-
"(explained below) to display the information you require. A basic example "
|
210 |
-
"display format is provided as a starting point. For more information, take a "
|
211 |
-
"look at the <a href=\"http://www.rhanney.co.uk/plugins/google-calendar-"
|
212 |
-
"events/event-display-builder\" target=\"_blank\">event display builder "
|
213 |
-
"guide</a>."
|
214 |
-
msgstr ""
|
215 |
-
|
216 |
-
#: admin/edit.php:224
|
217 |
-
msgid ""
|
218 |
-
"(More information on all of the below shortcodes and attributes, and working "
|
219 |
-
"examples, can be found in the <a href=\"http://www.rhanney.co.uk/plugins/"
|
220 |
-
"google-calendar-events/event-display-builder\" target=\"_blank\">event "
|
221 |
-
"display builder guide</a>)"
|
222 |
-
msgstr ""
|
223 |
-
|
224 |
-
#: admin/edit.php:225 admin/add.php:224
|
225 |
-
msgid "Event information shortcodes:"
|
226 |
-
msgstr ""
|
227 |
-
|
228 |
-
#: admin/edit.php:227 admin/add.php:226
|
229 |
-
msgid ""
|
230 |
-
"The event title (possible attributes: <code>html</code>, <code>markdown</"
|
231 |
-
"code>)"
|
232 |
-
msgstr ""
|
233 |
-
|
234 |
-
#: admin/edit.php:228 admin/add.php:227
|
235 |
-
msgid ""
|
236 |
-
"The event start time. Will use the time format specified in the above "
|
237 |
-
"settings"
|
238 |
-
msgstr ""
|
239 |
-
|
240 |
-
#: admin/edit.php:229 admin/add.php:228
|
241 |
-
msgid ""
|
242 |
-
"The event start date. Will use the date format specified in the above "
|
243 |
-
"settings"
|
244 |
-
msgstr ""
|
245 |
-
|
246 |
-
#: admin/edit.php:230 admin/add.php:229
|
247 |
-
msgid ""
|
248 |
-
"The event start date / time. Will use the format specified in the "
|
249 |
-
"<code>format</code> attribute (possible attributes: <code>format</code>)"
|
250 |
-
msgstr ""
|
251 |
-
|
252 |
-
#: admin/edit.php:231 admin/add.php:230
|
253 |
-
msgid ""
|
254 |
-
"The difference between the start time of the event and the time now, in "
|
255 |
-
"human-readable format, such as '1 hour', '4 days', '15 mins' (possible "
|
256 |
-
"attributes: <code>precision</code>)"
|
257 |
-
msgstr ""
|
258 |
-
|
259 |
-
#: admin/edit.php:232 admin/add.php:231
|
260 |
-
msgid ""
|
261 |
-
"The event end time. Will use the time format specified in the above settings"
|
262 |
-
msgstr ""
|
263 |
-
|
264 |
-
#: admin/edit.php:233 admin/add.php:232
|
265 |
-
msgid ""
|
266 |
-
"The event end date. Will use the date format specified in the above settings"
|
267 |
-
msgstr ""
|
268 |
-
|
269 |
-
#: admin/edit.php:234 admin/add.php:233
|
270 |
-
msgid ""
|
271 |
-
"The event end date / time. Will use the format specified in the "
|
272 |
-
"<code>format</code> attribute (possible attributes: <code>format</code>)"
|
273 |
-
msgstr ""
|
274 |
-
|
275 |
-
#: admin/edit.php:235 admin/add.php:234
|
276 |
-
msgid ""
|
277 |
-
"The difference between the end time of the event and the time now, in human-"
|
278 |
-
"readable format (possible attributes: <code>precision</code>)"
|
279 |
-
msgstr ""
|
280 |
-
|
281 |
-
#: admin/edit.php:236 admin/add.php:235
|
282 |
-
msgid ""
|
283 |
-
"The event location (possible attributes: <code>html</code>, <code>markdown</"
|
284 |
-
"code>)"
|
285 |
-
msgstr ""
|
286 |
-
|
287 |
-
#: admin/edit.php:237 admin/add.php:236
|
288 |
-
msgid ""
|
289 |
-
"Anything between the opening and closing shortcode tags (inlcuding further "
|
290 |
-
"shortcodes) will be linked to Google Maps, using the event location as a "
|
291 |
-
"search parameter (possible attributes: <code>newwindow</code>)"
|
292 |
-
msgstr ""
|
293 |
-
|
294 |
-
#: admin/edit.php:238 admin/add.php:237
|
295 |
-
msgid ""
|
296 |
-
"The event description (possible attributes: <code>html</code>, "
|
297 |
-
"<code>markdown</code>, <code>limit</code>)"
|
298 |
-
msgstr ""
|
299 |
-
|
300 |
-
#: admin/edit.php:239 admin/add.php:238
|
301 |
-
msgid ""
|
302 |
-
"Anything between the opening and closing shortcode tags (inlcuding further "
|
303 |
-
"shortcodes) will be linked to the Google Calendar page for the event "
|
304 |
-
"(possible attributes: <code>newwindow</code>)"
|
305 |
-
msgstr ""
|
306 |
-
|
307 |
-
#: admin/edit.php:240 admin/add.php:239
|
308 |
-
msgid "The raw URL to the Google Calendar page for the event"
|
309 |
-
msgstr ""
|
310 |
-
|
311 |
-
#: admin/edit.php:241 admin/add.php:240
|
312 |
-
msgid ""
|
313 |
-
"The length of the event, in human-readable format (possible attributes: "
|
314 |
-
"<code>precision</code>)"
|
315 |
-
msgstr ""
|
316 |
-
|
317 |
-
#: admin/edit.php:242 admin/add.php:241
|
318 |
-
msgid ""
|
319 |
-
"The position of the event in the current list, or the position of the event "
|
320 |
-
"in the current month (for grids)"
|
321 |
-
msgstr ""
|
322 |
-
|
323 |
-
#: admin/edit.php:243 admin/add.php:242
|
324 |
-
msgid "The event UID (a unique identifier assigned to the event by Google)"
|
325 |
-
msgstr ""
|
326 |
-
|
327 |
-
#: admin/edit.php:245 admin/add.php:244
|
328 |
-
msgid "Feed information shortcodes:"
|
329 |
-
msgstr ""
|
330 |
-
|
331 |
-
#: admin/edit.php:247 admin/add.php:246
|
332 |
-
msgid "The title of the feed from which the event comes"
|
333 |
-
msgstr ""
|
334 |
-
|
335 |
-
#: admin/edit.php:248 admin/add.php:247
|
336 |
-
msgid "The ID of the feed from which the event comes"
|
337 |
-
msgstr ""
|
338 |
-
|
339 |
-
#: admin/edit.php:249 admin/add.php:248
|
340 |
-
msgid ""
|
341 |
-
"The calendar ID (a unique identifier assigned to the calendar by Google)"
|
342 |
-
msgstr ""
|
343 |
-
|
344 |
-
#: admin/edit.php:251 admin/add.php:250
|
345 |
-
msgid "Conditional shortcodes:"
|
346 |
-
msgstr ""
|
347 |
-
|
348 |
-
#: admin/edit.php:252 admin/add.php:251
|
349 |
-
msgid ""
|
350 |
-
"Anything entered between the opening and closing tags of each of the "
|
351 |
-
"following shortcodes will only be displayed if its condition (below) is met."
|
352 |
-
msgstr ""
|
353 |
-
|
354 |
-
#: admin/edit.php:254 admin/add.php:253
|
355 |
-
msgid "The event is an all-day event"
|
356 |
-
msgstr ""
|
357 |
-
|
358 |
-
#: admin/edit.php:255 admin/add.php:254
|
359 |
-
msgid "The event is not an all-day event"
|
360 |
-
msgstr ""
|
361 |
-
|
362 |
-
#: admin/edit.php:256 admin/add.php:255
|
363 |
-
msgid "The event has a title"
|
364 |
-
msgstr ""
|
365 |
-
|
366 |
-
#: admin/edit.php:257 admin/add.php:256
|
367 |
-
msgid "The event has a description"
|
368 |
-
msgstr ""
|
369 |
-
|
370 |
-
#: admin/edit.php:258 admin/add.php:257
|
371 |
-
msgid "The event has a location"
|
372 |
-
msgstr ""
|
373 |
-
|
374 |
-
#: admin/edit.php:259 admin/add.php:258
|
375 |
-
msgid "The event is to be displayed in a tooltip (not a list)"
|
376 |
-
msgstr ""
|
377 |
-
|
378 |
-
#: admin/edit.php:260 admin/add.php:259
|
379 |
-
msgid "The event is to be displayed in a list (not a tooltip)"
|
380 |
-
msgstr ""
|
381 |
-
|
382 |
-
#: admin/edit.php:261 admin/add.php:260
|
383 |
-
msgid ""
|
384 |
-
"The event is taking place now (after the start time, but before the end time)"
|
385 |
-
msgstr ""
|
386 |
-
|
387 |
-
#: admin/edit.php:262 admin/add.php:261
|
388 |
-
msgid "The event is not taking place now (may have ended or not yet started)"
|
389 |
-
msgstr ""
|
390 |
-
|
391 |
-
#: admin/edit.php:263 admin/add.php:262
|
392 |
-
msgid "The event has started (even if it has also ended)"
|
393 |
-
msgstr ""
|
394 |
-
|
395 |
-
#: admin/edit.php:264 admin/add.php:263
|
396 |
-
msgid "The event has not started"
|
397 |
-
msgstr ""
|
398 |
-
|
399 |
-
#: admin/edit.php:265 admin/add.php:264
|
400 |
-
msgid "The event has ended"
|
401 |
-
msgstr ""
|
402 |
-
|
403 |
-
#: admin/edit.php:266 admin/add.php:265
|
404 |
-
msgid "The event has not ended (even if it hasn't started)"
|
405 |
-
msgstr ""
|
406 |
-
|
407 |
-
#: admin/edit.php:267 admin/add.php:266
|
408 |
-
msgid "The event is the first of the day"
|
409 |
-
msgstr ""
|
410 |
-
|
411 |
-
#: admin/edit.php:268 admin/add.php:267
|
412 |
-
msgid "The event is not the first of the day"
|
413 |
-
msgstr ""
|
414 |
-
|
415 |
-
#: admin/edit.php:269 admin/add.php:268
|
416 |
-
msgid "The event spans multiple days"
|
417 |
-
msgstr ""
|
418 |
-
|
419 |
-
#: admin/edit.php:270 admin/add.php:269
|
420 |
-
msgid "The event does not span multiple days"
|
421 |
-
msgstr ""
|
422 |
-
|
423 |
-
#: admin/edit.php:272 admin/add.php:271
|
424 |
-
msgid "Attributes:"
|
425 |
-
msgstr ""
|
426 |
-
|
427 |
-
#: admin/edit.php:273 admin/add.php:272
|
428 |
-
msgid "The possible attributes mentioned above are explained here:"
|
429 |
-
msgstr ""
|
430 |
-
|
431 |
-
#: admin/edit.php:275 admin/add.php:274
|
432 |
-
msgid ""
|
433 |
-
"Whether or not to parse HTML that has been entered in the relevant field. "
|
434 |
-
"Can be <code>true</code> or <code>false</code>"
|
435 |
-
msgstr ""
|
436 |
-
|
437 |
-
#: admin/edit.php:276 admin/add.php:275
|
438 |
-
msgid ""
|
439 |
-
"Whether or not to parse <a href=\"http://daringfireball.net/projects/markdown"
|
440 |
-
"\" target=\"_blank\">Markdown</a> that has been entered in the relevant "
|
441 |
-
"field. <a href=\"http://michelf.com/projects/php-markdown\" target=\"_blank"
|
442 |
-
"\">PHP Markdown</a> must be installed for this to work. Can be <code>true</"
|
443 |
-
"code> or <code>false</code>"
|
444 |
-
msgstr ""
|
445 |
-
|
446 |
-
#: admin/edit.php:277 admin/add.php:276
|
447 |
-
msgid "The word limit for the field. Should be specified as a positive integer"
|
448 |
-
msgstr ""
|
449 |
-
|
450 |
-
#: admin/edit.php:278 admin/add.php:277
|
451 |
-
msgid ""
|
452 |
-
"The date / time format to use. Should specified as a <a href=\"http://php."
|
453 |
-
"net/manual/en/function.date.php\" target=\"_blank\">PHP date format</a> "
|
454 |
-
"string"
|
455 |
-
msgstr ""
|
456 |
-
|
457 |
-
#: admin/edit.php:279 admin/add.php:278
|
458 |
-
msgid ""
|
459 |
-
"Whether or not the link should open in a new window / tab. Can be "
|
460 |
-
"<code>true</code> or <code>false</code>"
|
461 |
-
msgstr ""
|
462 |
-
|
463 |
-
#: admin/edit.php:280 admin/add.php:279
|
464 |
-
msgid ""
|
465 |
-
"How precise to be when displaying a time difference in human-readable "
|
466 |
-
"format. Should be specified as a positive integer"
|
467 |
-
msgstr ""
|
468 |
-
|
469 |
-
#: admin/edit.php:281 admin/add.php:280
|
470 |
-
msgid ""
|
471 |
-
"An offset (in seconds) to apply to start / end times before display. Should "
|
472 |
-
"be specified as a (positive or negative) integer"
|
473 |
-
msgstr ""
|
474 |
-
|
475 |
-
#: admin/edit.php:282 admin/add.php:281
|
476 |
-
msgid ""
|
477 |
-
"Whether or not to automatically convert URLs in the description to links. "
|
478 |
-
"Can be <code>true</code> or <code>false</code>"
|
479 |
-
msgstr ""
|
480 |
-
|
481 |
-
#: admin/edit.php:290 admin/add.php:289
|
482 |
-
msgid ""
|
483 |
-
"You can use some HTML in the text fields, but ensure it is valid or things "
|
484 |
-
"might go wonky. Text fields can be empty too."
|
485 |
-
msgstr ""
|
486 |
-
|
487 |
-
#: admin/edit.php:298 admin/add.php:295
|
488 |
-
msgid "Select how to display the start date / time."
|
489 |
-
msgstr ""
|
490 |
-
|
491 |
-
#: admin/edit.php:301 admin/add.php:298
|
492 |
-
msgid "Don't display start time or date"
|
493 |
-
msgstr ""
|
494 |
-
|
495 |
-
#: admin/edit.php:302 admin/add.php:299
|
496 |
-
msgid "Display start time"
|
497 |
-
msgstr ""
|
498 |
-
|
499 |
-
#: admin/edit.php:303 admin/add.php:300
|
500 |
-
msgid "Display start date"
|
501 |
-
msgstr ""
|
502 |
-
|
503 |
-
#: admin/edit.php:304 admin/add.php:301
|
504 |
-
msgid "Display start time and date (in that order)"
|
505 |
-
msgstr ""
|
506 |
-
|
507 |
-
#: admin/edit.php:305 admin/add.php:302
|
508 |
-
msgid "Display start date and time (in that order)"
|
509 |
-
msgstr ""
|
510 |
-
|
511 |
-
#: admin/edit.php:308 admin/add.php:305
|
512 |
-
msgid "Text to display before the start time."
|
513 |
-
msgstr ""
|
514 |
-
|
515 |
-
#: admin/edit.php:318 admin/add.php:313
|
516 |
-
msgid "Select how to display the end date / time."
|
517 |
-
msgstr ""
|
518 |
-
|
519 |
-
#: admin/edit.php:321 admin/add.php:316
|
520 |
-
msgid "Don't display end time or date"
|
521 |
-
msgstr ""
|
522 |
-
|
523 |
-
#: admin/edit.php:322 admin/add.php:317
|
524 |
-
msgid "Display end time"
|
525 |
-
msgstr ""
|
526 |
-
|
527 |
-
#: admin/edit.php:323 admin/add.php:318
|
528 |
-
msgid "Display end date"
|
529 |
-
msgstr ""
|
530 |
-
|
531 |
-
#: admin/edit.php:324 admin/add.php:319
|
532 |
-
msgid "Display end time and date (in that order)"
|
533 |
-
msgstr ""
|
534 |
-
|
535 |
-
#: admin/edit.php:325 admin/add.php:320
|
536 |
-
msgid "Display end date and time (in that order)"
|
537 |
-
msgstr ""
|
538 |
-
|
539 |
-
#: admin/edit.php:328 admin/add.php:323
|
540 |
-
msgid "Text to display before the end time."
|
541 |
-
msgstr ""
|
542 |
-
|
543 |
-
#: admin/edit.php:338 admin/add.php:331
|
544 |
-
msgid ""
|
545 |
-
"If you have chosen to display both the time and date above, enter the text / "
|
546 |
-
"characters to display between the time and date here (including any spaces)."
|
547 |
-
msgstr ""
|
548 |
-
|
549 |
-
#: admin/edit.php:349 admin/add.php:340
|
550 |
-
msgid "Show the location of events?"
|
551 |
-
msgstr ""
|
552 |
-
|
553 |
-
#: admin/edit.php:351 admin/add.php:342
|
554 |
-
msgid "Text to display before the location."
|
555 |
-
msgstr ""
|
556 |
-
|
557 |
-
#: admin/edit.php:362
|
558 |
-
msgid ""
|
559 |
-
"Show the description of events? (URLs in the description will be made into "
|
560 |
-
"links)."
|
561 |
-
msgstr ""
|
562 |
-
|
563 |
-
#: admin/edit.php:364 admin/add.php:353
|
564 |
-
msgid "Text to display before the description."
|
565 |
-
msgstr ""
|
566 |
-
|
567 |
-
#: admin/edit.php:368 admin/add.php:357
|
568 |
-
msgid ""
|
569 |
-
"Maximum number of words to show from description. Leave blank for no limit."
|
570 |
-
msgstr ""
|
571 |
-
|
572 |
-
#: admin/edit.php:379 admin/add.php:366
|
573 |
-
msgid "Show a link to the Google Calendar page for an event?"
|
574 |
-
msgstr ""
|
575 |
-
|
576 |
-
#: admin/edit.php:382 admin/add.php:369
|
577 |
-
msgid "Links open in a new window / tab?"
|
578 |
-
msgstr ""
|
579 |
-
|
580 |
-
#: admin/edit.php:384 admin/add.php:371
|
581 |
-
msgid "The link text to be displayed."
|
582 |
-
msgstr ""
|
583 |
-
|
584 |
-
#: admin/add.php:8
|
585 |
-
msgid "Add a Feed"
|
586 |
-
msgstr ""
|
587 |
-
|
588 |
-
#: admin/add.php:39
|
589 |
-
msgid "Enter the feed details below, then click the Add Feed button."
|
590 |
-
msgstr ""
|
591 |
-
|
592 |
-
#: admin/add.php:72
|
593 |
-
msgid "This will probably be something like:"
|
594 |
-
msgstr ""
|
595 |
-
|
596 |
-
#: admin/add.php:74
|
597 |
-
msgid "or:"
|
598 |
-
msgstr ""
|
599 |
-
|
600 |
-
#: admin/add.php:84
|
601 |
-
msgid ""
|
602 |
-
"The point in time at which to start retrieving events. Use the text-box to "
|
603 |
-
"specify an additional offset from you chosen start point. The offset should "
|
604 |
-
"be provided in seconds (3600 = 1 hour, 86400 = 1 day) and can be negative. "
|
605 |
-
"If you have selected the 'Specific date / time' option, enter a"
|
606 |
-
msgstr ""
|
607 |
-
|
608 |
-
#: admin/add.php:85
|
609 |
-
msgid "UNIX timestamp"
|
610 |
-
msgstr ""
|
611 |
-
|
612 |
-
#: admin/add.php:86
|
613 |
-
msgid "in the text-box."
|
614 |
-
msgstr ""
|
615 |
-
|
616 |
-
#: admin/add.php:90 admin/add.php:108
|
617 |
-
msgid "Now"
|
618 |
-
msgstr ""
|
619 |
-
|
620 |
-
#: admin/add.php:91 admin/add.php:109
|
621 |
-
msgid "00:00 today"
|
622 |
-
msgstr ""
|
623 |
-
|
624 |
-
#: admin/add.php:92 admin/add.php:110
|
625 |
-
msgid "Start of current week"
|
626 |
-
msgstr ""
|
627 |
-
|
628 |
-
#: admin/add.php:93 admin/add.php:111
|
629 |
-
msgid "Start of current month"
|
630 |
-
msgstr ""
|
631 |
-
|
632 |
-
#: admin/add.php:94 admin/add.php:112
|
633 |
-
msgid "End of current month"
|
634 |
-
msgstr ""
|
635 |
-
|
636 |
-
#: admin/add.php:95
|
637 |
-
msgid "The beginning of time"
|
638 |
-
msgstr ""
|
639 |
-
|
640 |
-
#: admin/add.php:96 admin/add.php:114
|
641 |
-
msgid "Specific date / time"
|
642 |
-
msgstr ""
|
643 |
-
|
644 |
-
#: admin/add.php:113
|
645 |
-
msgid "The end of time"
|
646 |
-
msgstr ""
|
647 |
-
|
648 |
-
#: admin/add.php:203
|
649 |
-
msgid ""
|
650 |
-
"Use the event display builder to customize how event information will be "
|
651 |
-
"displayed in the grid tooltips and in lists. Use HTML and the shortcodes "
|
652 |
-
"(explained below) to display the information you require. A basic example "
|
653 |
-
"display format is provided as a starting point. For more information, take a "
|
654 |
-
"look at the"
|
655 |
-
msgstr ""
|
656 |
-
|
657 |
-
#: admin/add.php:204 admin/add.php:222
|
658 |
-
msgid "event display builder guide"
|
659 |
-
msgstr ""
|
660 |
-
|
661 |
-
#: admin/add.php:221
|
662 |
-
msgid ""
|
663 |
-
"(More information on all of the below shortcodes and attributes, and working "
|
664 |
-
"examples, can be found in the"
|
665 |
-
msgstr ""
|
666 |
-
|
667 |
-
#: admin/add.php:351
|
668 |
-
msgid ""
|
669 |
-
"Show the description of events? (URLs in the description will be made into "
|
670 |
-
"links)."
|
671 |
-
msgstr ""
|
672 |
-
|
673 |
-
#: admin/refresh.php:9
|
674 |
-
msgid "Refresh Feed Cache"
|
675 |
-
msgstr ""
|
676 |
-
|
677 |
-
#: admin/refresh.php:17
|
678 |
-
msgid ""
|
679 |
-
"The plugin will automatically refresh the cache when it expires, but you can "
|
680 |
-
"manually clear the cache now by clicking the button below."
|
681 |
-
msgstr ""
|
682 |
-
|
683 |
-
#: admin/refresh.php:18
|
684 |
-
msgid "Are you want you want to clear the cache data for this feed?"
|
685 |
-
msgstr ""
|
686 |
-
|
687 |
-
#: admin/delete.php:9 google-calendar-events.php:276
|
688 |
-
msgid "Delete Feed"
|
689 |
-
msgstr ""
|
690 |
-
|
691 |
-
#: admin/delete.php:17
|
692 |
-
msgid ""
|
693 |
-
"Are you want you want to delete this feed? (Remember to remove / adjust any "
|
694 |
-
"widgets or shortcodes associated with this feed)."
|
695 |
-
msgstr ""
|
696 |
-
|
697 |
-
#: admin/main.php:2
|
698 |
-
msgid "Add a New Feed"
|
699 |
-
msgstr ""
|
700 |
-
|
701 |
-
#: admin/main.php:4
|
702 |
-
msgid "Click here to add a new feed"
|
703 |
-
msgstr ""
|
704 |
-
|
705 |
-
#: admin/main.php:4 google-calendar-events.php:253
|
706 |
-
msgid "Add Feed"
|
707 |
-
msgstr ""
|
708 |
-
|
709 |
-
#: admin/main.php:7
|
710 |
-
msgid "Current Feeds"
|
711 |
-
msgstr ""
|
712 |
-
|
713 |
-
#: admin/main.php:16
|
714 |
-
msgid "You haven't added any Google Calendar feeds yet."
|
715 |
-
msgstr ""
|
716 |
-
|
717 |
-
#: admin/main.php:24 admin/main.php:32
|
718 |
-
msgid "ID"
|
719 |
-
msgstr ""
|
720 |
-
|
721 |
-
#: admin/main.php:25 admin/main.php:33
|
722 |
-
msgid "Title"
|
723 |
-
msgstr ""
|
724 |
-
|
725 |
-
#: admin/main.php:26 admin/main.php:34
|
726 |
-
msgid "URL"
|
727 |
-
msgstr ""
|
728 |
-
|
729 |
-
#: admin/main.php:47
|
730 |
-
msgid "Refresh"
|
731 |
-
msgstr ""
|
732 |
-
|
733 |
-
#: admin/main.php:47
|
734 |
-
msgid "Edit"
|
735 |
-
msgstr ""
|
736 |
-
|
737 |
-
#: admin/main.php:47
|
738 |
-
msgid "Delete"
|
739 |
-
msgstr ""
|
740 |
-
|
741 |
-
#: admin/main.php:61
|
742 |
-
msgid "General Options"
|
743 |
-
msgstr ""
|
744 |
-
|
745 |
-
#: admin/main.php:65
|
746 |
-
msgid "Custom stylesheet URL"
|
747 |
-
msgstr ""
|
748 |
-
|
749 |
-
#: admin/main.php:67
|
750 |
-
msgid ""
|
751 |
-
"If you want to alter the default plugin styling, create a new stylesheet on "
|
752 |
-
"your server (not in the <code>google-calendar-events</code> directory) and "
|
753 |
-
"then enter its URL below."
|
754 |
-
msgstr ""
|
755 |
-
|
756 |
-
#: admin/main.php:72
|
757 |
-
msgid "Add JavaScript to footer?"
|
758 |
-
msgstr ""
|
759 |
-
|
760 |
-
#: admin/main.php:74
|
761 |
-
msgid ""
|
762 |
-
"If you are having issues with tooltips not appearing or the AJAX "
|
763 |
-
"functionality not working, try ticking the checkbox below."
|
764 |
-
msgstr ""
|
765 |
-
|
766 |
-
#: admin/main.php:79
|
767 |
-
msgid "Loading text"
|
768 |
-
msgstr ""
|
769 |
-
|
770 |
-
#: admin/main.php:81
|
771 |
-
msgid "Text to display while calendar data is loading (on AJAX requests)."
|
772 |
-
msgstr ""
|
773 |
-
|
774 |
-
#: admin/main.php:86
|
775 |
-
msgid "Error message"
|
776 |
-
msgstr ""
|
777 |
-
|
778 |
-
#: admin/main.php:88
|
779 |
-
msgid ""
|
780 |
-
"An error message to display to non-admin users if events cannot be displayed "
|
781 |
-
"for any reason (admins will see a message indicating the cause of the "
|
782 |
-
"problem)."
|
783 |
-
msgstr ""
|
784 |
-
|
785 |
-
#: admin/main.php:93
|
786 |
-
msgid "Optimise event retrieval?"
|
787 |
-
msgstr ""
|
788 |
-
|
789 |
-
#: admin/main.php:95
|
790 |
-
msgid ""
|
791 |
-
"If this option is enabled, the plugin will use an experimental feature of "
|
792 |
-
"the Google Data API, which can improve performance significantly, especially "
|
793 |
-
"with large numbers of events. Google could potentially remove / change this "
|
794 |
-
"feature at any time."
|
795 |
-
msgstr ""
|
796 |
-
|
797 |
-
#: admin/main.php:100
|
798 |
-
msgid "Use old styles?"
|
799 |
-
msgstr ""
|
800 |
-
|
801 |
-
#: admin/main.php:102
|
802 |
-
msgid ""
|
803 |
-
"Some CSS changes were made in version 0.7. If this option is enabled, the "
|
804 |
-
"old CSS will still be added along with the main stylesheet. You should "
|
805 |
-
"consider updating your stylesheet so that you don't need this enabled."
|
806 |
-
msgstr ""
|
807 |
-
|
808 |
-
#: admin/main.php:111
|
809 |
-
msgid "Save"
|
810 |
-
msgstr ""
|
811 |
-
|
812 |
-
#. #-#-#-#-# plugin.pot (Google Calendar Events 0.7.1) #-#-#-#-#
|
813 |
-
#. Plugin Name of the plugin/theme
|
814 |
-
#: widget/gce-widget.php:6 google-calendar-events.php:231
|
815 |
-
msgid "Google Calendar Events"
|
816 |
-
msgstr ""
|
817 |
-
|
818 |
-
#: widget/gce-widget.php:7
|
819 |
-
msgid ""
|
820 |
-
"Display a list or calendar grid of events from one or more Google Calendar "
|
821 |
-
"feeds you have added"
|
822 |
-
msgstr ""
|
823 |
-
|
824 |
-
#: widget/gce-widget.php:57
|
825 |
-
msgid ""
|
826 |
-
"No valid Feed IDs have been entered for this widget. Please check that you "
|
827 |
-
"have entered the IDs correctly in the widget settings (Appearance > "
|
828 |
-
"Widgets), and that the Feeds have not been deleted."
|
829 |
-
msgstr ""
|
830 |
-
|
831 |
-
#: widget/gce-widget.php:100 google-calendar-events.php:566
|
832 |
-
msgid ""
|
833 |
-
"No feeds have been added yet. You can add a feed in the Google Calendar "
|
834 |
-
"Events settings."
|
835 |
-
msgstr ""
|
836 |
-
|
837 |
-
#: widget/gce-widget.php:129
|
838 |
-
msgid ""
|
839 |
-
"No feeds have been added yet. You can add feeds in the Google Calendar "
|
840 |
-
"Events settings."
|
841 |
-
msgstr ""
|
842 |
-
|
843 |
-
#: widget/gce-widget.php:145
|
844 |
-
msgid ""
|
845 |
-
"Feeds to display, as a comma separated list (e.g. 1, 2, 4). Leave blank to "
|
846 |
-
"display all feeds:"
|
847 |
-
msgstr ""
|
848 |
-
|
849 |
-
#: widget/gce-widget.php:149
|
850 |
-
msgid "Display events as:"
|
851 |
-
msgstr ""
|
852 |
-
|
853 |
-
#: widget/gce-widget.php:151
|
854 |
-
msgid "Calendar Grid"
|
855 |
-
msgstr ""
|
856 |
-
|
857 |
-
#: widget/gce-widget.php:152
|
858 |
-
msgid "Calendar Grid - with AJAX"
|
859 |
-
msgstr ""
|
860 |
-
|
861 |
-
#: widget/gce-widget.php:153
|
862 |
-
msgid "List"
|
863 |
-
msgstr ""
|
864 |
-
|
865 |
-
#: widget/gce-widget.php:154
|
866 |
-
msgid "List - grouped by date"
|
867 |
-
msgstr ""
|
868 |
-
|
869 |
-
#: widget/gce-widget.php:157
|
870 |
-
msgid "Maximum no. events to display. Enter 0 to show all retrieved."
|
871 |
-
msgstr ""
|
872 |
-
|
873 |
-
#: widget/gce-widget.php:160
|
874 |
-
msgid "Sort order (only applies to lists):"
|
875 |
-
msgstr ""
|
876 |
-
|
877 |
-
#: widget/gce-widget.php:162
|
878 |
-
msgid "Ascending"
|
879 |
-
msgstr ""
|
880 |
-
|
881 |
-
#: widget/gce-widget.php:163
|
882 |
-
msgid "Descending"
|
883 |
-
msgstr ""
|
884 |
-
|
885 |
-
#: widget/gce-widget.php:166
|
886 |
-
msgid ""
|
887 |
-
"Display title on tooltip / list item? (e.g. 'Events on 7th March') Grouped "
|
888 |
-
"lists always have a title displayed."
|
889 |
-
msgstr ""
|
890 |
-
|
891 |
-
#: inc/gce-feed.php:96
|
892 |
-
msgid ""
|
893 |
-
"Some data was retrieved, but could not be parsed successfully. Please ensure "
|
894 |
-
"your feed URL is correct."
|
895 |
-
msgstr ""
|
896 |
-
|
897 |
-
#: inc/gce-feed.php:102
|
898 |
-
msgid ""
|
899 |
-
"The feed could not be found (404). Please ensure your feed URL is correct."
|
900 |
-
msgstr ""
|
901 |
-
|
902 |
-
#: inc/gce-feed.php:105
|
903 |
-
msgid ""
|
904 |
-
"Access to this feed was denied (403). Please ensure you have public sharing "
|
905 |
-
"enabled for your calendar."
|
906 |
-
msgstr ""
|
907 |
-
|
908 |
-
#: inc/gce-feed.php:108
|
909 |
-
msgid ""
|
910 |
-
"The feed data could not be retrieved. Error code: %s. Please ensure your "
|
911 |
-
"feed URL is correct."
|
912 |
-
msgstr ""
|
913 |
-
|
914 |
-
#: inc/gce-event.php:484
|
915 |
-
msgid "%s year"
|
916 |
-
msgstr ""
|
917 |
-
|
918 |
-
#: inc/gce-event.php:484
|
919 |
-
msgid "%s years"
|
920 |
-
msgstr ""
|
921 |
-
|
922 |
-
#: inc/gce-event.php:485
|
923 |
-
msgid "%s month"
|
924 |
-
msgstr ""
|
925 |
-
|
926 |
-
#: inc/gce-event.php:485
|
927 |
-
msgid "%s months"
|
928 |
-
msgstr ""
|
929 |
-
|
930 |
-
#: inc/gce-event.php:486
|
931 |
-
msgid "%s week"
|
932 |
-
msgstr ""
|
933 |
-
|
934 |
-
#: inc/gce-event.php:486
|
935 |
-
msgid "%s weeks"
|
936 |
-
msgstr ""
|
937 |
-
|
938 |
-
#: inc/gce-event.php:487
|
939 |
-
msgid "%s day"
|
940 |
-
msgstr ""
|
941 |
-
|
942 |
-
#: inc/gce-event.php:487
|
943 |
-
msgid "%s days"
|
944 |
-
msgstr ""
|
945 |
-
|
946 |
-
#: inc/gce-event.php:488
|
947 |
-
msgid "%s hour"
|
948 |
-
msgstr ""
|
949 |
-
|
950 |
-
#: inc/gce-event.php:488
|
951 |
-
msgid "%s hours"
|
952 |
-
msgstr ""
|
953 |
-
|
954 |
-
#: inc/gce-event.php:489
|
955 |
-
msgid "%s min"
|
956 |
-
msgstr ""
|
957 |
-
|
958 |
-
#: inc/gce-event.php:489
|
959 |
-
msgid "%s mins"
|
960 |
-
msgstr ""
|
961 |
-
|
962 |
-
#: inc/gce-event.php:517
|
963 |
-
msgctxt "human_time_diff"
|
964 |
-
msgid ", "
|
965 |
-
msgstr ""
|
966 |
-
|
967 |
-
#: inc/gce-parser.php:156
|
968 |
-
msgid ""
|
969 |
-
"1 or more of your feeds could not be displayed. The following errors "
|
970 |
-
"occurred:"
|
971 |
-
msgstr ""
|
972 |
-
|
973 |
-
#: inc/gce-parser.php:159
|
974 |
-
msgid "Feed %s:"
|
975 |
-
msgstr ""
|
976 |
-
|
977 |
-
#: inc/gce-parser.php:315
|
978 |
-
msgid "There are currently no events to display."
|
979 |
-
msgstr ""
|
980 |
-
|
981 |
-
#: google-calendar-events.php:204
|
982 |
-
msgid "Settings"
|
983 |
-
msgstr ""
|
984 |
-
|
985 |
-
#: google-calendar-events.php:235
|
986 |
-
msgid "Notice:"
|
987 |
-
msgstr ""
|
988 |
-
|
989 |
-
#: google-calendar-events.php:235
|
990 |
-
msgid ""
|
991 |
-
"The way in which Google Calendar Events stores cached data has been much "
|
992 |
-
"improved in version 0.6. As you have upgraded from a previous version of the "
|
993 |
-
"plugin, there is likely to be some data from the old caching system hanging "
|
994 |
-
"around in your database that is now useless. Click below to clear expired "
|
995 |
-
"cached data from your database."
|
996 |
-
msgstr ""
|
997 |
-
|
998 |
-
#: google-calendar-events.php:236
|
999 |
-
msgid "Clear expired cached data"
|
1000 |
-
msgstr ""
|
1001 |
-
|
1002 |
-
#: google-calendar-events.php:237
|
1003 |
-
msgid "or"
|
1004 |
-
msgstr ""
|
1005 |
-
|
1006 |
-
#: google-calendar-events.php:238
|
1007 |
-
msgid "Ignore this notice"
|
1008 |
-
msgstr ""
|
1009 |
-
|
1010 |
-
#: google-calendar-events.php:254 google-calendar-events.php:260
|
1011 |
-
#: google-calendar-events.php:270 google-calendar-events.php:277
|
1012 |
-
msgid "Cancel"
|
1013 |
-
msgstr ""
|
1014 |
-
|
1015 |
-
#: google-calendar-events.php:259
|
1016 |
-
msgid "Refresh Feed"
|
1017 |
-
msgstr ""
|
1018 |
-
|
1019 |
-
#: google-calendar-events.php:269
|
1020 |
-
msgid "Save Changes"
|
1021 |
-
msgstr ""
|
1022 |
-
|
1023 |
-
#: google-calendar-events.php:310
|
1024 |
-
msgid "Old cached data cleared."
|
1025 |
-
msgstr ""
|
1026 |
-
|
1027 |
-
#: google-calendar-events.php:487
|
1028 |
-
msgid "General options updated."
|
1029 |
-
msgstr ""
|
1030 |
-
|
1031 |
-
#: google-calendar-events.php:546
|
1032 |
-
msgid ""
|
1033 |
-
"No valid Feed IDs have been entered for this shortcode. Please check that "
|
1034 |
-
"you have entered the IDs correctly and that the Feeds have not been deleted."
|
1035 |
-
msgstr ""
|
1036 |
-
|
1037 |
-
#. Plugin URI of the plugin/theme
|
1038 |
-
msgid "http://www.rhanney.co.uk/plugins/google-calendar-events"
|
1039 |
-
msgstr ""
|
1040 |
-
|
1041 |
-
#. Description of the plugin/theme
|
1042 |
-
msgid ""
|
1043 |
-
"Parses Google Calendar feeds and displays the events as a calendar grid or "
|
1044 |
-
"list on a page, post or widget."
|
1045 |
-
msgstr ""
|
1046 |
-
|
1047 |
-
#. Author of the plugin/theme
|
1048 |
-
msgid "Ross Hanney"
|
1049 |
-
msgstr ""
|
1050 |
-
|
1051 |
-
#. Author URI of the plugin/theme
|
1052 |
-
msgid "http://www.rhanney.co.uk"
|
1053 |
-
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
license.txt
CHANGED
@@ -1,288 +1,339 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
Copyright (C) 1989, 1991 Free Software Foundation, Inc
|
5 |
-
51 Franklin
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
freedom to share and change
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
program
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
sections
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
Thus, it is not the intent of this section to claim rights or contest
|
125 |
-
your rights to work written entirely by you; rather, the intent is to
|
126 |
-
exercise the right to control the distribution of derivative or
|
127 |
-
collective works based on the Program.
|
128 |
-
|
129 |
-
In addition, mere aggregation of another work not based on the Program
|
130 |
-
with the Program (or with a work based on the Program) on a volume of
|
131 |
-
a storage or distribution medium does not bring the other work under
|
132 |
-
the scope of this License.
|
133 |
-
|
134 |
-
3. You may copy and distribute the Program (or a work based on it,
|
135 |
-
under Section 2) in object code or executable form under the terms of
|
136 |
-
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
-
|
138 |
-
a) Accompany it with the complete corresponding machine-readable
|
139 |
-
source code, which must be distributed under the terms of Sections
|
140 |
-
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
-
|
142 |
-
b) Accompany it with a written offer, valid for at least three
|
143 |
-
years, to give any third party, for a charge no more than your
|
144 |
-
cost of physically performing source distribution, a complete
|
145 |
-
machine-readable copy of the corresponding source code, to be
|
146 |
-
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
-
customarily used for software interchange; or,
|
148 |
-
|
149 |
-
c) Accompany it with the information you received as to the offer
|
150 |
-
to distribute corresponding source code. (This alternative is
|
151 |
-
allowed only for noncommercial distribution and only if you
|
152 |
-
received the program in object code or executable form with such
|
153 |
-
an offer, in accord with Subsection b above.)
|
154 |
-
|
155 |
-
The source code for a work means the preferred form of the work for
|
156 |
-
making modifications to it. For an executable work, complete source
|
157 |
-
code means all the source code for all modules it contains, plus any
|
158 |
-
associated interface definition files, plus the scripts used to
|
159 |
-
control compilation and installation of the executable. However, as a
|
160 |
-
special exception, the source code distributed need not include
|
161 |
-
anything that is normally distributed (in either source or binary
|
162 |
-
form) with the major components (compiler, kernel, and so on) of the
|
163 |
-
operating system on which the executable runs, unless that component
|
164 |
-
itself accompanies the executable.
|
165 |
-
|
166 |
-
If distribution of executable or object code is made by offering
|
167 |
-
access to copy from a designated place, then offering equivalent
|
168 |
-
access to copy the source code from the same place counts as
|
169 |
-
distribution of the source code, even though third parties are not
|
170 |
-
compelled to copy the source along with the object code.
|
171 |
-
|
172 |
-
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
-
except as expressly provided under this License. Any attempt
|
174 |
-
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
-
void, and will automatically terminate your rights under this License.
|
176 |
-
However, parties who have received copies, or rights, from you under
|
177 |
-
this License will not have their licenses terminated so long as such
|
178 |
-
parties remain in full compliance.
|
179 |
-
|
180 |
-
5. You are not required to accept this License, since you have not
|
181 |
-
signed it. However, nothing else grants you permission to modify or
|
182 |
-
distribute the Program or its derivative works. These actions are
|
183 |
-
prohibited by law if you do not accept this License. Therefore, by
|
184 |
-
modifying or distributing the Program (or any work based on the
|
185 |
-
Program), you indicate your acceptance of this License to do so, and
|
186 |
-
all its terms and conditions for copying, distributing or modifying
|
187 |
-
the Program or works based on it.
|
188 |
-
|
189 |
-
6. Each time you redistribute the Program (or any work based on the
|
190 |
-
Program), the recipient automatically receives a license from the
|
191 |
-
original licensor to copy, distribute or modify the Program subject to
|
192 |
-
these terms and conditions. You may not impose any further
|
193 |
-
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
-
You are not responsible for enforcing compliance by third parties to
|
195 |
-
this License.
|
196 |
-
|
197 |
-
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
-
infringement or for any other reason (not limited to patent issues),
|
199 |
-
conditions are imposed on you (whether by court order, agreement or
|
200 |
-
otherwise) that contradict the conditions of this License, they do not
|
201 |
-
excuse you from the conditions of this License. If you cannot
|
202 |
-
distribute so as to satisfy simultaneously your obligations under this
|
203 |
-
License and any other pertinent obligations, then as a consequence you
|
204 |
-
may not distribute the Program at all. For example, if a patent
|
205 |
-
license would not permit royalty-free redistribution of the Program by
|
206 |
-
all those who receive copies directly or indirectly through you, then
|
207 |
-
the only way you could satisfy both it and this License would be to
|
208 |
-
refrain entirely from distribution of the Program.
|
209 |
-
|
210 |
-
If any portion of this section is held invalid or unenforceable under
|
211 |
-
any particular circumstance, the balance of the section is intended to
|
212 |
-
apply and the section as a whole is intended to apply in other
|
213 |
-
circumstances.
|
214 |
-
|
215 |
-
It is not the purpose of this section to induce you to infringe any
|
216 |
-
patents or other property right claims or to contest validity of any
|
217 |
-
such claims; this section has the sole purpose of protecting the
|
218 |
-
integrity of the free software distribution system, which is
|
219 |
-
implemented by public license practices. Many people have made
|
220 |
-
generous contributions to the wide range of software distributed
|
221 |
-
through that system in reliance on consistent application of that
|
222 |
-
system; it is up to the author/donor to decide if he or she is willing
|
223 |
-
to distribute software through any other system and a licensee cannot
|
224 |
-
impose that choice.
|
225 |
-
|
226 |
-
This section is intended to make thoroughly clear what is believed to
|
227 |
-
be a consequence of the rest of this License.
|
228 |
-
|
229 |
-
8. If the distribution and/or use of the Program is restricted in
|
230 |
-
certain countries either by patents or by copyrighted interfaces, the
|
231 |
-
original copyright holder who places the Program under this License
|
232 |
-
may add an explicit geographical distribution limitation excluding
|
233 |
-
those countries, so that distribution is permitted only in or among
|
234 |
-
countries not thus excluded. In such case, this License incorporates
|
235 |
-
the limitation as if written in the body of this License.
|
236 |
-
|
237 |
-
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
-
of the General Public License from time to time. Such new versions will
|
239 |
-
be similar in spirit to the present version, but may differ in detail to
|
240 |
-
address new problems or concerns.
|
241 |
-
|
242 |
-
Each version is given a distinguishing version number. If the Program
|
243 |
-
specifies a version number of this License which applies to it and "any
|
244 |
-
later version", you have the option of following the terms and conditions
|
245 |
-
either of that version or of any later version published by the Free
|
246 |
-
Software Foundation. If the Program does not specify a version number of
|
247 |
-
this License, you may choose any version ever published by the Free Software
|
248 |
-
Foundation.
|
249 |
-
|
250 |
-
10. If you wish to incorporate parts of the Program into other free
|
251 |
-
programs whose distribution conditions are different, write to the author
|
252 |
-
to ask for permission. For software which is copyrighted by the Free
|
253 |
-
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
-
make exceptions for this. Our decision will be guided by the two goals
|
255 |
-
of preserving the free status of all derivatives of our free software and
|
256 |
-
of promoting the sharing and reuse of software generally.
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
-
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
-
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
-
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
-
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
-
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
-
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
-
REPAIR OR CORRECTION.
|
269 |
-
|
270 |
-
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
-
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
-
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
-
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
-
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
-
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
-
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
-
POSSIBILITY OF SUCH DAMAGES.
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
GNU GENERAL PUBLIC LICENSE
|
2 |
+
Version 2, June 1991
|
3 |
+
|
4 |
+
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
5 |
+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
+
Everyone is permitted to copy and distribute verbatim copies
|
7 |
+
of this license document, but changing it is not allowed.
|
8 |
+
|
9 |
+
Preamble
|
10 |
+
|
11 |
+
The licenses for most software are designed to take away your
|
12 |
+
freedom to share and change it. By contrast, the GNU General Public
|
13 |
+
License is intended to guarantee your freedom to share and change free
|
14 |
+
software--to make sure the software is free for all its users. This
|
15 |
+
General Public License applies to most of the Free Software
|
16 |
+
Foundation's software and to any other program whose authors commit to
|
17 |
+
using it. (Some other Free Software Foundation software is covered by
|
18 |
+
the GNU Lesser General Public License instead.) You can apply it to
|
19 |
+
your programs, too.
|
20 |
+
|
21 |
+
When we speak of free software, we are referring to freedom, not
|
22 |
+
price. Our General Public Licenses are designed to make sure that you
|
23 |
+
have the freedom to distribute copies of free software (and charge for
|
24 |
+
this service if you wish), that you receive source code or can get it
|
25 |
+
if you want it, that you can change the software or use pieces of it
|
26 |
+
in new free programs; and that you know you can do these things.
|
27 |
+
|
28 |
+
To protect your rights, we need to make restrictions that forbid
|
29 |
+
anyone to deny you these rights or to ask you to surrender the rights.
|
30 |
+
These restrictions translate to certain responsibilities for you if you
|
31 |
+
distribute copies of the software, or if you modify it.
|
32 |
+
|
33 |
+
For example, if you distribute copies of such a program, whether
|
34 |
+
gratis or for a fee, you must give the recipients all the rights that
|
35 |
+
you have. You must make sure that they, too, receive or can get the
|
36 |
+
source code. And you must show them these terms so they know their
|
37 |
+
rights.
|
38 |
+
|
39 |
+
We protect your rights with two steps: (1) copyright the software, and
|
40 |
+
(2) offer you this license which gives you legal permission to copy,
|
41 |
+
distribute and/or modify the software.
|
42 |
+
|
43 |
+
Also, for each author's protection and ours, we want to make certain
|
44 |
+
that everyone understands that there is no warranty for this free
|
45 |
+
software. If the software is modified by someone else and passed on, we
|
46 |
+
want its recipients to know that what they have is not the original, so
|
47 |
+
that any problems introduced by others will not reflect on the original
|
48 |
+
authors' reputations.
|
49 |
+
|
50 |
+
Finally, any free program is threatened constantly by software
|
51 |
+
patents. We wish to avoid the danger that redistributors of a free
|
52 |
+
program will individually obtain patent licenses, in effect making the
|
53 |
+
program proprietary. To prevent this, we have made it clear that any
|
54 |
+
patent must be licensed for everyone's free use or not licensed at all.
|
55 |
+
|
56 |
+
The precise terms and conditions for copying, distribution and
|
57 |
+
modification follow.
|
58 |
+
|
59 |
+
GNU GENERAL PUBLIC LICENSE
|
60 |
+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
+
|
62 |
+
0. This License applies to any program or other work which contains
|
63 |
+
a notice placed by the copyright holder saying it may be distributed
|
64 |
+
under the terms of this General Public License. The "Program", below,
|
65 |
+
refers to any such program or work, and a "work based on the Program"
|
66 |
+
means either the Program or any derivative work under copyright law:
|
67 |
+
that is to say, a work containing the Program or a portion of it,
|
68 |
+
either verbatim or with modifications and/or translated into another
|
69 |
+
language. (Hereinafter, translation is included without limitation in
|
70 |
+
the term "modification".) Each licensee is addressed as "you".
|
71 |
+
|
72 |
+
Activities other than copying, distribution and modification are not
|
73 |
+
covered by this License; they are outside its scope. The act of
|
74 |
+
running the Program is not restricted, and the output from the Program
|
75 |
+
is covered only if its contents constitute a work based on the
|
76 |
+
Program (independent of having been made by running the Program).
|
77 |
+
Whether that is true depends on what the Program does.
|
78 |
+
|
79 |
+
1. You may copy and distribute verbatim copies of the Program's
|
80 |
+
source code as you receive it, in any medium, provided that you
|
81 |
+
conspicuously and appropriately publish on each copy an appropriate
|
82 |
+
copyright notice and disclaimer of warranty; keep intact all the
|
83 |
+
notices that refer to this License and to the absence of any warranty;
|
84 |
+
and give any other recipients of the Program a copy of this License
|
85 |
+
along with the Program.
|
86 |
+
|
87 |
+
You may charge a fee for the physical act of transferring a copy, and
|
88 |
+
you may at your option offer warranty protection in exchange for a fee.
|
89 |
+
|
90 |
+
2. You may modify your copy or copies of the Program or any portion
|
91 |
+
of it, thus forming a work based on the Program, and copy and
|
92 |
+
distribute such modifications or work under the terms of Section 1
|
93 |
+
above, provided that you also meet all of these conditions:
|
94 |
+
|
95 |
+
a) You must cause the modified files to carry prominent notices
|
96 |
+
stating that you changed the files and the date of any change.
|
97 |
+
|
98 |
+
b) You must cause any work that you distribute or publish, that in
|
99 |
+
whole or in part contains or is derived from the Program or any
|
100 |
+
part thereof, to be licensed as a whole at no charge to all third
|
101 |
+
parties under the terms of this License.
|
102 |
+
|
103 |
+
c) If the modified program normally reads commands interactively
|
104 |
+
when run, you must cause it, when started running for such
|
105 |
+
interactive use in the most ordinary way, to print or display an
|
106 |
+
announcement including an appropriate copyright notice and a
|
107 |
+
notice that there is no warranty (or else, saying that you provide
|
108 |
+
a warranty) and that users may redistribute the program under
|
109 |
+
these conditions, and telling the user how to view a copy of this
|
110 |
+
License. (Exception: if the Program itself is interactive but
|
111 |
+
does not normally print such an announcement, your work based on
|
112 |
+
the Program is not required to print an announcement.)
|
113 |
+
|
114 |
+
These requirements apply to the modified work as a whole. If
|
115 |
+
identifiable sections of that work are not derived from the Program,
|
116 |
+
and can be reasonably considered independent and separate works in
|
117 |
+
themselves, then this License, and its terms, do not apply to those
|
118 |
+
sections when you distribute them as separate works. But when you
|
119 |
+
distribute the same sections as part of a whole which is a work based
|
120 |
+
on the Program, the distribution of the whole must be on the terms of
|
121 |
+
this License, whose permissions for other licensees extend to the
|
122 |
+
entire whole, and thus to each and every part regardless of who wrote it.
|
123 |
+
|
124 |
+
Thus, it is not the intent of this section to claim rights or contest
|
125 |
+
your rights to work written entirely by you; rather, the intent is to
|
126 |
+
exercise the right to control the distribution of derivative or
|
127 |
+
collective works based on the Program.
|
128 |
+
|
129 |
+
In addition, mere aggregation of another work not based on the Program
|
130 |
+
with the Program (or with a work based on the Program) on a volume of
|
131 |
+
a storage or distribution medium does not bring the other work under
|
132 |
+
the scope of this License.
|
133 |
+
|
134 |
+
3. You may copy and distribute the Program (or a work based on it,
|
135 |
+
under Section 2) in object code or executable form under the terms of
|
136 |
+
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
+
|
138 |
+
a) Accompany it with the complete corresponding machine-readable
|
139 |
+
source code, which must be distributed under the terms of Sections
|
140 |
+
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
+
|
142 |
+
b) Accompany it with a written offer, valid for at least three
|
143 |
+
years, to give any third party, for a charge no more than your
|
144 |
+
cost of physically performing source distribution, a complete
|
145 |
+
machine-readable copy of the corresponding source code, to be
|
146 |
+
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
+
customarily used for software interchange; or,
|
148 |
+
|
149 |
+
c) Accompany it with the information you received as to the offer
|
150 |
+
to distribute corresponding source code. (This alternative is
|
151 |
+
allowed only for noncommercial distribution and only if you
|
152 |
+
received the program in object code or executable form with such
|
153 |
+
an offer, in accord with Subsection b above.)
|
154 |
+
|
155 |
+
The source code for a work means the preferred form of the work for
|
156 |
+
making modifications to it. For an executable work, complete source
|
157 |
+
code means all the source code for all modules it contains, plus any
|
158 |
+
associated interface definition files, plus the scripts used to
|
159 |
+
control compilation and installation of the executable. However, as a
|
160 |
+
special exception, the source code distributed need not include
|
161 |
+
anything that is normally distributed (in either source or binary
|
162 |
+
form) with the major components (compiler, kernel, and so on) of the
|
163 |
+
operating system on which the executable runs, unless that component
|
164 |
+
itself accompanies the executable.
|
165 |
+
|
166 |
+
If distribution of executable or object code is made by offering
|
167 |
+
access to copy from a designated place, then offering equivalent
|
168 |
+
access to copy the source code from the same place counts as
|
169 |
+
distribution of the source code, even though third parties are not
|
170 |
+
compelled to copy the source along with the object code.
|
171 |
+
|
172 |
+
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
+
except as expressly provided under this License. Any attempt
|
174 |
+
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
+
void, and will automatically terminate your rights under this License.
|
176 |
+
However, parties who have received copies, or rights, from you under
|
177 |
+
this License will not have their licenses terminated so long as such
|
178 |
+
parties remain in full compliance.
|
179 |
+
|
180 |
+
5. You are not required to accept this License, since you have not
|
181 |
+
signed it. However, nothing else grants you permission to modify or
|
182 |
+
distribute the Program or its derivative works. These actions are
|
183 |
+
prohibited by law if you do not accept this License. Therefore, by
|
184 |
+
modifying or distributing the Program (or any work based on the
|
185 |
+
Program), you indicate your acceptance of this License to do so, and
|
186 |
+
all its terms and conditions for copying, distributing or modifying
|
187 |
+
the Program or works based on it.
|
188 |
+
|
189 |
+
6. Each time you redistribute the Program (or any work based on the
|
190 |
+
Program), the recipient automatically receives a license from the
|
191 |
+
original licensor to copy, distribute or modify the Program subject to
|
192 |
+
these terms and conditions. You may not impose any further
|
193 |
+
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
+
You are not responsible for enforcing compliance by third parties to
|
195 |
+
this License.
|
196 |
+
|
197 |
+
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
+
infringement or for any other reason (not limited to patent issues),
|
199 |
+
conditions are imposed on you (whether by court order, agreement or
|
200 |
+
otherwise) that contradict the conditions of this License, they do not
|
201 |
+
excuse you from the conditions of this License. If you cannot
|
202 |
+
distribute so as to satisfy simultaneously your obligations under this
|
203 |
+
License and any other pertinent obligations, then as a consequence you
|
204 |
+
may not distribute the Program at all. For example, if a patent
|
205 |
+
license would not permit royalty-free redistribution of the Program by
|
206 |
+
all those who receive copies directly or indirectly through you, then
|
207 |
+
the only way you could satisfy both it and this License would be to
|
208 |
+
refrain entirely from distribution of the Program.
|
209 |
+
|
210 |
+
If any portion of this section is held invalid or unenforceable under
|
211 |
+
any particular circumstance, the balance of the section is intended to
|
212 |
+
apply and the section as a whole is intended to apply in other
|
213 |
+
circumstances.
|
214 |
+
|
215 |
+
It is not the purpose of this section to induce you to infringe any
|
216 |
+
patents or other property right claims or to contest validity of any
|
217 |
+
such claims; this section has the sole purpose of protecting the
|
218 |
+
integrity of the free software distribution system, which is
|
219 |
+
implemented by public license practices. Many people have made
|
220 |
+
generous contributions to the wide range of software distributed
|
221 |
+
through that system in reliance on consistent application of that
|
222 |
+
system; it is up to the author/donor to decide if he or she is willing
|
223 |
+
to distribute software through any other system and a licensee cannot
|
224 |
+
impose that choice.
|
225 |
+
|
226 |
+
This section is intended to make thoroughly clear what is believed to
|
227 |
+
be a consequence of the rest of this License.
|
228 |
+
|
229 |
+
8. If the distribution and/or use of the Program is restricted in
|
230 |
+
certain countries either by patents or by copyrighted interfaces, the
|
231 |
+
original copyright holder who places the Program under this License
|
232 |
+
may add an explicit geographical distribution limitation excluding
|
233 |
+
those countries, so that distribution is permitted only in or among
|
234 |
+
countries not thus excluded. In such case, this License incorporates
|
235 |
+
the limitation as if written in the body of this License.
|
236 |
+
|
237 |
+
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
+
of the General Public License from time to time. Such new versions will
|
239 |
+
be similar in spirit to the present version, but may differ in detail to
|
240 |
+
address new problems or concerns.
|
241 |
+
|
242 |
+
Each version is given a distinguishing version number. If the Program
|
243 |
+
specifies a version number of this License which applies to it and "any
|
244 |
+
later version", you have the option of following the terms and conditions
|
245 |
+
either of that version or of any later version published by the Free
|
246 |
+
Software Foundation. If the Program does not specify a version number of
|
247 |
+
this License, you may choose any version ever published by the Free Software
|
248 |
+
Foundation.
|
249 |
+
|
250 |
+
10. If you wish to incorporate parts of the Program into other free
|
251 |
+
programs whose distribution conditions are different, write to the author
|
252 |
+
to ask for permission. For software which is copyrighted by the Free
|
253 |
+
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
+
make exceptions for this. Our decision will be guided by the two goals
|
255 |
+
of preserving the free status of all derivatives of our free software and
|
256 |
+
of promoting the sharing and reuse of software generally.
|
257 |
+
|
258 |
+
NO WARRANTY
|
259 |
+
|
260 |
+
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
+
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
+
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
+
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
+
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
+
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
+
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
+
REPAIR OR CORRECTION.
|
269 |
+
|
270 |
+
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
+
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
+
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
+
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
+
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
+
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
+
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
+
POSSIBILITY OF SUCH DAMAGES.
|
279 |
+
|
280 |
+
END OF TERMS AND CONDITIONS
|
281 |
+
|
282 |
+
How to Apply These Terms to Your New Programs
|
283 |
+
|
284 |
+
If you develop a new program, and you want it to be of the greatest
|
285 |
+
possible use to the public, the best way to achieve this is to make it
|
286 |
+
free software which everyone can redistribute and change under these terms.
|
287 |
+
|
288 |
+
To do so, attach the following notices to the program. It is safest
|
289 |
+
to attach them to the start of each source file to most effectively
|
290 |
+
convey the exclusion of warranty; and each file should have at least
|
291 |
+
the "copyright" line and a pointer to where the full notice is found.
|
292 |
+
|
293 |
+
<one line to give the program's name and a brief idea of what it does.>
|
294 |
+
Copyright (C) <year> <name of author>
|
295 |
+
|
296 |
+
This program is free software; you can redistribute it and/or modify
|
297 |
+
it under the terms of the GNU General Public License as published by
|
298 |
+
the Free Software Foundation; either version 2 of the License, or
|
299 |
+
(at your option) any later version.
|
300 |
+
|
301 |
+
This program is distributed in the hope that it will be useful,
|
302 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
303 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
304 |
+
GNU General Public License for more details.
|
305 |
+
|
306 |
+
You should have received a copy of the GNU General Public License along
|
307 |
+
with this program; if not, write to the Free Software Foundation, Inc.,
|
308 |
+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
309 |
+
|
310 |
+
Also add information on how to contact you by electronic and paper mail.
|
311 |
+
|
312 |
+
If the program is interactive, make it output a short notice like this
|
313 |
+
when it starts in an interactive mode:
|
314 |
+
|
315 |
+
Gnomovision version 69, Copyright (C) year name of author
|
316 |
+
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
317 |
+
This is free software, and you are welcome to redistribute it
|
318 |
+
under certain conditions; type `show c' for details.
|
319 |
+
|
320 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
321 |
+
parts of the General Public License. Of course, the commands you use may
|
322 |
+
be called something other than `show w' and `show c'; they could even be
|
323 |
+
mouse-clicks or menu items--whatever suits your program.
|
324 |
+
|
325 |
+
You should also get your employer (if you work as a programmer) or your
|
326 |
+
school, if any, to sign a "copyright disclaimer" for the program, if
|
327 |
+
necessary. Here is a sample; alter the names:
|
328 |
+
|
329 |
+
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
330 |
+
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
331 |
+
|
332 |
+
<signature of Ty Coon>, 1 April 1989
|
333 |
+
Ty Coon, President of Vice
|
334 |
+
|
335 |
+
This General Public License does not permit incorporating your program into
|
336 |
+
proprietary programs. If your program is a subroutine library, you may
|
337 |
+
consider it more useful to permit linking proprietary applications with the
|
338 |
+
library. If this is what you want to do, use the GNU Lesser General
|
339 |
+
Public License instead of this License.
|
readme.txt
CHANGED
@@ -1,154 +1,208 @@
|
|
1 |
-
=== Google Calendar Events ===
|
2 |
-
Contributors: rosshanney
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
*
|
19 |
-
*
|
20 |
-
*
|
21 |
-
*
|
22 |
-
*
|
23 |
-
*
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
1.
|
46 |
-
1.
|
47 |
-
1. A
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
=
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
*
|
79 |
-
*
|
80 |
-
*
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
*
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
*
|
89 |
-
*
|
90 |
-
*
|
91 |
-
|
92 |
-
= 0.
|
93 |
-
|
94 |
-
*
|
95 |
-
*
|
96 |
-
*
|
97 |
-
*
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
*
|
102 |
-
*
|
103 |
-
*
|
104 |
-
*
|
105 |
-
*
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
*
|
110 |
-
|
111 |
-
|
112 |
-
*
|
113 |
-
*
|
114 |
-
|
115 |
-
|
116 |
-
*
|
117 |
-
*
|
118 |
-
|
119 |
-
= 0.
|
120 |
-
|
121 |
-
*
|
122 |
-
*
|
123 |
-
*
|
124 |
-
*
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
*
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
*
|
142 |
-
*
|
143 |
-
|
144 |
-
|
145 |
-
*
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Google Calendar Events ===
|
2 |
+
Contributors: pderksen, nickyoung87, rosshanney
|
3 |
+
Tags: google calendar, google, calendar, events, gcal
|
4 |
+
Requires at least: 3.7.4
|
5 |
+
Tested up to: 4.0
|
6 |
+
Stable tag: 0.7.3.1
|
7 |
+
License: GPLv2 or later
|
8 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
+
|
10 |
+
Parses Google Calendar feeds and displays the events as a calendar grid or list on a page, post or widget.
|
11 |
+
|
12 |
+
== Description ==
|
13 |
+
|
14 |
+
Parses Google Calendar feeds and displays the events as a calendar grid or list on a page, post or widget.
|
15 |
+
|
16 |
+
= Features =
|
17 |
+
|
18 |
+
* Parses Google Calendar feeds to extract events
|
19 |
+
* Displays events as a list or within a calendar grid
|
20 |
+
* Events from multiple Google Calendar feeds can be shown in a single list / grid
|
21 |
+
* Lists and grids can be displayed in posts, pages or within a widget
|
22 |
+
* Options to change the number of events retrieved, date / time format, cache duration etc
|
23 |
+
* Complete customisation of the event information displayed
|
24 |
+
* Calendar grids can have the ability to change the month displayed
|
25 |
+
|
26 |
+
[Plugin Documentation & Getting Started](http://wpdocs.philderksen.com/google-calendar-events/?utm_source=wordpress_org&utm_medium=link&utm_campaign=gce_lite)
|
27 |
+
|
28 |
+
###Feature Requests and Updates###
|
29 |
+
|
30 |
+
* [Submit feature requests in our support forums](https://wordpress.org/support/plugin/google-calendar-events)
|
31 |
+
* [Get notified of major feature updates](http://eepurl.com/0_VsT)
|
32 |
+
* [Follow this project on Github](https://github.com/pderksen/WP-Google-Calendar-Events)
|
33 |
+
|
34 |
+
This plugin was originally created by [Ross Hanney](http://www.rhanney.co.uk), a web developer based in the UK specialising in WordPress and PHP.
|
35 |
+
|
36 |
+
== Installation ==
|
37 |
+
|
38 |
+
There are three ways to install this plugin.
|
39 |
+
|
40 |
+
= 1. Admin Search =
|
41 |
+
1. In your Admin, go to menu Plugins > Add.
|
42 |
+
1. Search for `Google Calendar`.
|
43 |
+
1. Find the plugin that's labeled `Google Calendar Events`.
|
44 |
+
1. Look for the author name `Phil Derksen` on the plugin.
|
45 |
+
1. Click to install.
|
46 |
+
1. Activate the plugin.
|
47 |
+
1. A new menu item `GCal Events` will appear in the main menu.
|
48 |
+
|
49 |
+
= 2. Download & Upload =
|
50 |
+
1. Download the plugin (a zip file) on the right column of this page.
|
51 |
+
1. In your Admin, go to menu Plugins > Add.
|
52 |
+
1. Select the tab "Upload".
|
53 |
+
1. Upload the .zip file you just downloaded.
|
54 |
+
1. Activate the plugin.
|
55 |
+
1. A new menu item `GCal Events` will appear in the main menu.
|
56 |
+
|
57 |
+
= 3. FTP Upload =
|
58 |
+
1. Download the plugin (.zip file) on the right column of this page.
|
59 |
+
1. Unzip the zip file contents.
|
60 |
+
1. Upload the `google-calendar-events` folder to the `/wp-content/plugins/` directory of your site.
|
61 |
+
1. Activate the plugin through the 'Plugins' menu in WordPress.
|
62 |
+
1. A new menu item `GCal Events` will appear in the main menu.
|
63 |
+
|
64 |
+
== Frequently Asked Questions ==
|
65 |
+
|
66 |
+
[Plugin Documentation & Getting Started](http://wpdocs.philderksen.com/google-calendar-events/?utm_source=wordpress_org&utm_medium=link&utm_campaign=gce_lite)
|
67 |
+
|
68 |
+
== Screenshots ==
|
69 |
+
|
70 |
+
1. The main plugin admin screen.
|
71 |
+
1. The add feed admin screen.
|
72 |
+
1. A page showing a full page calendar grid and various widgets.
|
73 |
+
|
74 |
+
== Changelog ==
|
75 |
+
|
76 |
+
= 2.0.0 =
|
77 |
+
|
78 |
+
* Plugin architecture/code rewrite.
|
79 |
+
* Now using custom post types for storing and customizing Google calendar feeds.
|
80 |
+
* Introduced the shortcode `[gcal]` (old shortcode still supported).
|
81 |
+
|
82 |
+
= 0.7.3.1 =
|
83 |
+
|
84 |
+
* Include missing file: upgrade-notice.php.
|
85 |
+
|
86 |
+
= 0.7.3 =
|
87 |
+
|
88 |
+
* Added warning about upcoming version 2.0 release.
|
89 |
+
* Added option to save settings upon uninstall.
|
90 |
+
* Tested with WordPress 4.0.
|
91 |
+
|
92 |
+
= 0.7.2 =
|
93 |
+
|
94 |
+
* Fixed a bug causing the "More details" Google Calendar information to be displayed in the wrong timezone
|
95 |
+
* Fixed a bug that prevented setting the cache duration to 0 from working correctly
|
96 |
+
* Fixed an issue that prevented Ajax from working with FORCE_SSL_ADMIN enabled
|
97 |
+
* Now uses [wp_enqueue_scripts](http://wpdevel.wordpress.com/2011/12/12/use-wp_enqueue_scripts-not-wp_print_styles-to-enqueue-scripts-and-styles-for-the-frontend/)
|
98 |
+
|
99 |
+
= 0.7.1 =
|
100 |
+
|
101 |
+
* Fixed bug causing AJAX enabled calendar grids to not function correctly
|
102 |
+
* Fixed bug causing all-day events from outside required date range to be displayed
|
103 |
+
* Fixed bug causing tooltip date title heading setting to be ignored
|
104 |
+
* Added further data sanitisation on output
|
105 |
+
* Feeds with no events will now be cached to prevent HTTP requests on every page load
|
106 |
+
|
107 |
+
= 0.7 =
|
108 |
+
|
109 |
+
* Fixed bug causing event dates / times to be displayed in the wrong timezone
|
110 |
+
* Changed the [link-path] Event Display Builder shortcode to [url]
|
111 |
+
* Fixed an Opera specific CSS issue causing page lists to be hidden
|
112 |
+
* Lists can now be displayed in descending or ascending order
|
113 |
+
* Added [event-id] and [cal-id] Event Display Builder shortcodes
|
114 |
+
* Added an offset parameter for date / time based Event Display Builder shortcodes
|
115 |
+
* Added an autolink parameter for enabling / disabling automatic linking of URLs
|
116 |
+
* Added gce-day-past or gce-day-future classes to calendar grid cells
|
117 |
+
* Cleaned up CSS
|
118 |
+
|
119 |
+
= 0.6 =
|
120 |
+
|
121 |
+
* Drastically reduced memory usage
|
122 |
+
* Improved feed data caching system
|
123 |
+
* Improved error reporting
|
124 |
+
* General performance and efficiency improvements
|
125 |
+
* Added a few more shortcodes to the event display builder
|
126 |
+
* Other [miscellaneous changes / additions and bug fixes](http://www.rhanney.co.uk/2011/04/29/google-calendar-events-0-6)
|
127 |
+
|
128 |
+
= 0.5 =
|
129 |
+
|
130 |
+
* Added [event display builder](http://www.rhanney.co.uk/plugins/google-calendar-events/event-display-builder) feature, which vastly improves the customization possibilities of the plugin. This feature encompasses many of the most requested features, such as:
|
131 |
+
- All-day events can be handled differently than 'normal' events
|
132 |
+
- Start and end times / dates can be displayed on the same line (as can any other event information)
|
133 |
+
- HTML (and Markdown) entered in Google Calendar fields can be properly parsed
|
134 |
+
* Start and end times for retrieval of events are now much more flexible
|
135 |
+
* A custom error message for non-admin users can now be specified
|
136 |
+
* No longer loads SimplePie when it is not required
|
137 |
+
|
138 |
+
= 0.4.1 =
|
139 |
+
|
140 |
+
* Fix / workaround for the long-running timezone bug. Please take a look at [this](http://www.rhanney.co.uk/2011/01/16/google-calendar-events-0-4-1) for more information.
|
141 |
+
* Added additional 'Maximum no. events to display' option to widget / shortcode (mainly to address a further issue caused by the above fix)
|
142 |
+
* i18n related bug fix
|
143 |
+
* Added support for widget_title filter (courtesy of [James](http://lunasea-studios.com))
|
144 |
+
* Added Hungarian (hu_HU) translation ([danieltakacs](http://ek.klog.hu))
|
145 |
+
* Now using minified version of jQuery qTip script
|
146 |
+
|
147 |
+
= 0.4 =
|
148 |
+
|
149 |
+
* More control over how start and end dates / times are displayed
|
150 |
+
* Events can now be limited to a specified timeframe (number of days)
|
151 |
+
* Events on the same day in lists can now be shown under a single date title
|
152 |
+
* JavaScript can now be added to the footer rather than the header, via an option
|
153 |
+
* The 'Loading...' text can now be customized
|
154 |
+
* Description text can now be limited to a specified number of words
|
155 |
+
* Multi-day events can be shown on each day that they span ([sort of](http://www.rhanney.co.uk/2010/08/19/google-calendar-events-0-4#multiday))
|
156 |
+
* Bug fixes
|
157 |
+
* i18n / l10n fixes
|
158 |
+
|
159 |
+
= 0.3.1 =
|
160 |
+
|
161 |
+
* l10n / i18n fixes. Dates should now be localized correctly and should maintain localization after an AJAX request
|
162 |
+
* MU / Multi-site issues. Issues preventing adding of feeds have been addressed
|
163 |
+
|
164 |
+
= 0.3 =
|
165 |
+
|
166 |
+
* Now allows events from multiple Google Calendar feeds to be displayed on a single calendar grid / list
|
167 |
+
* Internationalization support added
|
168 |
+
|
169 |
+
= 0.2.1 =
|
170 |
+
|
171 |
+
* Added option to allow 'More details' links to open in new window / tab.
|
172 |
+
* Added option to choose a specific timezone for each feed
|
173 |
+
* Line breaks in an event description will now be preserved
|
174 |
+
* Fixed a bug casing the title to not be displayed on lists
|
175 |
+
* Other minor bug fixes
|
176 |
+
|
177 |
+
= 0.2 =
|
178 |
+
|
179 |
+
* Added customization options for how information is displayed.
|
180 |
+
* Can now display: start time, end time and date, location, description and event link.
|
181 |
+
* Tooltips now using qTip jQuery plugin.
|
182 |
+
|
183 |
+
= 0.1.4 =
|
184 |
+
|
185 |
+
* More bug fixes.
|
186 |
+
|
187 |
+
= 0.1.3 =
|
188 |
+
|
189 |
+
* Several bug fixes, including fixing JavaScript problems that prevented tooltips appearing.
|
190 |
+
|
191 |
+
= 0.1.2 =
|
192 |
+
|
193 |
+
* Bug fixes.
|
194 |
+
|
195 |
+
= 0.1.1 =
|
196 |
+
|
197 |
+
* Fix to prevent conflicts with other plugins.
|
198 |
+
* Changes to readme.txt.
|
199 |
+
|
200 |
+
= 0.1 =
|
201 |
+
|
202 |
+
* Initial release.
|
203 |
+
|
204 |
+
== Upgrade Notice ==
|
205 |
+
|
206 |
+
= 2.0.0 =
|
207 |
+
|
208 |
+
This is a major upgrade to a new code base and structure. PLEASE make sure you backup your site before upgrading.
|
screenshot-1.jpg
DELETED
Binary file
|
screenshot-2.jpg
DELETED
Binary file
|
screenshot-3.jpg
DELETED
Binary file
|
uninstall.php
CHANGED
@@ -1,21 +1,69 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Fired when the plugin is uninstalled.
|
4 |
+
*
|
5 |
+
* @package GCE
|
6 |
+
* @author Phil Derksen <pderksen@gmail.com>, Nick Young <mycorpweb@gmail.com>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @copyright 2014 Phil Derksen
|
9 |
+
*/
|
10 |
+
|
11 |
+
// If uninstall not called from WordPress, then exit
|
12 |
+
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
$general = get_option( 'gce_settings_general' );
|
17 |
+
|
18 |
+
// If this is empty then it means it is unchecked and we should delete everything
|
19 |
+
if ( empty( $general['save_settings'] ) ) {
|
20 |
+
|
21 |
+
/*** VERSION 2.0.0 GCE OPTIONS ***/
|
22 |
+
|
23 |
+
// Remove CPTs and transients
|
24 |
+
$feeds = get_posts( array(
|
25 |
+
'post_type' => 'gce_feed',
|
26 |
+
'post_status' => array(
|
27 |
+
'any',
|
28 |
+
'trash',
|
29 |
+
'auto-draft'
|
30 |
+
)
|
31 |
+
));
|
32 |
+
|
33 |
+
foreach( $feeds as $f ) {
|
34 |
+
// delete the transient while we have the post ID available
|
35 |
+
delete_transient( 'gce_feed_' . $f->ID );
|
36 |
+
|
37 |
+
// Now delete the post
|
38 |
+
wp_delete_post( $f->ID, true );
|
39 |
+
}
|
40 |
+
|
41 |
+
// Remove all post meta
|
42 |
+
delete_post_meta_by_key( 'gce_feed_url' );
|
43 |
+
delete_post_meta_by_key( 'gce_retrieve_from' );
|
44 |
+
delete_post_meta_by_key( 'gce_retrieve_until' );
|
45 |
+
delete_post_meta_by_key( 'gce_retrieve_max' );
|
46 |
+
delete_post_meta_by_key( 'gce_date_format' );
|
47 |
+
delete_post_meta_by_key( 'gce_time_format' );
|
48 |
+
delete_post_meta_by_key( 'gce_cache' );
|
49 |
+
delete_post_meta_by_key( 'gce_multi_day_events' );
|
50 |
+
delete_post_meta_by_key( 'gce_display_mode' );
|
51 |
+
delete_post_meta_by_key( 'gce_custom_from' );
|
52 |
+
delete_post_meta_by_key( 'gce_custom_until' );
|
53 |
+
|
54 |
+
// Remove options
|
55 |
+
delete_option( 'gce_upgrade_has_run' );
|
56 |
+
delete_option( 'gce_version' );
|
57 |
+
delete_option( 'gce_settings_general' );
|
58 |
+
delete_option( 'gce_cpt_setup' );
|
59 |
+
|
60 |
+
// Remove widgets
|
61 |
+
delete_option( 'widget_gce_widget' );
|
62 |
+
|
63 |
+
|
64 |
+
/*** OLD GCE VERSION OPTIONS ***/
|
65 |
+
|
66 |
+
delete_option( 'gce_options' );
|
67 |
+
delete_option( 'gce_general' );
|
68 |
+
delete_option( 'gce_clear_old_transients' );
|
69 |
+
}
|
views/admin/admin.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Represents the view for the administration dashboard.
|
5 |
+
*
|
6 |
+
* This includes the header, options, and other information that should provide
|
7 |
+
* The User Interface to the end user.
|
8 |
+
*
|
9 |
+
* @package GCE
|
10 |
+
* @author Phil Derksen <pderksen@gmail.com>, Nick Young <mycorpweb@gmail.com>
|
11 |
+
*/
|
12 |
+
|
13 |
+
// Exit if accessed directly.
|
14 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
15 |
+
exit;
|
16 |
+
}
|
17 |
+
|
18 |
+
//global $gce_options;
|
19 |
+
|
20 |
+
?>
|
21 |
+
|
22 |
+
<div class="wrap">
|
23 |
+
<?php settings_errors(); ?>
|
24 |
+
<div id="gce-settings">
|
25 |
+
<div id="gce-settings-content">
|
26 |
+
<h2><?php echo esc_html( get_admin_page_title() ); ?></h2>
|
27 |
+
|
28 |
+
<form method="post" action="options.php">
|
29 |
+
<?php
|
30 |
+
|
31 |
+
settings_fields( 'gce_settings_general' );
|
32 |
+
do_settings_sections( 'gce_settings_general' );
|
33 |
+
|
34 |
+
submit_button();
|
35 |
+
?>
|
36 |
+
</form>
|
37 |
+
</div><!-- #gce-settings-content -->
|
38 |
+
</div><!-- #gce-settings -->
|
39 |
+
</div><!-- .wrap -->
|
views/admin/display-options-meta.php
ADDED
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Display Options Post Meta Output
|
5 |
+
*
|
6 |
+
* @package GCE
|
7 |
+
* @author Phil Derksen <pderksen@gmail.com>, Nick Young <mycorpweb@gmail.com>
|
8 |
+
* @license GPL-2.0+
|
9 |
+
* @copyright 2014 Phil Derksen
|
10 |
+
*/
|
11 |
+
|
12 |
+
global $post;
|
13 |
+
|
14 |
+
$post_id = $post->ID;
|
15 |
+
|
16 |
+
// Load up all post meta data
|
17 |
+
$gce_display_start = get_post_meta( $post->ID, 'gce_display_start', true );
|
18 |
+
$gce_display_start_text = get_post_meta( $post->ID, 'gce_display_start_text', true );
|
19 |
+
$gce_display_end = get_post_meta( $post->ID, 'gce_display_end', true );
|
20 |
+
$gce_display_end_text = get_post_meta( $post->ID, 'gce_display_end_text', true );
|
21 |
+
$gce_display_separator = get_post_meta( $post->ID, 'gce_display_separator', true );
|
22 |
+
$gce_display_location = get_post_meta( $post->ID, 'gce_display_location', true );
|
23 |
+
$gce_display_location_text = get_post_meta( $post->ID, 'gce_display_location_text', true );
|
24 |
+
$gce_display_description = get_post_meta( $post->ID, 'gce_display_description', true );
|
25 |
+
$gce_display_description_text = get_post_meta( $post->ID, 'gce_display_description_text', true );
|
26 |
+
$gce_display_description_max = get_post_meta( $post->ID, 'gce_display_description_max', true );
|
27 |
+
$gce_display_link = get_post_meta( $post->ID, 'gce_display_link', true );
|
28 |
+
$gce_display_link_tab = get_post_meta( $post->ID, 'gce_display_link_tab', true );
|
29 |
+
$gce_display_link_text = get_post_meta( $post->ID, 'gce_display_link_text', true );
|
30 |
+
$gce_display_simple = get_post_meta( $post->ID, 'gce_display_simple', true );
|
31 |
+
|
32 |
+
?>
|
33 |
+
|
34 |
+
|
35 |
+
<div id="gce-display-options-wrap">
|
36 |
+
<div class="gce-meta-control">
|
37 |
+
<p>
|
38 |
+
<input type="checkbox" name="gce_display_simple" id="gce_display_simple" value="1" <?php checked( $gce_display_simple, '1' ); ?> />
|
39 |
+
<label for="gce_display_simple"><?php _e( 'Use the simple display options below instead of the Event Builder', 'gce' ); ?></label>
|
40 |
+
</p>
|
41 |
+
</div>
|
42 |
+
|
43 |
+
<div class="gce-meta-control">
|
44 |
+
<strong><?php _e( 'Start date / time display', 'gce' ); ?></strong>
|
45 |
+
<label class="description" for="gce_display_start"><?php _e( 'Select how to display the start date / time.', 'gce' ); ?></label>
|
46 |
+
<select name="gce_display_start" id="gce_display_start">
|
47 |
+
<option value="none" <?php selected( $gce_display_start, 'none', true ); ?>><?php _e( 'None', 'gce' ); ?></option>
|
48 |
+
<option value="time" <?php selected( $gce_display_start, 'time', true ); ?>><?php _e( 'Start time', 'gce' ); ?></option>
|
49 |
+
<option value="date" <?php selected( $gce_display_start, 'date', true ); ?>><?php _e( 'Start date', 'gce' ); ?></option>
|
50 |
+
<option value="time-date" <?php selected( $gce_display_start, 'time-date', true ); ?>><?php _e( 'Start time and date', 'gce' ); ?></option>
|
51 |
+
<option value="date-time" <?php selected( $gce_display_start, 'date-time', true ); ?>><?php _e( 'Start date and time', 'gce' ); ?></option>
|
52 |
+
</select>
|
53 |
+
<label class="description" for="gce_display_start_text"><?php _e( 'Text to display before the start time.', 'gce' ); ?></label>
|
54 |
+
<input type="text" name="gce_display_start_text" id="gce_display_start_text" value="<?php echo $gce_display_start_text; ?>" />
|
55 |
+
</div>
|
56 |
+
|
57 |
+
<div class="gce-meta-control">
|
58 |
+
<strong><?php _e( 'End time/date display', 'gce' ); ?></strong>
|
59 |
+
<label class="description" for="gce_display_end"><?php _e( 'Select how to display the end date / time.', 'gce' ); ?></label>
|
60 |
+
<select name="gce_display_end" id="gce_display_end">
|
61 |
+
<option value="none" <?php selected( $gce_display_end, 'none', true ); ?>><?php _e( 'None', 'gce' ); ?></option>
|
62 |
+
<option value="time" <?php selected( $gce_display_end, 'time', true ); ?>><?php _e( 'End time', 'gce' ); ?></option>
|
63 |
+
<option value="date" <?php selected( $gce_display_end, 'date', true ); ?>><?php _e( 'End date', 'gce' ); ?></option>
|
64 |
+
<option value="time-date" <?php selected( $gce_display_end, 'time-date', true ); ?>><?php _e( 'End time and date', 'gce' ); ?></option>
|
65 |
+
<option value="date-time" <?php selected( $gce_display_end, 'date-time', true ); ?>><?php _e( 'End date and time', 'gce' ); ?></option>
|
66 |
+
</select>
|
67 |
+
<label class="description" for="gce_display_end_text"><?php _e( 'Text to display before the end time.', 'gce' ); ?></label>
|
68 |
+
<input type="text" name="gce_display_end_text" id="gce_display_end_text" value="<?php echo $gce_display_end_text; ?>" />
|
69 |
+
</div>
|
70 |
+
|
71 |
+
<div class="gce-meta-control">
|
72 |
+
<strong><?php _e( 'Separator', 'gce' ); ?></strong>
|
73 |
+
<label class="description" for="gce_display_separator">
|
74 |
+
<?php _e( 'If you have chosen to display both the time and date above, enter the text / characters to display between the time and date here (including any spaces).' , 'gce' ); ?>
|
75 |
+
</label>
|
76 |
+
<input type="text" name="gce_display_separator" id="gce_display_separator" value="<?php echo $gce_display_separator; ?>" />
|
77 |
+
</div>
|
78 |
+
|
79 |
+
<div class="gce-meta-control">
|
80 |
+
<strong>Location</strong>
|
81 |
+
<p><input type="checkbox" name="gce_display_location" id="gce_display_location" value="1" <?php checked( $gce_display_location, '1' ); ?> />
|
82 |
+
<label for="gce_display_location">Show the location of events?</label></p>
|
83 |
+
<label class="description" for="gce_display_location_text">Text to display before the location.</label>
|
84 |
+
<input type="text" name="gce_display_location_text" id="gce_display_location_text" value="<?php echo $gce_display_location_text; ?>" />
|
85 |
+
</div>
|
86 |
+
|
87 |
+
<div class="gce-meta-control">
|
88 |
+
<strong><?php _e( 'Description', 'gce' ); ?></strong>
|
89 |
+
<p>
|
90 |
+
<input type="checkbox" name="gce_display_description" id="gce_display_description" value="1" <?php checked( $gce_display_description, '1' ); ?> />
|
91 |
+
<label for="gce_display_description"><?php _e( 'Show the description of events? (URLs in the description will be made into links).', 'gce' ); ?></label>
|
92 |
+
</p>
|
93 |
+
<label class="description" for="gce_display_description_text"><?php _e( 'Text to display before the description.', 'gce' ); ?></label>
|
94 |
+
<input type="text" name="gce_display_description_text" id="gce_display_description_text" value="<?php echo $gce_display_description_text; ?>" />
|
95 |
+
<label class="description" for="gce_display_description_max"><?php _e( 'Maximum number of words to show from description. Leave blank for no limit.', 'gce' ); ?></label>
|
96 |
+
<input type="text" name="gce_display_description_max" id="gce_display_description_max" value="<?php echo $gce_display_description_max; ?>" />
|
97 |
+
</div>
|
98 |
+
|
99 |
+
<div class="gce-meta-control">
|
100 |
+
<strong><?php _e( 'Event Link', 'gce' ); ?></strong>
|
101 |
+
<p>
|
102 |
+
<input type="checkbox" name="gce_display_link" id="gce_display_link" value="1" <?php checked( $gce_display_link, '1' ); ?> />
|
103 |
+
<label for="gce_display_link"><?php _e( 'Show a link to the Google Calendar page for an event?', 'gce' ); ?></label>
|
104 |
+
</p>
|
105 |
+
<p>
|
106 |
+
<input type="checkbox" name="gce_display_link_tab" id="gce_display_link_tab" value="1" <?php checked( $gce_display_link_tab, '1' ); ?> />
|
107 |
+
<label for="gce_display_link_tab"><?php _e( 'Links open in a new window / tab?', 'gce' ); ?></label>
|
108 |
+
</p>
|
109 |
+
<label class="description" for="gce_display_link_text"><?php _e( 'The link text to be displayed.', 'gce' ); ?></label>
|
110 |
+
<input type="text" name="gce_display_link_text" id="gce_display_link_text" value="<?php echo $gce_display_link_text; ?>" />
|
111 |
+
</div>
|
112 |
+
</div>
|
views/admin/gce-feed-meta-display.php
ADDED
@@ -0,0 +1,226 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Display for Feed Custom Post Types
|
5 |
+
*
|
6 |
+
* @package GCE
|
7 |
+
* @author Phil Derksen <pderksen@gmail.com>, Nick Young <mycorpweb@gmail.com>
|
8 |
+
* @license GPL-2.0+
|
9 |
+
* @copyright 2014 Phil Derksen
|
10 |
+
*/
|
11 |
+
|
12 |
+
global $post;
|
13 |
+
|
14 |
+
$post_id = $post->ID;
|
15 |
+
|
16 |
+
// Clear the cache if the button was clicked to do so
|
17 |
+
if( isset( $_GET['clear_cache'] ) && $_GET['clear_cache'] == 1 ) {
|
18 |
+
gce_clear_cache( $post_id );
|
19 |
+
}
|
20 |
+
|
21 |
+
// Load up all post meta data
|
22 |
+
$gce_feed_url = get_post_meta( $post->ID, 'gce_feed_url', true );
|
23 |
+
$gce_retrieve_from = get_post_meta( $post->ID, 'gce_retrieve_from', true );
|
24 |
+
$gce_retrieve_until = get_post_meta( $post->ID, 'gce_retrieve_until', true );
|
25 |
+
$gce_retrieve_max = get_post_meta( $post->ID, 'gce_retrieve_max', true );
|
26 |
+
$gce_date_format = get_post_meta( $post->ID, 'gce_date_format', true );
|
27 |
+
$gce_time_format = get_post_meta( $post->ID, 'gce_time_format', true );
|
28 |
+
$gce_cache = get_post_meta( $post->ID, 'gce_cache', true );
|
29 |
+
$gce_multi_day_events = get_post_meta( $post->ID, 'gce_multi_day_events', true );
|
30 |
+
$gce_display_mode = get_post_meta( $post->ID, 'gce_display_mode', true );
|
31 |
+
$gce_custom_from = get_post_meta( $post->ID, 'gce_custom_from', true );
|
32 |
+
$gce_custom_until = get_post_meta( $post->ID, 'gce_custom_until', true );
|
33 |
+
$gce_search_query = get_post_meta( $post->ID, 'gce_search_query', true );
|
34 |
+
$gce_expand_recurring = get_post_meta( $post->ID, 'gce_expand_recurring', true );
|
35 |
+
?>
|
36 |
+
|
37 |
+
<div id="gce-admin-promo">
|
38 |
+
<?php echo __( 'We\'re <strong>smack dab</strong> in the middle of building additional features for this plugin. Have ideas?', 'gce' ); ?>
|
39 |
+
<strong>
|
40 |
+
<a href="http://wordpress.org/support/topic/what-features-would-you-like-to-see-2" target="_blank">
|
41 |
+
<?php echo __( 'Tell us what you\'re looking for', 'gce' ); ?>
|
42 |
+
</a>
|
43 |
+
</strong>
|
44 |
+
<br/>
|
45 |
+
<br/>
|
46 |
+
|
47 |
+
<?php echo __( 'Want to know when we release something new?', 'gce' ); ?>
|
48 |
+
<strong>
|
49 |
+
<a href="http://eepurl.com/0_VsT" target="_blank">
|
50 |
+
<?php echo __( 'Get notified of major plugin updates', 'gce' ); ?>
|
51 |
+
</a>
|
52 |
+
</strong>
|
53 |
+
</div>
|
54 |
+
|
55 |
+
<table class="form-table">
|
56 |
+
<tr>
|
57 |
+
<th scope="row"><?php _e( 'Feed Shortcode', 'gce' ); ?></th>
|
58 |
+
<td>
|
59 |
+
<code>[gcal id="<?php echo $post_id; ?>"]</code>
|
60 |
+
<p class="description"><?php _e( 'Use this shortcode to display this Google Calendar feed in any post or page.', 'gce' ); ?></p>
|
61 |
+
</td>
|
62 |
+
</tr>
|
63 |
+
<tr>
|
64 |
+
<th scope="row"><label for="gce_feed_url"><?php _e( 'Feed URL', 'gce' ); ?></label></th>
|
65 |
+
<td>
|
66 |
+
<input type="text" class="large-text" name="gce_feed_url" id="gce_feed_url" value="<?php echo $gce_feed_url; ?>" />
|
67 |
+
<p class="description"><?php _e( 'The XML URL to your feed.', 'gce' ); ?></p>
|
68 |
+
</td>
|
69 |
+
</tr>
|
70 |
+
|
71 |
+
<tr>
|
72 |
+
<th scope="row"><label for="gce_search_query"><?php _e( 'Search Query', 'gce' ); ?></label></th>
|
73 |
+
<td>
|
74 |
+
<input type="text" class="" name="gce_search_query" id="gce_search_query" value="<?php echo $gce_search_query; ?>" />
|
75 |
+
<p class="description"><?php _e( 'Find and show events based on a search query.', 'gce' ); ?></p>
|
76 |
+
</td>
|
77 |
+
</tr>
|
78 |
+
|
79 |
+
<tr>
|
80 |
+
<th scope="row"><label for="gce_expand_recurring"><?php _e( 'Expand Recurring Events?', 'gce' ); ?></label></th>
|
81 |
+
<td>
|
82 |
+
<input type="checkbox" name="gce_expand_recurring" id="gce_expand_recurring" value="1" <?php checked( $gce_expand_recurring, '1' ); ?> /> <?php _e( 'Yes', 'gce' ); ?>
|
83 |
+
<p class="description"><?php _e( 'This will show recurring events each time they occur, otherwise it will only show the event the first time it occurs.', 'gce' ); ?></p>
|
84 |
+
</td>
|
85 |
+
</tr>
|
86 |
+
|
87 |
+
<tr>
|
88 |
+
<th scope="row"><label for="gce_retrieve_from"><?php _e( 'Retrieve Events From', 'gce' ); ?></label></th>
|
89 |
+
<td>
|
90 |
+
<select name="gce_retrieve_from" id="gce_retrieve_from">
|
91 |
+
<option value="today" <?php selected( $gce_retrieve_from, 'today', true ); ?>><?php _e( 'Today', 'gce' ); ?></option>
|
92 |
+
<option value="start_week" <?php selected( $gce_retrieve_from, 'start_week', true ); ?>><?php _e( 'Start of current week', 'gce' ); ?></option>
|
93 |
+
<option value="start_month" <?php selected( $gce_retrieve_from, 'start_month', true ); ?>><?php _e( 'Start of current month', 'gce' ); ?></option>
|
94 |
+
<option value="end_month" <?php selected( $gce_retrieve_from, 'end_month', true ); ?>><?php _e( 'End of current month', 'gce' ); ?></option>
|
95 |
+
<option value="start_time" <?php selected( $gce_retrieve_from, 'start_time', true ); ?>><?php _e( 'The beginning of time', 'gce' ); ?></option>
|
96 |
+
<option value="custom_date" <?php selected( $gce_retrieve_from, 'custom_date', true ); ?>><?php _e( 'Specific date', 'gce' ); ?></option>
|
97 |
+
</select>
|
98 |
+
<input type="text" <?php echo ( $gce_retrieve_from != 'custom_date' ? 'class="gce-admin-hidden" ' : ' ' ); ?> name="gce_custom_from" id="gce_custom_from" value="<?php echo $gce_custom_from; ?>" />
|
99 |
+
<p class="description"><?php _e( 'The point in time at which to start retrieving events.', 'gce' ); ?></p>
|
100 |
+
</td>
|
101 |
+
</tr>
|
102 |
+
|
103 |
+
<tr>
|
104 |
+
<th scope="row"><label for="gce_retrieve_until"><?php _e( 'Retrieve Events Until', 'gce' ); ?></label></th>
|
105 |
+
<td>
|
106 |
+
<select name="gce_retrieve_until" id="gce_retrieve_until">
|
107 |
+
<option value="today" <?php selected( $gce_retrieve_until, 'today', true ); ?>><?php _e( 'Today', 'gce' ); ?></option>
|
108 |
+
<option value="start_week" <?php selected( $gce_retrieve_until, 'start_week', true ); ?>><?php _e( 'Start of current week', 'gce' ); ?></option>
|
109 |
+
<option value="start_month" <?php selected( $gce_retrieve_until, 'start_month', true ); ?>><?php _e( 'Start of current month', 'gce' ); ?></option>
|
110 |
+
<option value="end_month" <?php selected( $gce_retrieve_until, 'end_month', true ); ?>><?php _e( 'End of current month', 'gce' ); ?></option>
|
111 |
+
<option value="end_time" <?php selected( $gce_retrieve_until, 'end_time', true ); ?>><?php _e( 'The end of time', 'gce' ); ?></option>
|
112 |
+
<option value="custom_date" <?php selected( $gce_retrieve_until, 'custom_date', true ); ?>><?php _e( 'Specific date', 'gce' ); ?></option>
|
113 |
+
</select>
|
114 |
+
<input type="text" <?php echo ( $gce_retrieve_until != 'custom_date' ? 'class="gce-admin-hidden" ' : ' ' ); ?> name="gce_custom_until" id="gce_custom_until" value="<?php echo $gce_custom_until; ?>" />
|
115 |
+
<p class="description"><?php _e( 'The point in time at which to stop retrieving events.', 'gce' ); ?></p>
|
116 |
+
</td>
|
117 |
+
</tr>
|
118 |
+
|
119 |
+
<tr>
|
120 |
+
<th scope="row"><label for="gce_retrieve_max"><?php _e( 'Max Number of Events', 'gce' ); ?></label></th>
|
121 |
+
<td>
|
122 |
+
<input type="text" class="" name="gce_retrieve_max" id="gce_retrieve_max" value="<?php echo $gce_retrieve_max; ?>" />
|
123 |
+
<p class="description"><?php _e( 'Maximum number of events to show.', 'gce' ); ?></p>
|
124 |
+
<td>
|
125 |
+
</tr>
|
126 |
+
|
127 |
+
<tr>
|
128 |
+
<th scope="row"><label for="gce_date_format"><?php _e( 'Date Format', 'gce' ); ?></label></th>
|
129 |
+
<td>
|
130 |
+
<input type="text" class="" name="gce_date_format" id="gce_date_format" value="<?php echo $gce_date_format; ?>" />
|
131 |
+
<p class="description">
|
132 |
+
<?php printf( __( 'Use %sPHP date formatting%s.', 'gce' ), '<a href="http://php.net/manual/en/function.date.php" target="_blank">', '</a>' ); ?>
|
133 |
+
<?php echo _x( 'Leave blank to use the default.', 'References the Date Format option', 'gce' ); ?>
|
134 |
+
</p>
|
135 |
+
</td>
|
136 |
+
</tr>
|
137 |
+
|
138 |
+
<tr>
|
139 |
+
<th scope="row"><label for="gce_time_format"><?php _e( 'Time Format', 'gce' ); ?></label></th>
|
140 |
+
<td>
|
141 |
+
<input type="text" class="" name="gce_time_format" id="gce_time_format" value="<?php echo $gce_time_format; ?>" />
|
142 |
+
<p class="description">
|
143 |
+
<?php printf( __( 'Use %sPHP date formatting%s.', 'gce' ), '<a href="http://php.net/manual/en/function.date.php" target="_blank">', '</a>' ); ?>
|
144 |
+
<?php echo _x( 'Leave blank to use the default.', 'References the Time Format option', 'gce' ); ?>
|
145 |
+
</p>
|
146 |
+
</td>
|
147 |
+
</tr>
|
148 |
+
|
149 |
+
<tr>
|
150 |
+
<th scope="row"><label for="gce_timezone_offset"><?php _e( 'Timezone Adjustment', 'gce' ); ?></label></th>
|
151 |
+
<td>
|
152 |
+
<?php echo gce_add_timezone_field(); ?>
|
153 |
+
<p class="description"><?php _e( 'If you are having problems with dates and times displaying in the wrong timezone, select a city in your required timezone here.', 'gce' ); ?></p>
|
154 |
+
</td>
|
155 |
+
</tr>
|
156 |
+
|
157 |
+
<tr>
|
158 |
+
<th scope="row"><label for="gce_cache"><?php _e( 'Cache Duration', 'gce' ); ?></label></th>
|
159 |
+
<td>
|
160 |
+
<input type="text" class="" name="gce_cache" id="gce_cache" value="<?php echo $gce_cache; ?>" />
|
161 |
+
<p class="description"><?php _e( 'The length of time, in seconds, to cache the feed (43200 = 12 hours). If this feed changes regularly, you may want to reduce the cache duration.', 'gce' ); ?></p>
|
162 |
+
<td>
|
163 |
+
</tr>
|
164 |
+
|
165 |
+
<tr>
|
166 |
+
<th scope="row"><label for="gce_multi_day_events"><?php _e( 'Multiple Day Events', 'gce' ); ?></label></th>
|
167 |
+
<td>
|
168 |
+
<input type="checkbox" name="gce_multi_day_events" id="gce_multi_day_events" value="1" <?php checked( $gce_multi_day_events, '1' ); ?> /> <?php _e( 'Show on each day', 'gce' ); ?>
|
169 |
+
<p class="description"><?php _e( 'Show events that span multiple days on each day that they span, rather than just the first day.', 'gce' ); ?></p>
|
170 |
+
</td>
|
171 |
+
</tr>
|
172 |
+
|
173 |
+
<tr>
|
174 |
+
<th scope="row"><label for="gce_display_mode"><?php _e( 'Display Mode', 'gce' ); ?></label></th>
|
175 |
+
<td>
|
176 |
+
<select name="gce_display_mode" id="gce_display_mode">
|
177 |
+
<option value="grid" <?php selected( $gce_display_mode, 'grid', true ); ?>><?php _e( 'Grid', 'gce' ); ?></option>
|
178 |
+
<option value="list" <?php selected( $gce_display_mode, 'list', true ); ?>><?php _e( 'List', 'gce' ); ?></option>
|
179 |
+
<option value="list-grouped" <?php selected( $gce_display_mode, 'list-grouped', true ); ?>><?php _e( 'Grouped List', 'gce' ); ?></option>
|
180 |
+
</select>
|
181 |
+
<p class="description"><?php _e( 'Choose how you want your calendar to be displayed.', 'gce' ); ?></p>
|
182 |
+
</td>
|
183 |
+
</tr>
|
184 |
+
|
185 |
+
<tr>
|
186 |
+
<th scope="row"><?php _e( 'Clear Cache', 'gce' ); ?></th>
|
187 |
+
<td>
|
188 |
+
<a href="<?php echo add_query_arg( array( 'clear_cache' => true ) ); ?>" class="button-secondary"><?php _e( 'Clear Cache', 'gce' ); ?></a>
|
189 |
+
<p class="description">
|
190 |
+
<?php
|
191 |
+
printf( __( 'This will clear your feed cache. This also automatically happens when you save your changes. %s' .
|
192 |
+
'If you make changes you %sMUST%s save first or your changes will be lost.' ), '<br>', '<strong>', '</strong>' );
|
193 |
+
?>
|
194 |
+
</p>
|
195 |
+
</td>
|
196 |
+
</tr>
|
197 |
+
</table>
|
198 |
+
|
199 |
+
|
200 |
+
<?php
|
201 |
+
/**
|
202 |
+
* Since we have a huge list of Timezones we use this to grab them
|
203 |
+
*
|
204 |
+
* @since 2.0.0
|
205 |
+
*/
|
206 |
+
function gce_add_timezone_field() {
|
207 |
+
global $post;
|
208 |
+
|
209 |
+
$gce_timezone_offset = get_post_meta( $post->ID, 'gce_timezone_offset', true );
|
210 |
+
|
211 |
+
require_once( 'timezone-choices.php' );
|
212 |
+
|
213 |
+
$timezone_list = gce_get_timezone_choices();
|
214 |
+
|
215 |
+
//Set selected="selected" for default option
|
216 |
+
if( ! empty( $gce_timezone_offset ) ) {
|
217 |
+
$timezone_list = str_replace(('<option value="' . $gce_timezone_offset . '"'), ('<option value="' . $gce_timezone_offset . '" selected="selected"'), $timezone_list);
|
218 |
+
} else {
|
219 |
+
$timezone_list = str_replace( '<option value="default">Default</option>', '<option value="default" selected="selected">Default</option>', $timezone_list );
|
220 |
+
}
|
221 |
+
|
222 |
+
return $timezone_list;
|
223 |
+
|
224 |
+
}
|
225 |
+
|
226 |
+
|
views/admin/gce-feed-sidebar-help.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div>
|
2 |
+
<ul>
|
3 |
+
<li>
|
4 |
+
<div class="dashicons dashicons-arrow-right-alt2"></div>
|
5 |
+
<a href="<?php echo gce_ga_campaign_url( 'http://wpdocs.philderksen.com/google-calendar-events/', 'gce_lite', 'sidebar_link', 'docs' ); ?>" target="_blank">
|
6 |
+
<?php _e( 'Documentation & Getting Started', 'gce' ); ?></a>
|
7 |
+
</li>
|
8 |
+
|
9 |
+
<li>
|
10 |
+
<div class="dashicons dashicons-arrow-right-alt2"></div>
|
11 |
+
<a href="http://wordpress.org/support/plugin/google-calendar-events" target="_blank">
|
12 |
+
<?php _e( 'Community Support Forums', 'gce' ); ?></a>
|
13 |
+
</li>
|
14 |
+
|
15 |
+
<li>
|
16 |
+
<div class="dashicons dashicons-arrow-right-alt2"></div>
|
17 |
+
<a href="http://eepurl.com/0_VsT" target="_blank">
|
18 |
+
<?php _e( 'Get Notified of Major Updates', 'gce' ); ?></a>
|
19 |
+
</li>
|
20 |
+
|
21 |
+
<li>
|
22 |
+
<div class="dashicons dashicons-arrow-right-alt2"></div>
|
23 |
+
<a href="http://wordpress.org/support/view/plugin-reviews/google-calendar-events" target="_blank">
|
24 |
+
<?php _e( 'Now Accepting 5-Star Reviews!', 'gce' ); ?></a>
|
25 |
+
</li>
|
26 |
+
</ul>
|
27 |
+
</div>
|
{admin → views/admin}/timezone-choices.php
RENAMED
@@ -1,429 +1,443 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
<option value="Africa/
|
23 |
-
<option value="Africa/
|
24 |
-
<option value="Africa/
|
25 |
-
<option value="Africa/
|
26 |
-
<option value="Africa/
|
27 |
-
<option value="Africa/
|
28 |
-
<option value="Africa/
|
29 |
-
<option value="Africa/
|
30 |
-
<option value="Africa/
|
31 |
-
<option value="Africa/
|
32 |
-
<option value="Africa/
|
33 |
-
<option value="Africa/
|
34 |
-
<option value="Africa/
|
35 |
-
<option value="Africa/
|
36 |
-
<option value="Africa/
|
37 |
-
<option value="Africa/
|
38 |
-
<option value="Africa/
|
39 |
-
<option value="Africa/
|
40 |
-
<option value="Africa/
|
41 |
-
<option value="Africa/
|
42 |
-
<option value="Africa/
|
43 |
-
<option value="Africa/
|
44 |
-
<option value="Africa/
|
45 |
-
<option value="Africa/
|
46 |
-
<option value="Africa/
|
47 |
-
<option value="Africa/
|
48 |
-
<option value="Africa/
|
49 |
-
<option value="Africa/
|
50 |
-
<option value="Africa/
|
51 |
-
<option value="Africa/
|
52 |
-
<option value="Africa/
|
53 |
-
<option value="Africa/
|
54 |
-
<option value="Africa/
|
55 |
-
<option value="Africa/
|
56 |
-
<option value="Africa/
|
57 |
-
<option value="Africa/
|
58 |
-
|
59 |
-
<
|
60 |
-
<option value="
|
61 |
-
<option value="
|
62 |
-
<option value="
|
63 |
-
<option value="
|
64 |
-
<option value="
|
65 |
-
<option value="
|
66 |
-
<option value="
|
67 |
-
<option value="
|
68 |
-
<option value="
|
69 |
-
<option value="
|
70 |
-
<option value="
|
71 |
-
<option value="
|
72 |
-
<option value="
|
73 |
-
|
74 |
-
<
|
75 |
-
<option value="America/
|
76 |
-
<option value="America/
|
77 |
-
<option value="America/
|
78 |
-
<option value="America/
|
79 |
-
<option value="America/
|
80 |
-
<option value="America/
|
81 |
-
<option value="America/
|
82 |
-
<option value="America/
|
83 |
-
<option value="America/
|
84 |
-
<option value="America/
|
85 |
-
<option value="America/
|
86 |
-
<option value="America/
|
87 |
-
<option value="America/
|
88 |
-
<option value="America/
|
89 |
-
<option value="America/
|
90 |
-
<option value="America/
|
91 |
-
<option value="America/
|
92 |
-
<option value="America/
|
93 |
-
<option value="America/
|
94 |
-
<option value="America/
|
95 |
-
<option value="America/
|
96 |
-
<option value="America/
|
97 |
-
<option value="America/
|
98 |
-
<option value="America/
|
99 |
-
<option value="America/
|
100 |
-
<option value="America/
|
101 |
-
<option value="America/
|
102 |
-
<option value="America/
|
103 |
-
<option value="America/
|
104 |
-
<option value="America/
|
105 |
-
<option value="America/
|
106 |
-
<option value="America/
|
107 |
-
<option value="America/
|
108 |
-
<option value="America/
|
109 |
-
<option value="America/
|
110 |
-
<option value="America/
|
111 |
-
<option value="America/
|
112 |
-
<option value="America/
|
113 |
-
<option value="America/
|
114 |
-
<option value="America/
|
115 |
-
<option value="America/
|
116 |
-
<option value="America/
|
117 |
-
<option value="America/
|
118 |
-
<option value="America/
|
119 |
-
<option value="America/
|
120 |
-
<option value="America/
|
121 |
-
<option value="America/
|
122 |
-
<option value="America/
|
123 |
-
<option value="America/
|
124 |
-
<option value="America/
|
125 |
-
<option value="America/
|
126 |
-
<option value="America/
|
127 |
-
<option value="America/
|
128 |
-
<option value="America/
|
129 |
-
<option value="America/
|
130 |
-
<option value="America/
|
131 |
-
<option value="America/
|
132 |
-
<option value="America/
|
133 |
-
<option value="America/
|
134 |
-
<option value="America/
|
135 |
-
<option value="America/
|
136 |
-
<option value="America/
|
137 |
-
<option value="America/
|
138 |
-
<option value="America/
|
139 |
-
<option value="America/
|
140 |
-
<option value="America/
|
141 |
-
<option value="America/
|
142 |
-
<option value="America/
|
143 |
-
<option value="America/
|
144 |
-
<option value="America/
|
145 |
-
<option value="America/
|
146 |
-
<option value="America/
|
147 |
-
<option value="America/
|
148 |
-
<option value="America/
|
149 |
-
<option value="America/
|
150 |
-
<option value="America/
|
151 |
-
<option value="America/
|
152 |
-
<option value="America/
|
153 |
-
<option value="America/
|
154 |
-
<option value="America/
|
155 |
-
<option value="America/
|
156 |
-
<option value="America/
|
157 |
-
<option value="America/
|
158 |
-
<option value="America/
|
159 |
-
<option value="America/
|
160 |
-
<option value="America/
|
161 |
-
<option value="America/
|
162 |
-
<option value="America/
|
163 |
-
<option value="America/
|
164 |
-
<option value="America/
|
165 |
-
<option value="America/
|
166 |
-
<option value="America/
|
167 |
-
<option value="America/
|
168 |
-
<option value="America/
|
169 |
-
<option value="America/
|
170 |
-
<option value="America/
|
171 |
-
<option value="America/
|
172 |
-
<option value="America/
|
173 |
-
<option value="America/
|
174 |
-
<option value="America/
|
175 |
-
<option value="America/
|
176 |
-
<option value="America/
|
177 |
-
<option value="America/
|
178 |
-
<option value="America/
|
179 |
-
<option value="America/
|
180 |
-
<option value="America/
|
181 |
-
<option value="America/
|
182 |
-
<option value="America/
|
183 |
-
<option value="America/
|
184 |
-
<option value="America/
|
185 |
-
<option value="America/
|
186 |
-
<option value="America/
|
187 |
-
<option value="America/
|
188 |
-
<option value="America/
|
189 |
-
<option value="America/
|
190 |
-
<option value="America/
|
191 |
-
<option value="America/
|
192 |
-
<option value="America/
|
193 |
-
<option value="America/
|
194 |
-
<option value="America/
|
195 |
-
<option value="America/
|
196 |
-
<option value="America/
|
197 |
-
<option value="America/
|
198 |
-
|
199 |
-
|
200 |
-
<option value="
|
201 |
-
<option value="
|
202 |
-
<option value="
|
203 |
-
<option value="
|
204 |
-
<option value="
|
205 |
-
<option value="
|
206 |
-
<option value="
|
207 |
-
<option value="
|
208 |
-
<option value="
|
209 |
-
<option value="
|
210 |
-
|
211 |
-
|
212 |
-
<option value="
|
213 |
-
</optgroup>
|
214 |
-
<optgroup label="
|
215 |
-
<option value="
|
216 |
-
<option value="
|
217 |
-
<option value="
|
218 |
-
<option value="
|
219 |
-
<option value="
|
220 |
-
<option value="
|
221 |
-
<option value="
|
222 |
-
<option value="
|
223 |
-
<option value="
|
224 |
-
<option value="
|
225 |
-
|
226 |
-
|
227 |
-
<option value="
|
228 |
-
|
229 |
-
|
230 |
-
<option value="Asia/
|
231 |
-
<option value="Asia/
|
232 |
-
<option value="Asia/
|
233 |
-
<option value="Asia/
|
234 |
-
<option value="Asia/
|
235 |
-
<option value="Asia/
|
236 |
-
<option value="Asia/
|
237 |
-
<option value="Asia/
|
238 |
-
<option value="Asia/
|
239 |
-
<option value="Asia/
|
240 |
-
<option value="Asia/
|
241 |
-
<option value="Asia/
|
242 |
-
<option value="Asia/
|
243 |
-
<option value="Asia/
|
244 |
-
<option value="Asia/
|
245 |
-
<option value="Asia/
|
246 |
-
<option value="Asia/
|
247 |
-
<option value="Asia/
|
248 |
-
<option value="Asia/
|
249 |
-
<option value="Asia/
|
250 |
-
<option value="Asia/
|
251 |
-
<option value="Asia/
|
252 |
-
<option value="Asia/
|
253 |
-
<option value="Asia/
|
254 |
-
<option value="Asia/
|
255 |
-
<option value="Asia/
|
256 |
-
<option value="Asia/
|
257 |
-
<option value="Asia/
|
258 |
-
<option value="Asia/
|
259 |
-
<option value="Asia/
|
260 |
-
<option value="Asia/
|
261 |
-
<option value="Asia/
|
262 |
-
<option value="Asia/
|
263 |
-
<option value="Asia/
|
264 |
-
<option value="Asia/
|
265 |
-
<option value="Asia/
|
266 |
-
<option value="Asia/
|
267 |
-
<option value="Asia/
|
268 |
-
<option value="Asia/
|
269 |
-
<option value="Asia/
|
270 |
-
<option value="Asia/
|
271 |
-
<option value="Asia/
|
272 |
-
<option value="Asia/
|
273 |
-
<option value="Asia/
|
274 |
-
<option value="Asia/
|
275 |
-
<option value="Asia/
|
276 |
-
<option value="Asia/
|
277 |
-
<option value="Asia/
|
278 |
-
<option value="Asia/
|
279 |
-
<option value="Asia/
|
280 |
-
<option value="Asia/
|
281 |
-
<option value="Asia/
|
282 |
-
<option value="Asia/
|
283 |
-
<option value="Asia/
|
284 |
-
<option value="Asia/
|
285 |
-
<option value="Asia/
|
286 |
-
<option value="Asia/
|
287 |
-
<option value="Asia/
|
288 |
-
<option value="Asia/
|
289 |
-
<option value="Asia/
|
290 |
-
|
291 |
-
|
292 |
-
<option value="
|
293 |
-
<option value="
|
294 |
-
<option value="
|
295 |
-
<option value="
|
296 |
-
<option value="
|
297 |
-
<option value="
|
298 |
-
<option value="
|
299 |
-
<option value="
|
300 |
-
<option value="
|
301 |
-
<option value="
|
302 |
-
|
303 |
-
|
304 |
-
<option value="
|
305 |
-
|
306 |
-
|
307 |
-
<option value="
|
308 |
-
<option value="
|
309 |
-
<option value="
|
310 |
-
<option value="
|
311 |
-
<option value="
|
312 |
-
<option value="
|
313 |
-
<option value="
|
314 |
-
<option value="
|
315 |
-
<option value="
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
<option value="
|
320 |
-
<option value="
|
321 |
-
<option value="
|
322 |
-
<option value="
|
323 |
-
<option value="
|
324 |
-
<option value="
|
325 |
-
<option value="
|
326 |
-
<option value="
|
327 |
-
<option value="
|
328 |
-
<option value="
|
329 |
-
<option value="
|
330 |
-
<option value="
|
331 |
-
|
332 |
-
|
333 |
-
<option value="Europe/
|
334 |
-
<option value="Europe/
|
335 |
-
<option value="Europe/
|
336 |
-
<option value="Europe/
|
337 |
-
<option value="Europe/
|
338 |
-
<option value="Europe/
|
339 |
-
<option value="Europe/
|
340 |
-
<option value="Europe/
|
341 |
-
<option value="Europe/
|
342 |
-
<option value="Europe/
|
343 |
-
<option value="Europe/
|
344 |
-
<option value="Europe/
|
345 |
-
<option value="Europe/
|
346 |
-
<option value="Europe/
|
347 |
-
<option value="Europe/
|
348 |
-
<option value="Europe/
|
349 |
-
<option value="Europe/
|
350 |
-
<option value="Europe/
|
351 |
-
<option value="Europe/
|
352 |
-
<option value="Europe/
|
353 |
-
<option value="Europe/
|
354 |
-
<option value="Europe/
|
355 |
-
<option value="Europe/
|
356 |
-
<option value="Europe/
|
357 |
-
<option value="Europe/
|
358 |
-
<option value="Europe/
|
359 |
-
<option value="Europe/
|
360 |
-
<option value="Europe/
|
361 |
-
<option value="Europe/
|
362 |
-
<option value="Europe/
|
363 |
-
<option value="Europe/
|
364 |
-
<option value="Europe/
|
365 |
-
<option value="Europe/
|
366 |
-
<option value="Europe/
|
367 |
-
<option value="Europe/
|
368 |
-
<option value="Europe/
|
369 |
-
<option value="Europe/
|
370 |
-
<option value="Europe/
|
371 |
-
<option value="Europe/
|
372 |
-
<option value="Europe/
|
373 |
-
|
374 |
-
|
375 |
-
<option value="
|
376 |
-
<option value="
|
377 |
-
<option value="
|
378 |
-
<option value="
|
379 |
-
<option value="
|
380 |
-
<option value="
|
381 |
-
<option value="
|
382 |
-
<option value="
|
383 |
-
<option value="
|
384 |
-
<option value="
|
385 |
-
<option value="
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
<option value="
|
391 |
-
<option value="
|
392 |
-
<option value="
|
393 |
-
<option value="
|
394 |
-
<option value="
|
395 |
-
<option value="
|
396 |
-
<option value="
|
397 |
-
<option value="
|
398 |
-
<option value="
|
399 |
-
<option value="
|
400 |
-
<option value="
|
401 |
-
|
402 |
-
|
403 |
-
<option value="Pacific/
|
404 |
-
<option value="Pacific/
|
405 |
-
<option value="Pacific/
|
406 |
-
<option value="Pacific/
|
407 |
-
<option value="Pacific/
|
408 |
-
<option value="Pacific/
|
409 |
-
<option value="Pacific/
|
410 |
-
<option value="Pacific/
|
411 |
-
<option value="Pacific/
|
412 |
-
<option value="Pacific/
|
413 |
-
<option value="Pacific/
|
414 |
-
<option value="Pacific/
|
415 |
-
<option value="Pacific/
|
416 |
-
<option value="Pacific/
|
417 |
-
<option value="Pacific/
|
418 |
-
<option value="Pacific/
|
419 |
-
<option value="Pacific/
|
420 |
-
<option value="Pacific/
|
421 |
-
<option value="Pacific/
|
422 |
-
<option value="Pacific/
|
423 |
-
<option value="Pacific/
|
424 |
-
<option value="Pacific/
|
425 |
-
<option value="Pacific/
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Timezone functions
|
5 |
+
*
|
6 |
+
* @package GCE
|
7 |
+
* @author Phil Derksen <pderksen@gmail.com>, Nick Young <mycorpweb@gmail.com>
|
8 |
+
* @license GPL-2.0+
|
9 |
+
* @copyright 2014 Phil Derksen
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Returns the HTML for the Timezone select box on the CPT screens
|
14 |
+
*
|
15 |
+
* @since 2.0.0
|
16 |
+
*/
|
17 |
+
function gce_get_timezone_choices(){
|
18 |
+
return '
|
19 |
+
<select name="gce_timezone_offset" id="gce_timezone_offset">
|
20 |
+
<option value="default">Default</option>
|
21 |
+
<optgroup label="Africa">
|
22 |
+
<option value="Africa/Abidjan">Abidjan</option>
|
23 |
+
<option value="Africa/Accra">Accra</option>
|
24 |
+
<option value="Africa/Addis_Ababa">Addis Ababa</option>
|
25 |
+
<option value="Africa/Algiers">Algiers</option>
|
26 |
+
<option value="Africa/Asmara">Asmara</option>
|
27 |
+
<option value="Africa/Bamako">Bamako</option>
|
28 |
+
<option value="Africa/Bangui">Bangui</option>
|
29 |
+
<option value="Africa/Banjul">Banjul</option>
|
30 |
+
<option value="Africa/Bissau">Bissau</option>
|
31 |
+
<option value="Africa/Blantyre">Blantyre</option>
|
32 |
+
<option value="Africa/Brazzaville">Brazzaville</option>
|
33 |
+
<option value="Africa/Bujumbura">Bujumbura</option>
|
34 |
+
<option value="Africa/Cairo">Cairo</option>
|
35 |
+
<option value="Africa/Casablanca">Casablanca</option>
|
36 |
+
<option value="Africa/Ceuta">Ceuta</option>
|
37 |
+
<option value="Africa/Conakry">Conakry</option>
|
38 |
+
<option value="Africa/Dakar">Dakar</option>
|
39 |
+
<option value="Africa/Dar_es_Salaam">Dar es Salaam</option>
|
40 |
+
<option value="Africa/Djibouti">Djibouti</option>
|
41 |
+
<option value="Africa/Douala">Douala</option>
|
42 |
+
<option value="Africa/El_Aaiun">El Aaiun</option>
|
43 |
+
<option value="Africa/Freetown">Freetown</option>
|
44 |
+
<option value="Africa/Gaborone">Gaborone</option>
|
45 |
+
<option value="Africa/Harare">Harare</option>
|
46 |
+
<option value="Africa/Johannesburg">Johannesburg</option>
|
47 |
+
<option value="Africa/Kampala">Kampala</option>
|
48 |
+
<option value="Africa/Khartoum">Khartoum</option>
|
49 |
+
<option value="Africa/Kigali">Kigali</option>
|
50 |
+
<option value="Africa/Kinshasa">Kinshasa</option>
|
51 |
+
<option value="Africa/Lagos">Lagos</option>
|
52 |
+
<option value="Africa/Libreville">Libreville</option>
|
53 |
+
<option value="Africa/Lome">Lome</option>
|
54 |
+
<option value="Africa/Luanda">Luanda</option>
|
55 |
+
<option value="Africa/Lubumbashi">Lubumbashi</option>
|
56 |
+
<option value="Africa/Lusaka">Lusaka</option>
|
57 |
+
<option value="Africa/Malabo">Malabo</option>
|
58 |
+
<option value="Africa/Maputo">Maputo</option>
|
59 |
+
<option value="Africa/Maseru">Maseru</option>
|
60 |
+
<option value="Africa/Mbabane">Mbabane</option>
|
61 |
+
<option value="Africa/Mogadishu">Mogadishu</option>
|
62 |
+
<option value="Africa/Monrovia">Monrovia</option>
|
63 |
+
<option value="Africa/Nairobi">Nairobi</option>
|
64 |
+
<option value="Africa/Ndjamena">Ndjamena</option>
|
65 |
+
<option value="Africa/Niamey">Niamey</option>
|
66 |
+
<option value="Africa/Nouakchott">Nouakchott</option>
|
67 |
+
<option value="Africa/Ouagadougou">Ouagadougou</option>
|
68 |
+
<option value="Africa/Porto-Novo">Porto-Novo</option>
|
69 |
+
<option value="Africa/Sao_Tome">Sao Tome</option>
|
70 |
+
<option value="Africa/Tripoli">Tripoli</option>
|
71 |
+
<option value="Africa/Tunis">Tunis</option>
|
72 |
+
<option value="Africa/Windhoek">Windhoek</option>
|
73 |
+
</optgroup>
|
74 |
+
<optgroup label="America">
|
75 |
+
<option value="America/Adak">Adak</option>
|
76 |
+
<option value="America/Anchorage">Anchorage</option>
|
77 |
+
<option value="America/Anguilla">Anguilla</option>
|
78 |
+
<option value="America/Antigua">Antigua</option>
|
79 |
+
<option value="America/Araguaina">Araguaina</option>
|
80 |
+
<option value="America/Argentina/Buenos_Aires">Argentina - Buenos Aires</option>
|
81 |
+
<option value="America/Argentina/Catamarca">Argentina - Catamarca</option>
|
82 |
+
<option value="America/Argentina/Cordoba">Argentina - Cordoba</option>
|
83 |
+
<option value="America/Argentina/Jujuy">Argentina - Jujuy</option>
|
84 |
+
<option value="America/Argentina/La_Rioja">Argentina - La Rioja</option>
|
85 |
+
<option value="America/Argentina/Mendoza">Argentina - Mendoza</option>
|
86 |
+
<option value="America/Argentina/Rio_Gallegos">Argentina - Rio Gallegos</option>
|
87 |
+
<option value="America/Argentina/Salta">Argentina - Salta</option>
|
88 |
+
<option value="America/Argentina/San_Juan">Argentina - San Juan</option>
|
89 |
+
<option value="America/Argentina/San_Luis">Argentina - San Luis</option>
|
90 |
+
<option value="America/Argentina/Tucuman">Argentina - Tucuman</option>
|
91 |
+
<option value="America/Argentina/Ushuaia">Argentina - Ushuaia</option>
|
92 |
+
<option value="America/Aruba">Aruba</option>
|
93 |
+
<option value="America/Asuncion">Asuncion</option>
|
94 |
+
<option value="America/Atikokan">Atikokan</option>
|
95 |
+
<option value="America/Bahia">Bahia</option>
|
96 |
+
<option value="America/Barbados">Barbados</option>
|
97 |
+
<option value="America/Belem">Belem</option>
|
98 |
+
<option value="America/Belize">Belize</option>
|
99 |
+
<option value="America/Blanc-Sablon">Blanc-Sablon</option>
|
100 |
+
<option value="America/Boa_Vista">Boa Vista</option>
|
101 |
+
<option value="America/Bogota">Bogota</option>
|
102 |
+
<option value="America/Boise">Boise</option>
|
103 |
+
<option value="America/Cambridge_Bay">Cambridge Bay</option>
|
104 |
+
<option value="America/Campo_Grande">Campo Grande</option>
|
105 |
+
<option value="America/Cancun">Cancun</option>
|
106 |
+
<option value="America/Caracas">Caracas</option>
|
107 |
+
<option value="America/Cayenne">Cayenne</option>
|
108 |
+
<option value="America/Cayman">Cayman</option>
|
109 |
+
<option value="America/Chicago">Chicago</option>
|
110 |
+
<option value="America/Chihuahua">Chihuahua</option>
|
111 |
+
<option value="America/Costa_Rica">Costa Rica</option>
|
112 |
+
<option value="America/Cuiaba">Cuiaba</option>
|
113 |
+
<option value="America/Curacao">Curacao</option>
|
114 |
+
<option value="America/Danmarkshavn">Danmarkshavn</option>
|
115 |
+
<option value="America/Dawson">Dawson</option>
|
116 |
+
<option value="America/Dawson_Creek">Dawson Creek</option>
|
117 |
+
<option value="America/Denver">Denver</option>
|
118 |
+
<option value="America/Detroit">Detroit</option>
|
119 |
+
<option value="America/Dominica">Dominica</option>
|
120 |
+
<option value="America/Edmonton">Edmonton</option>
|
121 |
+
<option value="America/Eirunepe">Eirunepe</option>
|
122 |
+
<option value="America/El_Salvador">El Salvador</option>
|
123 |
+
<option value="America/Fortaleza">Fortaleza</option>
|
124 |
+
<option value="America/Glace_Bay">Glace Bay</option>
|
125 |
+
<option value="America/Godthab">Godthab</option>
|
126 |
+
<option value="America/Goose_Bay">Goose Bay</option>
|
127 |
+
<option value="America/Grand_Turk">Grand Turk</option>
|
128 |
+
<option value="America/Grenada">Grenada</option>
|
129 |
+
<option value="America/Guadeloupe">Guadeloupe</option>
|
130 |
+
<option value="America/Guatemala">Guatemala</option>
|
131 |
+
<option value="America/Guayaquil">Guayaquil</option>
|
132 |
+
<option value="America/Guyana">Guyana</option>
|
133 |
+
<option value="America/Halifax">Halifax</option>
|
134 |
+
<option value="America/Havana">Havana</option>
|
135 |
+
<option value="America/Hermosillo">Hermosillo</option>
|
136 |
+
<option value="America/Indiana/Indianapolis">Indiana - Indianapolis</option>
|
137 |
+
<option value="America/Indiana/Knox">Indiana - Knox</option>
|
138 |
+
<option value="America/Indiana/Marengo">Indiana - Marengo</option>
|
139 |
+
<option value="America/Indiana/Petersburg">Indiana - Petersburg</option>
|
140 |
+
<option value="America/Indiana/Tell_City">Indiana - Tell City</option>
|
141 |
+
<option value="America/Indiana/Vevay">Indiana - Vevay</option>
|
142 |
+
<option value="America/Indiana/Vincennes">Indiana - Vincennes</option>
|
143 |
+
<option value="America/Indiana/Winamac">Indiana - Winamac</option>
|
144 |
+
<option value="America/Inuvik">Inuvik</option>
|
145 |
+
<option value="America/Iqaluit">Iqaluit</option>
|
146 |
+
<option value="America/Jamaica">Jamaica</option>
|
147 |
+
<option value="America/Juneau">Juneau</option>
|
148 |
+
<option value="America/Kentucky/Louisville">Kentucky - Louisville</option>
|
149 |
+
<option value="America/Kentucky/Monticello">Kentucky - Monticello</option>
|
150 |
+
<option value="America/La_Paz">La Paz</option>
|
151 |
+
<option value="America/Lima">Lima</option>
|
152 |
+
<option value="America/Los_Angeles">Los Angeles</option>
|
153 |
+
<option value="America/Maceio">Maceio</option>
|
154 |
+
<option value="America/Managua">Managua</option>
|
155 |
+
<option value="America/Manaus">Manaus</option>
|
156 |
+
<option value="America/Marigot">Marigot</option>
|
157 |
+
<option value="America/Martinique">Martinique</option>
|
158 |
+
<option value="America/Mazatlan">Mazatlan</option>
|
159 |
+
<option value="America/Menominee">Menominee</option>
|
160 |
+
<option value="America/Merida">Merida</option>
|
161 |
+
<option value="America/Mexico_City">Mexico City</option>
|
162 |
+
<option value="America/Miquelon">Miquelon</option>
|
163 |
+
<option value="America/Moncton">Moncton</option>
|
164 |
+
<option value="America/Monterrey">Monterrey</option>
|
165 |
+
<option value="America/Montevideo">Montevideo</option>
|
166 |
+
<option value="America/Montreal">Montreal</option>
|
167 |
+
<option value="America/Montserrat">Montserrat</option>
|
168 |
+
<option value="America/Nassau">Nassau</option>
|
169 |
+
<option value="America/New_York">New York</option>
|
170 |
+
<option value="America/Nipigon">Nipigon</option>
|
171 |
+
<option value="America/Nome">Nome</option>
|
172 |
+
<option value="America/Noronha">Noronha</option>
|
173 |
+
<option value="America/North_Dakota/Center">North Dakota - Center</option>
|
174 |
+
<option value="America/North_Dakota/New_Salem">North Dakota - New Salem</option>
|
175 |
+
<option value="America/Panama">Panama</option>
|
176 |
+
<option value="America/Pangnirtung">Pangnirtung</option>
|
177 |
+
<option value="America/Paramaribo">Paramaribo</option>
|
178 |
+
<option value="America/Phoenix">Phoenix</option>
|
179 |
+
<option value="America/Port-au-Prince">Port-au-Prince</option>
|
180 |
+
<option value="America/Port_of_Spain">Port of Spain</option>
|
181 |
+
<option value="America/Porto_Velho">Porto Velho</option>
|
182 |
+
<option value="America/Puerto_Rico">Puerto Rico</option>
|
183 |
+
<option value="America/Rainy_River">Rainy River</option>
|
184 |
+
<option value="America/Rankin_Inlet">Rankin Inlet</option>
|
185 |
+
<option value="America/Recife">Recife</option>
|
186 |
+
<option value="America/Regina">Regina</option>
|
187 |
+
<option value="America/Resolute">Resolute</option>
|
188 |
+
<option value="America/Rio_Branco">Rio Branco</option>
|
189 |
+
<option value="America/Santarem">Santarem</option>
|
190 |
+
<option value="America/Santiago">Santiago</option>
|
191 |
+
<option value="America/Santo_Domingo">Santo Domingo</option>
|
192 |
+
<option value="America/Sao_Paulo">Sao Paulo</option>
|
193 |
+
<option value="America/Scoresbysund">Scoresbysund</option>
|
194 |
+
<option value="America/Shiprock">Shiprock</option>
|
195 |
+
<option value="America/St_Barthelemy">St Barthelemy</option>
|
196 |
+
<option value="America/St_Johns">St Johns</option>
|
197 |
+
<option value="America/St_Kitts">St Kitts</option>
|
198 |
+
<option value="America/St_Lucia">St Lucia</option>
|
199 |
+
<option value="America/St_Thomas">St Thomas</option>
|
200 |
+
<option value="America/St_Vincent">St Vincent</option>
|
201 |
+
<option value="America/Swift_Current">Swift Current</option>
|
202 |
+
<option value="America/Tegucigalpa">Tegucigalpa</option>
|
203 |
+
<option value="America/Thule">Thule</option>
|
204 |
+
<option value="America/Thunder_Bay">Thunder Bay</option>
|
205 |
+
<option value="America/Tijuana">Tijuana</option>
|
206 |
+
<option value="America/Toronto">Toronto</option>
|
207 |
+
<option value="America/Tortola">Tortola</option>
|
208 |
+
<option value="America/Vancouver">Vancouver</option>
|
209 |
+
<option value="America/Whitehorse">Whitehorse</option>
|
210 |
+
<option value="America/Winnipeg">Winnipeg</option>
|
211 |
+
<option value="America/Yakutat">Yakutat</option>
|
212 |
+
<option value="America/Yellowknife">Yellowknife</option>
|
213 |
+
</optgroup>
|
214 |
+
<optgroup label="Antarctica">
|
215 |
+
<option value="Antarctica/Casey">Casey</option>
|
216 |
+
<option value="Antarctica/Davis">Davis</option>
|
217 |
+
<option value="Antarctica/DumontDUrville">DumontDUrville</option>
|
218 |
+
<option value="Antarctica/Mawson">Mawson</option>
|
219 |
+
<option value="Antarctica/McMurdo">McMurdo</option>
|
220 |
+
<option value="Antarctica/Palmer">Palmer</option>
|
221 |
+
<option value="Antarctica/Rothera">Rothera</option>
|
222 |
+
<option value="Antarctica/South_Pole">South Pole</option>
|
223 |
+
<option value="Antarctica/Syowa">Syowa</option>
|
224 |
+
<option value="Antarctica/Vostok">Vostok</option>
|
225 |
+
</optgroup>
|
226 |
+
<optgroup label="Arctic">
|
227 |
+
<option value="Arctic/Longyearbyen">Longyearbyen</option>
|
228 |
+
</optgroup>
|
229 |
+
<optgroup label="Asia">
|
230 |
+
<option value="Asia/Aden">Aden</option>
|
231 |
+
<option value="Asia/Almaty">Almaty</option>
|
232 |
+
<option value="Asia/Amman">Amman</option>
|
233 |
+
<option value="Asia/Anadyr">Anadyr</option>
|
234 |
+
<option value="Asia/Aqtau">Aqtau</option>
|
235 |
+
<option value="Asia/Aqtobe">Aqtobe</option>
|
236 |
+
<option value="Asia/Ashgabat">Ashgabat</option>
|
237 |
+
<option value="Asia/Baghdad">Baghdad</option>
|
238 |
+
<option value="Asia/Bahrain">Bahrain</option>
|
239 |
+
<option value="Asia/Baku">Baku</option>
|
240 |
+
<option value="Asia/Bangkok">Bangkok</option>
|
241 |
+
<option value="Asia/Beirut">Beirut</option>
|
242 |
+
<option value="Asia/Bishkek">Bishkek</option>
|
243 |
+
<option value="Asia/Brunei">Brunei</option>
|
244 |
+
<option value="Asia/Choibalsan">Choibalsan</option>
|
245 |
+
<option value="Asia/Chongqing">Chongqing</option>
|
246 |
+
<option value="Asia/Colombo">Colombo</option>
|
247 |
+
<option value="Asia/Damascus">Damascus</option>
|
248 |
+
<option value="Asia/Dhaka">Dhaka</option>
|
249 |
+
<option value="Asia/Dili">Dili</option>
|
250 |
+
<option value="Asia/Dubai">Dubai</option>
|
251 |
+
<option value="Asia/Dushanbe">Dushanbe</option>
|
252 |
+
<option value="Asia/Gaza">Gaza</option>
|
253 |
+
<option value="Asia/Harbin">Harbin</option>
|
254 |
+
<option value="Asia/Ho_Chi_Minh">Ho Chi Minh</option>
|
255 |
+
<option value="Asia/Hong_Kong">Hong Kong</option>
|
256 |
+
<option value="Asia/Hovd">Hovd</option>
|
257 |
+
<option value="Asia/Irkutsk">Irkutsk</option>
|
258 |
+
<option value="Asia/Jakarta">Jakarta</option>
|
259 |
+
<option value="Asia/Jayapura">Jayapura</option>
|
260 |
+
<option value="Asia/Jerusalem">Jerusalem</option>
|
261 |
+
<option value="Asia/Kabul">Kabul</option>
|
262 |
+
<option value="Asia/Kamchatka">Kamchatka</option>
|
263 |
+
<option value="Asia/Karachi">Karachi</option>
|
264 |
+
<option value="Asia/Kashgar">Kashgar</option>
|
265 |
+
<option value="Asia/Kathmandu">Kathmandu</option>
|
266 |
+
<option value="Asia/Kolkata">Kolkata</option>
|
267 |
+
<option value="Asia/Krasnoyarsk">Krasnoyarsk</option>
|
268 |
+
<option value="Asia/Kuala_Lumpur">Kuala Lumpur</option>
|
269 |
+
<option value="Asia/Kuching">Kuching</option>
|
270 |
+
<option value="Asia/Kuwait">Kuwait</option>
|
271 |
+
<option value="Asia/Macau">Macau</option>
|
272 |
+
<option value="Asia/Magadan">Magadan</option>
|
273 |
+
<option value="Asia/Makassar">Makassar</option>
|
274 |
+
<option value="Asia/Manila">Manila</option>
|
275 |
+
<option value="Asia/Muscat">Muscat</option>
|
276 |
+
<option value="Asia/Nicosia">Nicosia</option>
|
277 |
+
<option value="Asia/Novosibirsk">Novosibirsk</option>
|
278 |
+
<option value="Asia/Omsk">Omsk</option>
|
279 |
+
<option value="Asia/Oral">Oral</option>
|
280 |
+
<option value="Asia/Phnom_Penh">Phnom Penh</option>
|
281 |
+
<option value="Asia/Pontianak">Pontianak</option>
|
282 |
+
<option value="Asia/Pyongyang">Pyongyang</option>
|
283 |
+
<option value="Asia/Qatar">Qatar</option>
|
284 |
+
<option value="Asia/Qyzylorda">Qyzylorda</option>
|
285 |
+
<option value="Asia/Rangoon">Rangoon</option>
|
286 |
+
<option value="Asia/Riyadh">Riyadh</option>
|
287 |
+
<option value="Asia/Sakhalin">Sakhalin</option>
|
288 |
+
<option value="Asia/Samarkand">Samarkand</option>
|
289 |
+
<option value="Asia/Seoul">Seoul</option>
|
290 |
+
<option value="Asia/Shanghai">Shanghai</option>
|
291 |
+
<option value="Asia/Singapore">Singapore</option>
|
292 |
+
<option value="Asia/Taipei">Taipei</option>
|
293 |
+
<option value="Asia/Tashkent">Tashkent</option>
|
294 |
+
<option value="Asia/Tbilisi">Tbilisi</option>
|
295 |
+
<option value="Asia/Tehran">Tehran</option>
|
296 |
+
<option value="Asia/Thimphu">Thimphu</option>
|
297 |
+
<option value="Asia/Tokyo">Tokyo</option>
|
298 |
+
<option value="Asia/Ulaanbaatar">Ulaanbaatar</option>
|
299 |
+
<option value="Asia/Urumqi">Urumqi</option>
|
300 |
+
<option value="Asia/Vientiane">Vientiane</option>
|
301 |
+
<option value="Asia/Vladivostok">Vladivostok</option>
|
302 |
+
<option value="Asia/Yakutsk">Yakutsk</option>
|
303 |
+
<option value="Asia/Yekaterinburg">Yekaterinburg</option>
|
304 |
+
<option value="Asia/Yerevan">Yerevan</option>
|
305 |
+
</optgroup>
|
306 |
+
<optgroup label="Atlantic">
|
307 |
+
<option value="Atlantic/Azores">Azores</option>
|
308 |
+
<option value="Atlantic/Bermuda">Bermuda</option>
|
309 |
+
<option value="Atlantic/Canary">Canary</option>
|
310 |
+
<option value="Atlantic/Cape_Verde">Cape Verde</option>
|
311 |
+
<option value="Atlantic/Faroe">Faroe</option>
|
312 |
+
<option value="Atlantic/Madeira">Madeira</option>
|
313 |
+
<option value="Atlantic/Reykjavik">Reykjavik</option>
|
314 |
+
<option value="Atlantic/South_Georgia">South Georgia</option>
|
315 |
+
<option value="Atlantic/Stanley">Stanley</option>
|
316 |
+
<option value="Atlantic/St_Helena">St Helena</option>
|
317 |
+
</optgroup>
|
318 |
+
<optgroup label="Australia">
|
319 |
+
<option value="Australia/Adelaide">Adelaide</option>
|
320 |
+
<option value="Australia/Brisbane">Brisbane</option>
|
321 |
+
<option value="Australia/Broken_Hill">Broken Hill</option>
|
322 |
+
<option value="Australia/Currie">Currie</option>
|
323 |
+
<option value="Australia/Darwin">Darwin</option>
|
324 |
+
<option value="Australia/Eucla">Eucla</option>
|
325 |
+
<option value="Australia/Hobart">Hobart</option>
|
326 |
+
<option value="Australia/Lindeman">Lindeman</option>
|
327 |
+
<option value="Australia/Lord_Howe">Lord Howe</option>
|
328 |
+
<option value="Australia/Melbourne">Melbourne</option>
|
329 |
+
<option value="Australia/Perth">Perth</option>
|
330 |
+
<option value="Australia/Sydney">Sydney</option>
|
331 |
+
</optgroup>
|
332 |
+
<optgroup label="Europe">
|
333 |
+
<option value="Europe/Amsterdam">Amsterdam</option>
|
334 |
+
<option value="Europe/Andorra">Andorra</option>
|
335 |
+
<option value="Europe/Athens">Athens</option>
|
336 |
+
<option value="Europe/Belgrade">Belgrade</option>
|
337 |
+
<option value="Europe/Berlin">Berlin</option>
|
338 |
+
<option value="Europe/Bratislava">Bratislava</option>
|
339 |
+
<option value="Europe/Brussels">Brussels</option>
|
340 |
+
<option value="Europe/Bucharest">Bucharest</option>
|
341 |
+
<option value="Europe/Budapest">Budapest</option>
|
342 |
+
<option value="Europe/Chisinau">Chisinau</option>
|
343 |
+
<option value="Europe/Copenhagen">Copenhagen</option>
|
344 |
+
<option value="Europe/Dublin">Dublin</option>
|
345 |
+
<option value="Europe/Gibraltar">Gibraltar</option>
|
346 |
+
<option value="Europe/Guernsey">Guernsey</option>
|
347 |
+
<option value="Europe/Helsinki">Helsinki</option>
|
348 |
+
<option value="Europe/Isle_of_Man">Isle of Man</option>
|
349 |
+
<option value="Europe/Istanbul">Istanbul</option>
|
350 |
+
<option value="Europe/Jersey">Jersey</option>
|
351 |
+
<option value="Europe/Kaliningrad">Kaliningrad</option>
|
352 |
+
<option value="Europe/Kiev">Kiev</option>
|
353 |
+
<option value="Europe/Lisbon">Lisbon</option>
|
354 |
+
<option value="Europe/Ljubljana">Ljubljana</option>
|
355 |
+
<option value="Europe/London">London</option>
|
356 |
+
<option value="Europe/Luxembourg">Luxembourg</option>
|
357 |
+
<option value="Europe/Madrid">Madrid</option>
|
358 |
+
<option value="Europe/Malta">Malta</option>
|
359 |
+
<option value="Europe/Mariehamn">Mariehamn</option>
|
360 |
+
<option value="Europe/Minsk">Minsk</option>
|
361 |
+
<option value="Europe/Monaco">Monaco</option>
|
362 |
+
<option value="Europe/Moscow">Moscow</option>
|
363 |
+
<option value="Europe/Oslo">Oslo</option>
|
364 |
+
<option value="Europe/Paris">Paris</option>
|
365 |
+
<option value="Europe/Podgorica">Podgorica</option>
|
366 |
+
<option value="Europe/Prague">Prague</option>
|
367 |
+
<option value="Europe/Riga">Riga</option>
|
368 |
+
<option value="Europe/Rome">Rome</option>
|
369 |
+
<option value="Europe/Samara">Samara</option>
|
370 |
+
<option value="Europe/San_Marino">San Marino</option>
|
371 |
+
<option value="Europe/Sarajevo">Sarajevo</option>
|
372 |
+
<option value="Europe/Simferopol">Simferopol</option>
|
373 |
+
<option value="Europe/Skopje">Skopje</option>
|
374 |
+
<option value="Europe/Sofia">Sofia</option>
|
375 |
+
<option value="Europe/Stockholm">Stockholm</option>
|
376 |
+
<option value="Europe/Tallinn">Tallinn</option>
|
377 |
+
<option value="Europe/Tirane">Tirane</option>
|
378 |
+
<option value="Europe/Uzhgorod">Uzhgorod</option>
|
379 |
+
<option value="Europe/Vaduz">Vaduz</option>
|
380 |
+
<option value="Europe/Vatican">Vatican</option>
|
381 |
+
<option value="Europe/Vienna">Vienna</option>
|
382 |
+
<option value="Europe/Vilnius">Vilnius</option>
|
383 |
+
<option value="Europe/Volgograd">Volgograd</option>
|
384 |
+
<option value="Europe/Warsaw">Warsaw</option>
|
385 |
+
<option value="Europe/Zagreb">Zagreb</option>
|
386 |
+
<option value="Europe/Zaporozhye">Zaporozhye</option>
|
387 |
+
<option value="Europe/Zurich">Zurich</option>
|
388 |
+
</optgroup>
|
389 |
+
<optgroup label="Indian">
|
390 |
+
<option value="Indian/Antananarivo">Antananarivo</option>
|
391 |
+
<option value="Indian/Chagos">Chagos</option>
|
392 |
+
<option value="Indian/Christmas">Christmas</option>
|
393 |
+
<option value="Indian/Cocos">Cocos</option>
|
394 |
+
<option value="Indian/Comoro">Comoro</option>
|
395 |
+
<option value="Indian/Kerguelen">Kerguelen</option>
|
396 |
+
<option value="Indian/Mahe">Mahe</option>
|
397 |
+
<option value="Indian/Maldives">Maldives</option>
|
398 |
+
<option value="Indian/Mauritius">Mauritius</option>
|
399 |
+
<option value="Indian/Mayotte">Mayotte</option>
|
400 |
+
<option value="Indian/Reunion">Reunion</option>
|
401 |
+
</optgroup>
|
402 |
+
<optgroup label="Pacific">
|
403 |
+
<option value="Pacific/Apia">Apia</option>
|
404 |
+
<option value="Pacific/Auckland">Auckland</option>
|
405 |
+
<option value="Pacific/Chatham">Chatham</option>
|
406 |
+
<option value="Pacific/Easter">Easter</option>
|
407 |
+
<option value="Pacific/Efate">Efate</option>
|
408 |
+
<option value="Pacific/Enderbury">Enderbury</option>
|
409 |
+
<option value="Pacific/Fakaofo">Fakaofo</option>
|
410 |
+
<option value="Pacific/Fiji">Fiji</option>
|
411 |
+
<option value="Pacific/Funafuti">Funafuti</option>
|
412 |
+
<option value="Pacific/Galapagos">Galapagos</option>
|
413 |
+
<option value="Pacific/Gambier">Gambier</option>
|
414 |
+
<option value="Pacific/Guadalcanal">Guadalcanal</option>
|
415 |
+
<option value="Pacific/Guam">Guam</option>
|
416 |
+
<option value="Pacific/Honolulu">Honolulu</option>
|
417 |
+
<option value="Pacific/Johnston">Johnston</option>
|
418 |
+
<option value="Pacific/Kiritimati">Kiritimati</option>
|
419 |
+
<option value="Pacific/Kosrae">Kosrae</option>
|
420 |
+
<option value="Pacific/Kwajalein">Kwajalein</option>
|
421 |
+
<option value="Pacific/Majuro">Majuro</option>
|
422 |
+
<option value="Pacific/Marquesas">Marquesas</option>
|
423 |
+
<option value="Pacific/Midway">Midway</option>
|
424 |
+
<option value="Pacific/Nauru">Nauru</option>
|
425 |
+
<option value="Pacific/Niue">Niue</option>
|
426 |
+
<option value="Pacific/Norfolk">Norfolk</option>
|
427 |
+
<option value="Pacific/Noumea">Noumea</option>
|
428 |
+
<option value="Pacific/Pago_Pago">Pago Pago</option>
|
429 |
+
<option value="Pacific/Palau">Palau</option>
|
430 |
+
<option value="Pacific/Pitcairn">Pitcairn</option>
|
431 |
+
<option value="Pacific/Ponape">Ponape</option>
|
432 |
+
<option value="Pacific/Port_Moresby">Port Moresby</option>
|
433 |
+
<option value="Pacific/Rarotonga">Rarotonga</option>
|
434 |
+
<option value="Pacific/Saipan">Saipan</option>
|
435 |
+
<option value="Pacific/Tahiti">Tahiti</option>
|
436 |
+
<option value="Pacific/Tarawa">Tarawa</option>
|
437 |
+
<option value="Pacific/Tongatapu">Tongatapu</option>
|
438 |
+
<option value="Pacific/Truk">Truk</option>
|
439 |
+
<option value="Pacific/Wake">Wake</option>
|
440 |
+
<option value="Pacific/Wallis">Wallis</option>
|
441 |
+
</optgroup>
|
442 |
+
</select>';
|
443 |
+
}
|
views/widgets.php
ADDED
@@ -0,0 +1,198 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Widget functions / views
|
5 |
+
*
|
6 |
+
* @package GCE
|
7 |
+
* @author Phil Derksen <pderksen@gmail.com>, Nick Young <mycorpweb@gmail.com>
|
8 |
+
* @license GPL-2.0+
|
9 |
+
* @copyright 2014 Phil Derksen
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Exit if accessed directly.
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Class functions for the GCE widgets
|
19 |
+
*
|
20 |
+
* @since 2.0.0
|
21 |
+
*/
|
22 |
+
class GCE_Widget extends WP_Widget {
|
23 |
+
|
24 |
+
function GCE_Widget() {
|
25 |
+
parent::__construct(
|
26 |
+
false, // Adding a name here doesn't seem to affect the upgrade. If widget stuff starts acting weird then check this first though.
|
27 |
+
$name = __( 'Google Calendar Events', 'gce' ),
|
28 |
+
array( 'description' => __( 'Display a list or calendar grid of events from one or more Google Calendar feeds you have added', 'gce' ) )
|
29 |
+
);
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Widget HTML output
|
34 |
+
*
|
35 |
+
* @since 2.0.0
|
36 |
+
*/
|
37 |
+
function widget( $args, $instance ) {
|
38 |
+
extract( $args );
|
39 |
+
|
40 |
+
//Output before widget stuff
|
41 |
+
echo $before_widget;
|
42 |
+
|
43 |
+
// Check whether any feeds have been added yet
|
44 |
+
if( wp_count_posts( 'gce_feed' )->publish > 0 ) {
|
45 |
+
//Output title stuff
|
46 |
+
$title = empty( $instance['title'] ) ? '' : apply_filters( 'widget_title', $instance['title'] );
|
47 |
+
|
48 |
+
if ( ! empty( $title ) ) {
|
49 |
+
echo $before_title . $title . $after_title;
|
50 |
+
}
|
51 |
+
|
52 |
+
$no_feeds_exist = true;
|
53 |
+
$feed_ids = array();
|
54 |
+
|
55 |
+
if ( ! empty( $instance['id'] ) ) {
|
56 |
+
//Break comma delimited list of feed ids into array
|
57 |
+
$feed_ids = explode( ',', str_replace( ' ', '', $instance['id'] ) );
|
58 |
+
|
59 |
+
//Check each id is an integer, if not, remove it from the array
|
60 |
+
foreach ( $feed_ids as $key => $feed_id ) {
|
61 |
+
if ( 0 == absint( $feed_id ) )
|
62 |
+
unset( $feed_ids[$key] );
|
63 |
+
}
|
64 |
+
|
65 |
+
//If at least one of the feed ids entered exists, set no_feeds_exist to false
|
66 |
+
foreach ( $feed_ids as $feed_id ) {
|
67 |
+
if ( false !== get_post_meta( $feed_id ) )
|
68 |
+
$no_feeds_exist = false;
|
69 |
+
}
|
70 |
+
} else {
|
71 |
+
if ( current_user_can( 'manage_options' ) ) {
|
72 |
+
_e( 'No valid Feed IDs have been entered for this widget. Please check that you have entered the IDs correctly in the widget settings (Appearance > Widgets), and that the Feeds have not been deleted.', 'gce' );
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
//Check that at least one valid feed id has been entered
|
77 |
+
if ( ! empty( $feed_ids ) ) {
|
78 |
+
//Turns feed_ids back into string or feed ids delimited by '-' ('1-2-3-4' for example)
|
79 |
+
$feed_ids = implode( '-', $feed_ids );
|
80 |
+
|
81 |
+
$title_text = ( ! empty( $instance['display_title_text'] ) ? $instance['display_title_text'] : null );
|
82 |
+
$max_events = ( isset( $instance['max_events'] ) ) ? $instance['max_events'] : 0;
|
83 |
+
$sort_order = ( isset( $instance['order'] ) ) ? $instance['order'] : 'asc';
|
84 |
+
|
85 |
+
$args = array(
|
86 |
+
'title_text' => $title_text,
|
87 |
+
'max_events' => $max_events,
|
88 |
+
'sort' => $sort_order,
|
89 |
+
'month' => null,
|
90 |
+
'year' => null,
|
91 |
+
'widget' => 1
|
92 |
+
);
|
93 |
+
|
94 |
+
if( 'list-grouped' == $instance['display_type'] ) {
|
95 |
+
$args['grouped'] = 1;
|
96 |
+
}
|
97 |
+
|
98 |
+
$markup = gce_print_calendar( $feed_ids, $instance['display_type'], $args );
|
99 |
+
|
100 |
+
echo $markup;
|
101 |
+
}
|
102 |
+
} else {
|
103 |
+
if( current_user_can( 'manage_options' ) ) {
|
104 |
+
_e( 'You have not added any feeds yet.', 'gce' );
|
105 |
+
} else {
|
106 |
+
return;
|
107 |
+
}
|
108 |
+
}
|
109 |
+
|
110 |
+
//Output after widget stuff
|
111 |
+
echo $after_widget;
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Update settings when saved
|
116 |
+
*
|
117 |
+
* @since 2.0.0
|
118 |
+
*/
|
119 |
+
function update( $new_instance, $old_instance ) {
|
120 |
+
|
121 |
+
$instance = $old_instance;
|
122 |
+
$instance['title'] = esc_html( $new_instance['title'] );
|
123 |
+
$instance['id'] = esc_html( $new_instance['id'] );
|
124 |
+
$instance['display_type'] = esc_html( $new_instance['display_type'] );
|
125 |
+
$instance['max_events'] = absint( $new_instance['max_events'] );
|
126 |
+
$instance['order'] = ( 'asc' == $new_instance['order'] ) ? 'asc' : 'desc';
|
127 |
+
$instance['display_title_text'] = wp_filter_kses( $new_instance['display_title_text'] );
|
128 |
+
|
129 |
+
return $instance;
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
*
|
134 |
+
* @param type $instanceDisplay widget form in admin
|
135 |
+
*
|
136 |
+
* @since 2.0.0
|
137 |
+
*/
|
138 |
+
function form( $instance ) {
|
139 |
+
|
140 |
+
// Check for existing feeds and if there are none then display a message and return
|
141 |
+
if( wp_count_posts( 'gce_feed' )->publish <= 0 ) {
|
142 |
+
echo '<p>' . __( 'There are no feeds created yet.', 'gce' ) .
|
143 |
+
' <a href="' . admin_url( 'edit.php?post_type=gce_feed' ) . '">' . __( 'Add your first feed!', 'gce' ) . '</a>' .
|
144 |
+
'</p>';
|
145 |
+
return;
|
146 |
+
}
|
147 |
+
|
148 |
+
$title = ( isset( $instance['title'] ) ) ? $instance['title'] : '';
|
149 |
+
$ids = ( isset( $instance['id'] ) ) ? $instance['id'] : '';
|
150 |
+
$display_type = ( isset( $instance['display_type'] ) ) ? $instance['display_type'] : 'grid';
|
151 |
+
$max_events = ( isset( $instance['max_events'] ) ) ? $instance['max_events'] : 0;
|
152 |
+
$order = ( isset( $instance['order'] ) ) ? $instance['order'] : 'asc';
|
153 |
+
$display_title = ( isset( $instance['display_title'] ) ) ? $instance['display_title'] : true;
|
154 |
+
$title_text = ( isset( $instance['display_title_text'] ) ) ? $instance['display_title_text'] : 'Events on';
|
155 |
+
|
156 |
+
?>
|
157 |
+
<p>
|
158 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>">Title:</label>
|
159 |
+
<input type="text" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $title; ?>" class="widefat" />
|
160 |
+
</p>
|
161 |
+
<p>
|
162 |
+
<label for="<?php echo $this->get_field_id( 'id' ); ?>">
|
163 |
+
<?php _e( 'Feeds to display, as a comma separated list (e.g. 101,102,103)', 'gce' ); ?>
|
164 |
+
</label>
|
165 |
+
<input type="text" id="<?php echo $this->get_field_id( 'id' ); ?>" name="<?php echo $this->get_field_name( 'id' ); ?>" value="<?php echo $ids; ?>" class="widefat" />
|
166 |
+
</p>
|
167 |
+
<p>
|
168 |
+
<label for="<?php echo $this->get_field_id( 'display_type' ); ?>"><?php _e( 'Display events as:', 'gce' ); ?></label>
|
169 |
+
<select id="<?php echo $this->get_field_id( 'display_type' ); ?>" name="<?php echo $this->get_field_name( 'display_type' ); ?>" class="widefat">
|
170 |
+
<option value="grid"<?php selected( $display_type, 'grid' ); ?>><?php _e( 'Grid', 'gce' ); ?></option>
|
171 |
+
<!-- <option value="ajax"<?php selected( $display_type, 'ajax' ); ?>><?php _e( 'Calendar Grid - with AJAX', 'gce' ); ?></option> -->
|
172 |
+
<option value="list"<?php selected( $display_type, 'list' ); ?>><?php _e( 'List', 'gce' ); ?></option>
|
173 |
+
<option value="list-grouped"<?php selected( $display_type, 'list-grouped' );?>><?php _e( 'Grouped List', 'gce' ); ?></option>
|
174 |
+
</select>
|
175 |
+
</p>
|
176 |
+
|
177 |
+
<p>
|
178 |
+
<label for="<?php echo $this->get_field_id( 'max_events' ); ?>"><?php _e( 'Maximum no. events to display. Enter 0 to show all retrieved.' ); ?></label>
|
179 |
+
<input type="text" id="<?php echo $this->get_field_id( 'max_events' ); ?>" name="<?php echo $this->get_field_name( 'max_events' ); ?>" value="<?php echo $max_events; ?>" class="widefat" />
|
180 |
+
</p>
|
181 |
+
|
182 |
+
<p>
|
183 |
+
<label for="<?php echo $this->get_field_id( 'order' ); ?>"><?php _e( 'Sort order (only applies to lists):' ); ?></label>
|
184 |
+
<select id="<?php echo $this->get_field_id( 'order' ); ?>" name="<?php echo $this->get_field_name( 'order' ); ?>" class="widefat">
|
185 |
+
<option value="asc" <?php selected( $order, 'asc' ); ?>><?php _e( 'Ascending', 'gce' ); ?></option>
|
186 |
+
<option value="desc" <?php selected( $order, 'desc' ); ?>><?php _e( 'Descending', 'gce' ); ?></option>
|
187 |
+
</select>
|
188 |
+
</p>
|
189 |
+
<p>
|
190 |
+
<label for="<?php echo $this->get_field_id( 'display_title' ); ?>"><?php _e( 'Display title on tooltip / list item (e.g. \'Events on 7th March\') Grouped lists always have a title displayed.', 'gce' ); ?></label>
|
191 |
+
<input type="text" class="widefat" id="<?php echo $this->get_field_id( 'display_title_text' ); ?>" name="<?php echo $this->get_field_name( 'display_title_text' ); ?>" value="<?php echo $title_text; ?>" />
|
192 |
+
</p>
|
193 |
+
|
194 |
+
<?php
|
195 |
+
}
|
196 |
+
}
|
197 |
+
add_action( 'widgets_init', create_function( '', 'register_widget("GCE_Widget");' ) );
|
198 |
+
|
widget/gce-widget.php
DELETED
@@ -1,250 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class GCE_Widget extends WP_Widget {
|
3 |
-
function GCE_Widget() {
|
4 |
-
parent::WP_Widget(
|
5 |
-
false,
|
6 |
-
$name = __( 'Google Calendar Events', GCE_TEXT_DOMAIN ),
|
7 |
-
array( 'description' => __( 'Display a list or calendar grid of events from one or more Google Calendar feeds you have added', GCE_TEXT_DOMAIN ) )
|
8 |
-
);
|
9 |
-
}
|
10 |
-
|
11 |
-
function widget( $args, $instance ) {
|
12 |
-
extract( $args );
|
13 |
-
|
14 |
-
//Output before widget stuff
|
15 |
-
echo $before_widget;
|
16 |
-
|
17 |
-
//Get saved feed options
|
18 |
-
$options = get_option( GCE_OPTIONS_NAME );
|
19 |
-
|
20 |
-
//Check whether any feeds have been added yet
|
21 |
-
if( is_array( $options ) && ! empty( $options ) ) {
|
22 |
-
//Output title stuff
|
23 |
-
$title = empty( $instance['title'] ) ? '' : apply_filters( 'widget_title', $instance['title'] );
|
24 |
-
|
25 |
-
if ( ! empty( $title ) )
|
26 |
-
echo $before_title . $title . $after_title;
|
27 |
-
|
28 |
-
$no_feeds_exist = true;
|
29 |
-
$feed_ids = array();
|
30 |
-
|
31 |
-
if ( '' != $instance['id'] ) {
|
32 |
-
//Break comma delimited list of feed ids into array
|
33 |
-
$feed_ids = explode( ',', str_replace( ' ', '', $instance['id'] ) );
|
34 |
-
|
35 |
-
//Check each id is an integer, if not, remove it from the array
|
36 |
-
foreach ( $feed_ids as $key => $feed_id ) {
|
37 |
-
if ( 0 == absint( $feed_id ) )
|
38 |
-
unset( $feed_ids[$key] );
|
39 |
-
}
|
40 |
-
|
41 |
-
//If at least one of the feed ids entered exists, set no_feeds_exist to false
|
42 |
-
foreach ( $feed_ids as $feed_id ) {
|
43 |
-
if ( isset($options[$feed_id] ) )
|
44 |
-
$no_feeds_exist = false;
|
45 |
-
}
|
46 |
-
} else {
|
47 |
-
foreach ( $options as $feed ) {
|
48 |
-
$feed_ids[] = $feed['id'];
|
49 |
-
}
|
50 |
-
|
51 |
-
$no_feeds_exist = false;
|
52 |
-
}
|
53 |
-
|
54 |
-
//Check that at least one valid feed id has been entered
|
55 |
-
if ( empty( $feed_ids ) || $no_feeds_exist ) {
|
56 |
-
if ( current_user_can( 'manage_options' ) ) {
|
57 |
-
_e( 'No valid Feed IDs have been entered for this widget. Please check that you have entered the IDs correctly in the widget settings (Appearance > Widgets), and that the Feeds have not been deleted.', GCE_TEXT_DOMAIN );
|
58 |
-
} else {
|
59 |
-
$options = get_option( GCE_GENERAL_OPTIONS_NAME );
|
60 |
-
echo $options['error'];
|
61 |
-
}
|
62 |
-
} else {
|
63 |
-
//Turns feed_ids back into string or feed ids delimited by '-' ('1-2-3-4' for example)
|
64 |
-
$feed_ids = implode( '-', $feed_ids );
|
65 |
-
|
66 |
-
$title_text = ( $instance['display_title'] ) ? $instance['display_title_text'] : null;
|
67 |
-
$max_events = ( isset( $instance['max_events'] ) ) ? $instance['max_events'] : 0;
|
68 |
-
$sort_order = ( isset( $instance['order'] ) ) ? $instance['order'] : 'asc';
|
69 |
-
|
70 |
-
//Output correct widget content based on display type chosen
|
71 |
-
switch ( $instance['display_type'] ) {
|
72 |
-
case 'grid':
|
73 |
-
echo '<div class="gce-widget-grid" id="' . $args['widget_id'] . '-container">';
|
74 |
-
//Output main widget content as grid (no AJAX)
|
75 |
-
gce_widget_content_grid( $feed_ids, $title_text, $max_events, $args['widget_id'] . '-container' );
|
76 |
-
echo '</div>';
|
77 |
-
break;
|
78 |
-
case 'ajax':
|
79 |
-
echo '<div class="gce-widget-grid" id="' . $args['widget_id'] . '-container">';
|
80 |
-
//Output main widget content as grid (with AJAX)
|
81 |
-
gce_widget_content_grid( $feed_ids, $title_text, $max_events, $args['widget_id'] . '-container', true );
|
82 |
-
echo '</div>';
|
83 |
-
break;
|
84 |
-
case 'list':
|
85 |
-
echo '<div class="gce-widget-list" id="' . $args['widget_id'] . '-container">';
|
86 |
-
//Output main widget content as list
|
87 |
-
gce_widget_content_list( $feed_ids, $title_text, $max_events, $sort_order );
|
88 |
-
echo '</div>';
|
89 |
-
break;
|
90 |
-
case 'list-grouped':
|
91 |
-
echo '<div class="gce-widget-list" id="' . $args['widget_id'] . '-container">';
|
92 |
-
//Output main widget content as a grouped list
|
93 |
-
gce_widget_content_list( $feed_ids, $title_text, $max_events, $sort_order, true );
|
94 |
-
echo '</div>';
|
95 |
-
break;
|
96 |
-
}
|
97 |
-
}
|
98 |
-
} else {
|
99 |
-
if ( current_user_can( 'manage_options' ) ) {
|
100 |
-
_e( 'No feeds have been added yet. You can add a feed in the Google Calendar Events settings.', GCE_TEXT_DOMAIN );
|
101 |
-
} else {
|
102 |
-
$options = get_option( GCE_GENERAL_OPTIONS_NAME );
|
103 |
-
echo $options['error'];
|
104 |
-
}
|
105 |
-
}
|
106 |
-
|
107 |
-
if ( ! empty( $instance['after_widget_html'] ) )
|
108 |
-
echo wp_kses_post( $instance['after_widget_html'] );
|
109 |
-
|
110 |
-
//Output after widget stuff
|
111 |
-
echo $after_widget;
|
112 |
-
}
|
113 |
-
|
114 |
-
function update( $new_instance, $old_instance ) {
|
115 |
-
$instance = $old_instance;
|
116 |
-
$instance['title'] = esc_html( $new_instance['title'] );
|
117 |
-
$instance['id'] = esc_html( $new_instance['id'] );
|
118 |
-
$instance['display_type'] = esc_html( $new_instance['display_type'] );
|
119 |
-
$instance['max_events'] = absint( $new_instance['max_events'] );
|
120 |
-
$instance['order'] = ( 'asc' == $new_instance['order'] ) ? 'asc' : 'desc';
|
121 |
-
$instance['display_title'] = ( 'on' == $new_instance['display_title'] ) ? true : false;
|
122 |
-
$instance['display_title_text'] = wp_filter_kses( $new_instance['display_title_text'] );
|
123 |
-
$instance['after_widget_html'] = wp_kses_post( $new_instance['after_widget_html'] );
|
124 |
-
return $instance;
|
125 |
-
}
|
126 |
-
|
127 |
-
function form( $instance ) {
|
128 |
-
//Get saved feed options
|
129 |
-
$options = get_option( GCE_OPTIONS_NAME );
|
130 |
-
|
131 |
-
if ( empty( $options ) ) {
|
132 |
-
//If no feeds or groups ?>
|
133 |
-
<p><?php _e( 'No feeds have been added yet. You can add feeds in the Google Calendar Events settings.', GCE_TEXT_DOMAIN ); ?></p>
|
134 |
-
<?php
|
135 |
-
}else{
|
136 |
-
$title = ( isset( $instance['title'] ) ) ? $instance['title'] : '';
|
137 |
-
$ids = ( isset( $instance['id'] ) ) ? $instance['id'] : '';
|
138 |
-
$display_type = ( isset( $instance['display_type'] ) ) ? $instance['display_type'] : 'grid';
|
139 |
-
$max_events = ( isset( $instance['max_events'] ) ) ? $instance['max_events'] : 0;
|
140 |
-
$order = ( isset( $instance['order'] ) ) ? $instance['order'] : 'asc';
|
141 |
-
$display_title = ( isset($instance['display_title'] ) ) ? $instance['display_title'] : true;
|
142 |
-
$title_text = ( isset($instance['display_title_text'] ) ) ? $instance['display_title_text'] : 'Events on';
|
143 |
-
$after_widget_html = ( isset( $instance['after_widget_html'] ) ) ? $instance['after_widget_html'] : '';
|
144 |
-
?>
|
145 |
-
<p>
|
146 |
-
<label for="<?php echo $this->get_field_id( 'title' ); ?>">Title:</label>
|
147 |
-
<input type="text" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $title; ?>" class="widefat" />
|
148 |
-
</p><p>
|
149 |
-
<label for="<?php echo $this->get_field_id( 'id' ); ?>">
|
150 |
-
<?php _e( 'Feeds to display, as a comma separated list (e.g. 1, 2, 4). Leave blank to display all feeds:', GCE_TEXT_DOMAIN ); ?>
|
151 |
-
</label>
|
152 |
-
<input type="text" id="<?php echo $this->get_field_id( 'id' ); ?>" name="<?php echo $this->get_field_name( 'id' ); ?>" value="<?php echo $ids; ?>" class="widefat" />
|
153 |
-
</p><p>
|
154 |
-
<label for="<?php echo $this->get_field_id( 'display_type' ); ?>"><?php _e( 'Display events as:', GCE_TEXT_DOMAIN ); ?></label>
|
155 |
-
<select id="<?php echo $this->get_field_id( 'display_type' ); ?>" name="<?php echo $this->get_field_name( 'display_type' ); ?>" class="widefat">
|
156 |
-
<option value="grid"<?php selected( $display_type, 'grid' ); ?>><?php _e( 'Calendar Grid', GCE_TEXT_DOMAIN ); ?></option>
|
157 |
-
<option value="ajax"<?php selected( $display_type, 'ajax' ); ?>><?php _e( 'Calendar Grid - with AJAX', GCE_TEXT_DOMAIN ); ?></option>
|
158 |
-
<option value="list"<?php selected( $display_type, 'list' ); ?>><?php _e( 'List', GCE_TEXT_DOMAIN ); ?></option>
|
159 |
-
<option value="list-grouped"<?php selected( $display_type, 'list-grouped' );?>><?php _e( 'List - grouped by date', GCE_TEXT_DOMAIN ); ?></option>
|
160 |
-
</select>
|
161 |
-
</p><p>
|
162 |
-
<label for="<?php echo $this->get_field_id( 'max_events' ); ?>"><?php _e( 'Maximum no. events to display. Enter 0 to show all retrieved.' ); ?></label>
|
163 |
-
<input type="text" id="<?php echo $this->get_field_id( 'max_events' ); ?>" name="<?php echo $this->get_field_name( 'max_events' ); ?>" value="<?php echo $max_events; ?>" class="widefat" />
|
164 |
-
</p><p>
|
165 |
-
<label for="<?php echo $this->get_field_id( 'order' ); ?>"><?php _e( 'Sort order (only applies to lists):' ); ?></label>
|
166 |
-
<select id="<?php echo $this->get_field_id( 'order' ); ?>" name="<?php echo $this->get_field_name( 'order' ); ?>" class="widefat">
|
167 |
-
<option value="asc"<?php selected( $order, 'asc' ); ?>><?php _e( 'Ascending', GCE_TEXT_DOMAIN ); ?></option>
|
168 |
-
<option value="desc"<?php selected( $order, 'desc' ); ?>><?php _e( 'Descending', GCE_TEXT_DOMAIN ); ?></option>
|
169 |
-
</select>
|
170 |
-
</p><p>
|
171 |
-
<label for="<?php echo $this->get_field_id( 'display_title' ); ?>"><?php _e( 'Display title on tooltip / list item? (e.g. \'Events on 7th March\') Grouped lists always have a title displayed.', GCE_TEXT_DOMAIN ); ?></label>
|
172 |
-
<br />
|
173 |
-
<input type="checkbox" id="<?php echo $this->get_field_id( 'display_title' ); ?>" name="<?php echo $this->get_field_name( 'display_title' ); ?>"<?php checked( $display_title, true ); ?> value="on" />
|
174 |
-
<input type="text" id="<?php echo $this->get_field_id( 'display_title_text' ); ?>" name="<?php echo $this->get_field_name( 'display_title_text' ); ?>" value="<?php echo $title_text; ?>" style="width:90%;" />
|
175 |
-
</p><p>
|
176 |
-
<label for="<?php echo $this->get_field_id( 'after_widget_html' ); ?>"><?php _e( 'Text / HTML to display at bottom of widget.', GCE_TEXT_DOMAIN ); ?></label>
|
177 |
-
<br />
|
178 |
-
<input type="text" id="<?php echo $this->get_field_id( 'after_widget_html' ); ?>" name="<?php echo $this->get_field_name( 'after_widget_html' ); ?>" value="<?php echo esc_textarea( $after_widget_html ); ?>" style="width:90%;" />
|
179 |
-
</p>
|
180 |
-
<?php
|
181 |
-
}
|
182 |
-
}
|
183 |
-
}
|
184 |
-
|
185 |
-
function gce_widget_content_grid( $feed_ids, $title_text, $max_events, $widget_id, $ajaxified = false, $month = null, $year = null ) {
|
186 |
-
require_once WP_PLUGIN_DIR . '/' . GCE_PLUGIN_NAME . '/inc/gce-parser.php';
|
187 |
-
|
188 |
-
$ids = explode( '-', $feed_ids );
|
189 |
-
|
190 |
-
//Create new GCE_Parser object, passing array of feed id(s)
|
191 |
-
$grid = new GCE_Parser( $ids, $title_text, $max_events );
|
192 |
-
|
193 |
-
$num_errors = $grid->get_num_errors();
|
194 |
-
|
195 |
-
$markup = '';
|
196 |
-
|
197 |
-
//If there are less errors than feeds parsed, at least one feed must have parsed successfully so continue to display the grid
|
198 |
-
if ( $num_errors < count( $ids ) ) {
|
199 |
-
$title_text = isset( $title_text ) ? esc_html( $title_text) : 'null';
|
200 |
-
|
201 |
-
//If there was at least one error, and user is an admin, output error messages
|
202 |
-
if ( $num_errors > 0 && current_user_can( 'manage_options' ) )
|
203 |
-
$markup .= $grid->error_messages();
|
204 |
-
|
205 |
-
//Add AJAX script if required
|
206 |
-
if ( $ajaxified )
|
207 |
-
$markup .= '<script type="text/javascript">jQuery(document).ready(function($){gce_ajaxify("' . $widget_id . '", "' . $feed_ids . '", "' . $max_events . '", "' . $title_text .'", "widget");});</script>';
|
208 |
-
|
209 |
-
$markup .= $grid->get_grid( $year, $month, $ajaxified );
|
210 |
-
} else {
|
211 |
-
//If current user is an admin, display an error message explaining problem. Otherwise, display a 'nice' error messsage
|
212 |
-
if ( current_user_can( 'manage_options' ) ) {
|
213 |
-
$markup .= $grid->error_messages();
|
214 |
-
} else {
|
215 |
-
$options = get_option( GCE_GENERAL_OPTIONS_NAME );
|
216 |
-
$markup .= $options['error'];
|
217 |
-
}
|
218 |
-
}
|
219 |
-
|
220 |
-
echo $markup;
|
221 |
-
}
|
222 |
-
|
223 |
-
function gce_widget_content_list( $feed_ids, $title_text, $max_events, $sort_order, $grouped = false ) {
|
224 |
-
require_once WP_PLUGIN_DIR . '/' . GCE_PLUGIN_NAME . '/inc/gce-parser.php';
|
225 |
-
|
226 |
-
$ids = explode( '-', $feed_ids );
|
227 |
-
|
228 |
-
//Create new GCE_Parser object, passing array of feed id(s)
|
229 |
-
$list = new GCE_Parser( $ids, $title_text, $max_events, $sort_order );
|
230 |
-
|
231 |
-
$num_errors = $list->get_num_errors();
|
232 |
-
|
233 |
-
//If there are less errors than feeds parsed, at least one feed must have parsed successfully so continue to display the list
|
234 |
-
if ( $num_errors < count( $ids ) ) {
|
235 |
-
//If there was at least one error, and user is an admin, output error messages
|
236 |
-
if ( $num_errors > 0 && current_user_can( 'manage_options' ) )
|
237 |
-
echo $list->error_messages();
|
238 |
-
|
239 |
-
echo $list->get_list( $grouped );
|
240 |
-
} else {
|
241 |
-
//If current user is an admin, display an error message explaining problem(s). Otherwise, display a 'nice' error messsage
|
242 |
-
if ( current_user_can( 'manage_options' ) ) {
|
243 |
-
echo $list->error_messages();
|
244 |
-
} else {
|
245 |
-
$options = get_option( GCE_GENERAL_OPTIONS_NAME );
|
246 |
-
echo $options['error'];
|
247 |
-
}
|
248 |
-
}
|
249 |
-
}
|
250 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|