Changeset 3805019
- Timestamp:
- 11/16/2026 11:47:29 AM (6 days ago)
- Location:
- google-calendar-events/trunk
- Files:
-
- 72 edited
-
assets/generated/add-ons.min.css (modified) (1 diff)
-
assets/generated/admin-add-calendar.min.css (modified) (1 diff)
-
assets/generated/admin-add-calendar.min.js (modified) (1 diff)
-
assets/generated/admin-global.min.css (modified) (1 diff)
-
assets/generated/admin.min.css (modified) (1 diff)
-
assets/generated/admin.min.js (modified) (1 diff)
-
assets/generated/connect.min.css (modified) (1 diff)
-
assets/generated/default-calendar-common.min.css (modified) (1 diff)
-
assets/generated/default-calendar-grid.min.css (modified) (1 diff)
-
assets/generated/default-calendar-list.min.css (modified) (1 diff)
-
assets/generated/default-calendar.min.js (modified) (1 diff)
-
assets/generated/design-system.min.css (modified) (1 diff)
-
assets/generated/misc-settings.min.css (modified) (1 diff)
-
assets/generated/oauth-helper-admin.min.js (modified) (1 diff)
-
assets/generated/sc-event-admin.min.css (modified) (1 diff)
-
assets/generated/sc-event-admin.min.js (modified) (1 diff)
-
assets/generated/sc-event-single.min.css (modified) (1 diff)
-
google-calendar-events.php (modified) (3 diffs)
-
includes/abstracts/admin-page.php (modified) (1 diff)
-
includes/abstracts/calendar.php (modified) (3 diffs)
-
includes/admin/ajax.php (modified) (6 diffs)
-
includes/admin/bulk-actions.php (modified) (2 diffs)
-
includes/admin/fields/checkbox.php (modified) (2 diffs)
-
includes/admin/fields/date-picker.php (modified) (1 diff)
-
includes/admin/fields/datetime-format.php (modified) (11 diffs)
-
includes/admin/fields/license.php (modified) (4 diffs)
-
includes/admin/fields/radio.php (modified) (4 diffs)
-
includes/admin/fields/select.php (modified) (2 diffs)
-
includes/admin/fields/standard.php (modified) (2 diffs)
-
includes/admin/fields/textarea.php (modified) (1 diff)
-
includes/admin/metaboxes/settings.php (modified) (62 diffs)
-
includes/admin/notices.php (modified) (1 diff)
-
includes/admin/pages/components/progress.php (modified) (1 diff)
-
includes/admin/pages/connect/partials/google-calendar-api-key-connect.php (modified) (1 diff)
-
includes/admin/pages/connect/partials/helpful-links.php (modified) (1 diff)
-
includes/admin/pages/connect/partials/render-connect-fields.php (modified) (1 diff)
-
includes/admin/pages/connect/sidebar.php (modified) (1 diff)
-
includes/admin/pages/connect/steps/pro-credentials.php (modified) (2 diffs)
-
includes/admin/pages/licenses.php (modified) (1 diff)
-
includes/admin/pages/system-status.php (modified) (12 diffs)
-
includes/admin/post-types.php (modified) (6 diffs)
-
includes/admin/updater.php (modified) (5 diffs)
-
includes/calendars/admin/default-calendar-admin.php (modified) (12 diffs)
-
includes/calendars/views/default-calendar-grid.php (modified) (15 diffs)
-
includes/calendars/views/default-calendar-list.php (modified) (18 diffs)
-
includes/events/event-builder.php (modified) (1 diff)
-
includes/events/event.php (modified) (1 diff)
-
includes/events/events.php (modified) (1 diff)
-
includes/feeds/admin/google-admin.php (modified) (6 diffs)
-
includes/feeds/admin/grouped-calendars-admin.php (modified) (3 diffs)
-
includes/feeds/admin/ics-feed-admin.php (modified) (2 diffs)
-
includes/feeds/google.php (modified) (5 diffs)
-
includes/feeds/ics-feed.php (modified) (2 diffs)
-
includes/frontend/sc-event-single.php (modified) (13 diffs)
-
includes/functions/admin-svg.php (modified) (1 diff)
-
includes/functions/admin.php (modified) (4 diffs)
-
includes/functions/deprecated.php (modified) (1 diff)
-
includes/ics-export.php (modified) (6 diffs)
-
includes/main.php (modified) (1 diff)
-
includes/post-types.php (modified) (1 diff)
-
includes/updates/update-v300.php (modified) (1 diff)
-
includes/vendor/autoload.php (modified) (1 diff)
-
includes/vendor/composer/autoload_real.php (modified) (2 diffs)
-
includes/vendor/composer/autoload_static.php (modified) (2 diffs)
-
includes/widgets/calendar.php (modified) (3 diffs)
-
includes/wp-requirements.php (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
-
third-party/symfony/polyfill-php80/PhpToken.php (modified) (3 diffs)
-
third-party/vendor/autoload.php (modified) (1 diff)
-
third-party/vendor/composer/autoload_classmap.php (modified) (1 diff)
-
third-party/vendor/composer/autoload_real.php (modified) (2 diffs)
-
third-party/vendor/composer/autoload_static.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
google-calendar-events/trunk/assets/generated/add-ons.min.css
r3783403 r3805019 1 /*! Simple Calendar - 4.3. 21 /*! Simple Calendar - 4.3.3 2 2 * https://simplecalendar.io 3 3 * Copyright (c) Xtendify Technologies 2026 -
google-calendar-events/trunk/assets/generated/admin-add-calendar.min.css
r3783403 r3805019 1 /*! Simple Calendar - 4.3. 21 /*! Simple Calendar - 4.3.3 2 2 * https://simplecalendar.io 3 3 * Copyright (c) Xtendify Technologies 2026 -
google-calendar-events/trunk/assets/generated/admin-add-calendar.min.js
r3783403 r3805019 1 /*! Simple Calendar - 4.3. 21 /*! Simple Calendar - 4.3.3 2 2 * https://simplecalendar.io 3 3 * Copyright (c) Xtendify Technologies 2026 -
google-calendar-events/trunk/assets/generated/admin-global.min.css
r3783403 r3805019 1 /*! Simple Calendar - 4.3. 21 /*! Simple Calendar - 4.3.3 2 2 * https://simplecalendar.io 3 3 * Copyright (c) Xtendify Technologies 2026 -
google-calendar-events/trunk/assets/generated/admin.min.css
r3783403 r3805019 1 /*! Simple Calendar - 4.3. 21 /*! Simple Calendar - 4.3.3 2 2 * https://simplecalendar.io 3 3 * Copyright (c) Xtendify Technologies 2026 -
google-calendar-events/trunk/assets/generated/admin.min.js
r3783403 r3805019 1 /*! Simple Calendar - 4.3. 21 /*! Simple Calendar - 4.3.3 2 2 * https://simplecalendar.io 3 3 * Copyright (c) Xtendify Technologies 2026 -
google-calendar-events/trunk/assets/generated/connect.min.css
r3783403 r3805019 1 /*! Simple Calendar - 4.3. 21 /*! Simple Calendar - 4.3.3 2 2 * https://simplecalendar.io 3 3 * Copyright (c) Xtendify Technologies 2026 -
google-calendar-events/trunk/assets/generated/default-calendar-common.min.css
r3783403 r3805019 1 /*! Simple Calendar - 4.3. 21 /*! Simple Calendar - 4.3.3 2 2 * https://simplecalendar.io 3 3 * Copyright (c) Xtendify Technologies 2026 -
google-calendar-events/trunk/assets/generated/default-calendar-grid.min.css
r3783403 r3805019 1 /*! Simple Calendar - 4.3. 21 /*! Simple Calendar - 4.3.3 2 2 * https://simplecalendar.io 3 3 * Copyright (c) Xtendify Technologies 2026 -
google-calendar-events/trunk/assets/generated/default-calendar-list.min.css
r3783403 r3805019 1 /*! Simple Calendar - 4.3. 21 /*! Simple Calendar - 4.3.3 2 2 * https://simplecalendar.io 3 3 * Copyright (c) Xtendify Technologies 2026 -
google-calendar-events/trunk/assets/generated/default-calendar.min.js
r3783403 r3805019 1 /*! Simple Calendar - 4.3. 21 /*! Simple Calendar - 4.3.3 2 2 * https://simplecalendar.io 3 3 * Copyright (c) Xtendify Technologies 2026 -
google-calendar-events/trunk/assets/generated/design-system.min.css
r3783403 r3805019 1 /*! Simple Calendar - 4.3. 21 /*! Simple Calendar - 4.3.3 2 2 * https://simplecalendar.io 3 3 * Copyright (c) Xtendify Technologies 2026 -
google-calendar-events/trunk/assets/generated/misc-settings.min.css
r3783403 r3805019 1 /*! Simple Calendar - 4.3. 21 /*! Simple Calendar - 4.3.3 2 2 * https://simplecalendar.io 3 3 * Copyright (c) Xtendify Technologies 2026 -
google-calendar-events/trunk/assets/generated/oauth-helper-admin.min.js
r3783403 r3805019 1 /*! Simple Calendar - 4.3. 21 /*! Simple Calendar - 4.3.3 2 2 * https://simplecalendar.io 3 3 * Copyright (c) Xtendify Technologies 2026 -
google-calendar-events/trunk/assets/generated/sc-event-admin.min.css
r3783403 r3805019 1 /*! Simple Calendar - 4.3. 21 /*! Simple Calendar - 4.3.3 2 2 * https://simplecalendar.io 3 3 * Copyright (c) Xtendify Technologies 2026 -
google-calendar-events/trunk/assets/generated/sc-event-admin.min.js
r3783403 r3805019 1 /*! Simple Calendar - 4.3. 21 /*! Simple Calendar - 4.3.3 2 2 * https://simplecalendar.io 3 3 * Copyright (c) Xtendify Technologies 2026 -
google-calendar-events/trunk/assets/generated/sc-event-single.min.css
r3783403 r3805019 1 /*! Simple Calendar - 4.3. 21 /*! Simple Calendar - 4.3.3 2 2 * https://simplecalendar.io 3 3 * Copyright (c) Xtendify Technologies 2026 -
google-calendar-events/trunk/google-calendar-events.php
r3783403 r3805019 6 6 * Author: Simple Calendar 7 7 * Author URI: https://simplecalendar.io 8 * Version: 4.3. 28 * Version: 4.3.3 9 9 * Text Domain: google-calendar-events 10 10 * Domain Path: /i18n 11 * License: GPLv2 or later 12 * License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 13 * 12 14 * @copyright 2013-2023 Xtendify Technologies. All rights reserved. … … 22 24 $this_plugin_dir = plugin_dir_url(__FILE__); 23 25 $this_plugin_constants = [ 24 'SIMPLE_CALENDAR_VERSION' => '4.3. 2',26 'SIMPLE_CALENDAR_VERSION' => '4.3.3', 25 27 'SIMPLE_CALENDAR_MAIN_FILE' => __FILE__, 26 28 'SIMPLE_CALENDAR_URL' => $this_plugin_dir, … … 43 45 $this_plugin_checks = new SimCal_WP_Requirements('Simple Calendar', plugin_basename(__FILE__), [ 44 46 'PHP' => '7.3', 45 'WordPress' => ' 4.2',47 'WordPress' => '5.3', 46 48 'Extensions' => ['curl', 'iconv', 'json', 'mbstring'], 47 49 ]); -
google-calendar-events/trunk/includes/abstracts/admin-page.php
r3551626 r3805019 160 160 $default = $description ? '<p>' . $description . '</p>' : ''; 161 161 162 echo apply_filters('simcal_' . $this->option_group . '_' . $this->id . '_sections_callback', $default); 162 echo wp_kses_post( 163 apply_filters('simcal_' . $this->option_group . '_' . $this->id . '_sections_callback', $default), 164 ); 163 165 } 164 166 -
google-calendar-events/trunk/includes/abstracts/calendar.php
r3783403 r3805019 828 828 $params = [ 829 829 'action' => 'TEMPLATE', 830 'text' => rawurlencode( strip_tags((string) $event->title)),830 'text' => rawurlencode(wp_strip_all_tags((string) $event->title)), 831 831 'dates' => $gcal_dt_string, 832 'details' => rawurlencode( strip_tags((string) $event->description)),833 'location' => rawurlencode( strip_tags((string) ($event->start_location['address'] ?? ''))),832 'details' => rawurlencode(wp_strip_all_tags((string) $event->description)), 833 'location' => rawurlencode(wp_strip_all_tags((string) ($event->start_location['address'] ?? ''))), 834 834 'trp' => 'false', 835 835 ]; … … 909 909 910 910 echo '<div class="' . 911 $calendar_class.911 esc_attr($calendar_class) . 912 912 '" ' . 913 913 'data-calendar-id="' . 914 $this->id.914 esc_attr($this->id) . 915 915 '" ' . 916 916 'data-timezone="' . 917 $this->timezone.917 esc_attr($this->timezone) . 918 918 '" ' . 919 919 'data-offset="' . 920 $this->offset.920 esc_attr($this->offset) . 921 921 '" ' . 922 922 'data-week-start="' . 923 $this->week_starts.923 esc_attr($this->week_starts) . 924 924 '" ' . 925 925 'data-calendar-start="' . 926 $this->start.926 esc_attr($this->start) . 927 927 '" ' . 928 928 'data-calendar-end="' . 929 $this->end.929 esc_attr($this->end) . 930 930 '" ' . 931 931 'data-events-first="' . 932 $this->earliest_event.932 esc_attr($this->earliest_event) . 933 933 '" ' . 934 934 'data-events-last="' . 935 $this->latest_event.935 esc_attr($this->latest_event) . 936 936 '"' . 937 937 '>'; … … 1071 1071 if ('yes' == $poweredby || simcal_is_powered_by_mandatory($this->id)) { 1072 1072 $align = is_rtl() ? 'left' : 'right'; 1073 echo '<small class="simcal-powered simcal-align-' . 1074 $align . 1075 '">' . 1076 sprintf( 1077 __('Powered by <a href="%s" target="_blank">Simple Calendar</a>', 'google-calendar-events'), 1078 simcal_get_url('home'), 1079 ) . 1080 '</small>'; 1073 $credit = sprintf( 1074 /* translators: %s: URL to the Simple Calendar website */ 1075 __('Powered by <a href="%s" target="_blank">Simple Calendar</a>', 'google-calendar-events'), 1076 esc_url(simcal_get_url('home')), 1077 ); 1078 1079 echo '<small class="simcal-powered simcal-align-' . esc_attr($align) . '">' . wp_kses_post($credit) . '</small>'; 1081 1080 } 1082 1081 } -
google-calendar-events/trunk/includes/admin/ajax.php
r3632810 r3805019 243 243 $nonce = isset($_POST['nonce']) ? esc_attr($_POST['nonce']) : ''; 244 244 if (!wp_verify_nonce($nonce, 'simcal_rating_nonce')) { 245 /* translators: %s: error details */ 245 246 wp_send_json_error(sprintf(__('An error occurred: %s', 'google-calendar-events'), 'Nonce verification failed.')); 246 247 } 247 update_option('simple-calendar_admin_footer_text_rated', date('Y-m-d', time()));248 update_option('simple-calendar_admin_footer_text_rated', gmdate('Y-m-d', time())); 248 249 } 249 250 … … 273 274 $nonce = isset($_POST['nonce']) ? esc_attr($_POST['nonce']) : ''; 274 275 if (!wp_verify_nonce($nonce, 'simcal_license_manager')) { 276 /* translators: %s: error details */ 275 277 wp_send_json_error(sprintf(__('An error occurred: %s', 'google-calendar-events'), 'Nonce verification failed.')); 276 278 } … … 278 280 if (!current_user_can('edit_posts')) { 279 281 wp_send_json_error( 282 /* translators: %s: error details */ 280 283 sprintf(__('An error occurred: %s', 'google-calendar-events'), 'You don\'t have permission to make changes.'), 281 284 ); … … 321 324 wp_send_json_error( 322 325 sprintf( 326 /* translators: %s: error message */ 323 327 __('There was an error processing your request: %s', 'google-calendar-events'), 324 328 $response->get_error_message(), … … 361 365 // Verify this request comes from the add-ons licenses activation settings page. 362 366 if (empty($nonce) || !wp_verify_nonce($nonce, 'simcal_license_manager')) { 367 /* translators: %s: error details */ 363 368 wp_send_json_error(sprintf(__('An error occurred: %s', 'google-calendar-events'), 'Nonce verification failed.')); 364 369 } … … 367 372 if (!current_user_can('edit_posts')) { 368 373 wp_send_json_error( 374 /* translators: %s: error details */ 369 375 sprintf(__('An error occurred: %s', 'google-calendar-events'), 'You don\'t have permission to make changes.'), 370 376 ); -
google-calendar-events/trunk/includes/admin/bulk-actions.php
r3663004 r3805019 98 98 jQuery( document ).ready( function() { 99 99 <?php foreach ($this->actions as $action_name => $action): ?> 100 jQuery( '<option>' ).val( '<?php echo $action_name; ?>' ).text( '<?php echo $action[101 'menu_text'102 ]; ?>').appendTo( 'select[name="action"]');103 jQuery( '<option>' ).val( '<?php echo $action_name; ?>' ).text( '<?php echo $action[104 'menu_text'105 ]; ?>').appendTo( 'select[name="action2"]' );100 jQuery( '<option>' ).val( '<?php echo esc_js($action_name); ?>' ).text( '<?php echo esc_js( 101 $action['menu_text'], 102 ); ?>' ).appendTo( 'select[name="action"]' ); 103 jQuery( '<option>' ).val( '<?php echo esc_js($action_name); ?>' ).text( '<?php echo esc_js( 104 $action['menu_text'], 105 ); ?>' ).appendTo( 'select[name="action2"]' ); 106 106 <?php endforeach; ?> 107 107 } ); … … 212 212 } 213 213 214 $post_ids_count = is_array($post_ids) ? count($post_ids) : 1;215 216 214 if ($pagenow == 'edit.php' && $post_type == $this->bulk_action_post_type) { 217 215 if (isset($_REQUEST['success_action'])) { 218 // Print notice in admin bar. 216 // Print notice in admin bar. Message must be a translated string literal at registration. 219 217 $message = $this->actions[$_REQUEST['success_action']]['admin_notice']; 220 221 if (is_array($message)) {222 $message = sprintf(223 _n($message['single'], $message['plural'], $post_ids_count, 'google-calendar-events'),224 $post_ids_count,225 );226 }227 218 228 219 $class = 'updated notice is-dismissible above-h2'; 229 220 if (!empty($message)) { 230 echo "<div class=\"{$class}\"><p>{$message}</p></div>";221 echo '<div class="' . esc_attr($class) . '"><p>' . esc_html($message) . '</p></div>'; 231 222 } 232 223 } -
google-calendar-events/trunk/includes/admin/fields/checkbox.php
r2943704 r3805019 44 44 if (!empty($this->options) && count((array) $this->options) > 1) { 45 45 if (!empty($this->description)) { 46 echo '<p class="description">' . wp_kses_post($this->description) . ' ' . $this->tooltip . '</p>'; 46 $allowed_tooltip = ['i' => ['class' => [], 'data-tip' => []]]; 47 echo '<p class="description">' . 48 wp_kses_post($this->description) . 49 ' ' . 50 wp_kses($this->tooltip, $allowed_tooltip) . 51 '</p>'; 47 52 } ?> 48 <fieldset class="<?php echo $this->class; ?>" <?php echo !empty($this->style) ? 'style="' . $this->style . '"' : ''; ?>> 53 <fieldset class="<?php echo esc_attr($this->class); ?>" <?php echo !empty($this->style) 54 ? 'style="' . esc_attr($this->style) . '"' 55 : ''; ?>> 49 56 <?php if (!empty($this->title)) { 50 echo '<legend class="screen-reader-text"><span>' . $this->title. '</span></legend>';57 echo '<legend class="screen-reader-text"><span>' . esc_html($this->title) . '</span></legend>'; 51 58 } ?> 52 59 <ul> 53 60 <?php foreach ($this->options as $option => $name): ?> 54 61 <li> 55 <label for="<?php echo $this->id . '-' . trim(strval($option)); ?>">56 <input name="<?php echo $this->name; ?>"57 id="<?php echo $this->id . '-' . trim(strval($option)); ?>"62 <label for="<?php echo esc_attr($this->id . '-' . trim(strval($option))); ?>"> 63 <input name="<?php echo esc_attr($this->name); ?>" 64 id="<?php echo esc_attr($this->id . '-' . trim(strval($option))); ?>" 58 65 class="simcal-field simcal-field-checkbox" 59 66 type="checkbox" 60 value="<?php echo trim(strval($option)); ?>"67 value="<?php echo esc_attr(trim(strval($option))); ?>" 61 68 <?php checked($this->value, 'yes', true); ?> 62 <?php echo $this->attributes; ?>69 <?php echo wp_kses_post($this->attributes); ?> 63 70 /><?php echo esc_attr($name); ?> 64 71 </label> … … 70 77 } else { 71 78 ?> 72 <span class="simcal-field-bool" <?php echo $this->style ? 'style="' . $this->style. '"' : ''; ?>>79 <span class="simcal-field-bool" <?php echo $this->style ? 'style="' . esc_attr($this->style) . '"' : ''; ?>> 73 80 <?php if (!empty($this->title)): ?> 74 <span class="screen-reader-text"><?php echo $this->title; ?></span>81 <span class="screen-reader-text"><?php echo esc_html($this->title); ?></span> 75 82 <?php endif; ?> 76 <input name="<?php echo $this->name; ?>"83 <input name="<?php echo esc_attr($this->name); ?>" 77 84 type="checkbox" 78 id="<?php echo $this->id; ?>"79 class="simcal-field simcal-field-checkbox sc-chk-box <?php echo $this->class; ?>"85 id="<?php echo esc_attr($this->id); ?>" 86 class="simcal-field simcal-field-checkbox sc-chk-box <?php echo esc_attr($this->class); ?>" 80 87 value="yes" 81 88 <?php checked($this->value, 'yes', true); ?> 82 <?php echo $this->attributes; ?>/><?php echo !empty($this->text) ? $this->text : __('Yes', 'google-calendar-events'); ?> 83 </span> 89 <?php echo wp_kses_post($this->attributes); ?>/><?php echo !empty($this->text) 90 ? esc_html($this->text) 91 : esc_html__('Yes', 'google-calendar-events'); ?> 92 </span> 84 93 <?php 85 echo $this->tooltip; 94 $allowed_tooltip = ['i' => ['class' => [], 'data-tip' => []]]; 95 echo wp_kses($this->tooltip, $allowed_tooltip); 86 96 if (!empty($this->description)) { 87 97 echo '<p class="description">' . wp_kses_post($this->description) . '</p>'; -
google-calendar-events/trunk/includes/admin/fields/date-picker.php
r2943704 r3805019 72 72 echo '<p class="description">' . wp_kses_post($this->description) . '</p>'; 73 73 } ?> 74 <div id="<?php echo $this->id; ?>"75 class="<?php echo $this->class; ?>"76 <?php echo $this->style ? 'style="' . $this->style. '"' : ''; ?>77 <?php echo $this->attributes; ?>>74 <div id="<?php echo esc_attr($this->id); ?>" 75 class="<?php echo esc_attr($this->class); ?>" 76 <?php echo $this->style ? 'style="' . esc_attr($this->style) . '"' : ''; ?> 77 <?php echo wp_kses_post($this->attributes); ?>> 78 78 <?php if (false === $this->range) { ?> 79 79 <i class="simcal-icon-calendar"></i> 80 80 <input type="<?php echo $this->inline === true ? 'text' : 'hidden'; ?>" 81 name="<?php echo $this->name; ?>"82 value="<?php echo $this->value; ?>"81 name="<?php echo esc_attr($this->name); ?>" 82 value="<?php echo esc_attr($this->value); ?>" 83 83 placeholder="..." 84 84 readonly="readonly" /> 85 85 <?php if (true === $this->inline) { 86 echo $this->tooltip; 86 $allowed_tooltip = ['i' => ['class' => [], 'data-tip' => []]]; 87 echo wp_kses($this->tooltip, $allowed_tooltip); 87 88 }} ?> 88 89 </div> -
google-calendar-events/trunk/includes/admin/fields/datetime-format.php
r3551626 r3805019 47 47 $this->subtype = isset($field['subtype']) ? $field['subtype'] : ''; 48 48 $this->type_class = 'simcal-field-datetime-format simcal-field-' . $this->subtype . '-format-field'; 49 $this->timestamp = mktime(13, 10, 00, 1, 1, intval( date('Y', time())) + 1);49 $this->timestamp = mktime(13, 10, 00, 1, 1, intval(gmdate('Y', time())) + 1); 50 50 51 51 parent::__construct($field); … … 68 68 public function html() 69 69 { 70 $id = $this->id ? ' id="' . $this->id. '" ' : '';71 $class = $this->class ? ' class="' . $this->class. '" ' : '';72 $style = $this->style ? ' style="' . $this->style. '" ' : '';73 $attr = $this->attributes;74 ?> 75 <div <?php echo $id . $class . $style . $attr; ?>>70 $id = $this->id ? ' id="' . esc_attr($this->id) . '" ' : ''; 71 $class = $this->class ? ' class="' . esc_attr($this->class) . '" ' : ''; 72 $style = $this->style ? ' style="' . esc_attr($this->style) . '" ' : ''; 73 $attr = wp_kses_post($this->attributes); 74 ?> 75 <div <?php echo wp_kses_post($id . $class . $style . $attr); ?>> 76 76 <?php 77 77 if (!empty($this->description)) { 78 echo '<p class="description">' . $this->description. '</p>';78 echo '<p class="description">' . wp_kses_post($this->description) . '</p>'; 79 79 } 80 80 … … 90 90 ?> 91 91 <input type="hidden" 92 name="<?php echo $this->name; ?>"93 value="<?php echo trim($this->value); ?>" />92 name="<?php echo esc_attr($this->name); ?>" 93 value="<?php echo esc_attr(trim($this->value)); ?>" /> 94 94 <span> 95 <em><?php _e('Preview', 'google-calendar-events'); ?>:</em> 96 <code><?php echo date_i18n($this->value, $this->timestamp); ?></code>95 <em><?php esc_html_e('Preview', 'google-calendar-events'); ?>:</em> 96 <code><?php echo esc_html(date_i18n($this->value, $this->timestamp)); ?></code> 97 97 </span> 98 98 </div> … … 194 194 ?> 195 195 <div> 196 <label for="<?php echo $this->id; ?>-weekday"> 197 <?php _e('Weekday', 'google-calendar-events'); ?> 198 <select name="" id="<?php echo $this->id; ?>-weekday"> 199 <option value="" data-preview=""></option> 200 <option value="D" <?php selected('D', strpbrk('D', $this->value)); ?> data-preview="<?php echo date_i18n( 201 'D', 202 $this->timestamp, 203 ); ?>"><?php echo date_i18n('D', $this->timestamp); ?></option> 204 <option value="l" <?php selected('l', strpbrk('l', $this->value)); ?> data-preview="<?php echo date_i18n( 205 'l', 206 $this->timestamp, 207 ); ?>"><?php echo date_i18n('l', $this->timestamp); ?></option> 196 <label for="<?php echo esc_attr($this->id); ?>-weekday"> 197 <?php esc_html_e('Weekday', 'google-calendar-events'); ?> 198 <select name="" id="<?php echo esc_attr($this->id); ?>-weekday"> 199 <option value="" data-preview=""></option> 200 <option value="D" <?php selected('D', strpbrk('D', $this->value)); ?> data-preview="<?php echo esc_attr( 201 date_i18n('D', $this->timestamp), 202 ); ?>"><?php echo esc_html(date_i18n('D', $this->timestamp)); ?></option> 203 <option value="l" <?php selected('l', strpbrk('l', $this->value)); ?> data-preview="<?php echo esc_attr( 204 date_i18n('l', $this->timestamp), 205 ); ?>"><?php echo esc_html(date_i18n('l', $this->timestamp)); ?></option> 208 206 </select> 209 207 </label> … … 222 220 ?> 223 221 <div> 224 <label for="<?php echo $this->id; ?>-day"> 225 <?php _e('Day', 'google-calendar-events'); ?> 226 <select name="" id="<?php echo $this->id; ?>-day"> 227 <option value="" data-preview=""></option> 228 <option value="j" <?php selected('j', strpbrk('j', $this->value)); ?> data-preview="<?php echo date( 229 'j', 230 $this->timestamp, 231 ); ?>"><?php echo date('j', $this->timestamp); ?></option> 232 <option value="d" <?php selected('d', strpbrk('d', $this->value)); ?> data-preview="<?php echo date( 233 'd', 234 $this->timestamp, 235 ); ?>"><?php echo date('d', $this->timestamp); ?></option> 222 <label for="<?php echo esc_attr($this->id); ?>-day"> 223 <?php esc_html_e('Day', 'google-calendar-events'); ?> 224 <select name="" id="<?php echo esc_attr($this->id); ?>-day"> 225 <option value="" data-preview=""></option> 226 <option value="j" <?php selected('j', strpbrk('j', $this->value)); ?> data-preview="<?php echo esc_attr( 227 gmdate('j', $this->timestamp), 228 ); ?>"><?php echo esc_html(gmdate('j', $this->timestamp)); ?></option> 229 <option value="d" <?php selected('d', strpbrk('d', $this->value)); ?> data-preview="<?php echo esc_attr( 230 gmdate('d', $this->timestamp), 231 ); ?>"><?php echo esc_html(gmdate('d', $this->timestamp)); ?></option> 236 232 </select> 237 233 </label> … … 250 246 ?> 251 247 <div> 252 <label for="<?php echo $this->id; ?>-month"> 253 <?php _e('Month', 'google-calendar-events'); ?> 254 <select name="" id="<?php echo $this->id; ?>-month"> 255 <option value="" data-preview=""></option> 256 <option value="F" <?php selected('F', strpbrk('F', $this->value)); ?> data-preview="<?php echo date_i18n( 257 'F', 258 $this->timestamp, 259 ); ?>"><?php echo date_i18n('F', $this->timestamp); ?></option> 260 <option value="M" <?php selected('M', strpbrk('M', $this->value)); ?> data-preview="<?php echo date_i18n( 261 'M', 262 $this->timestamp, 263 ); ?>"><?php echo date_i18n('M', $this->timestamp); ?></option> 264 <option value="m" <?php selected('m', strpbrk('m', $this->value)); ?> data-preview="<?php echo date( 265 'm', 266 $this->timestamp, 267 ); ?>"><?php echo date('m', $this->timestamp); ?></option> 268 <option value="n" <?php selected('n', strpbrk('n', $this->value)); ?> data-preview="<?php echo date( 269 'n', 270 $this->timestamp, 271 ); ?>"><?php echo date('n', $this->timestamp); ?></option> 248 <label for="<?php echo esc_attr($this->id); ?>-month"> 249 <?php esc_html_e('Month', 'google-calendar-events'); ?> 250 <select name="" id="<?php echo esc_attr($this->id); ?>-month"> 251 <option value="" data-preview=""></option> 252 <option value="F" <?php selected('F', strpbrk('F', $this->value)); ?> data-preview="<?php echo esc_attr( 253 date_i18n('F', $this->timestamp), 254 ); ?>"><?php echo esc_html(date_i18n('F', $this->timestamp)); ?></option> 255 <option value="M" <?php selected('M', strpbrk('M', $this->value)); ?> data-preview="<?php echo esc_attr( 256 date_i18n('M', $this->timestamp), 257 ); ?>"><?php echo esc_html(date_i18n('M', $this->timestamp)); ?></option> 258 <option value="m" <?php selected('m', strpbrk('m', $this->value)); ?> data-preview="<?php echo esc_attr( 259 gmdate('m', $this->timestamp), 260 ); ?>"><?php echo esc_html(gmdate('m', $this->timestamp)); ?></option> 261 <option value="n" <?php selected('n', strpbrk('n', $this->value)); ?> data-preview="<?php echo esc_attr( 262 gmdate('n', $this->timestamp), 263 ); ?>"><?php echo esc_html(gmdate('n', $this->timestamp)); ?></option> 272 264 </select> 273 265 </label> … … 286 278 ?> 287 279 <div> 288 <label for="<?php echo $this->id; ?>-year"> 289 <?php _e('Year', 'google-calendar-events'); ?> 290 <select name="" id="<?php echo $this->id; ?>-year"> 291 <option value="" data-preview=""></option> 292 <option value="Y" <?php selected('Y', strpbrk('Y', $this->value)); ?> data-preview="<?php echo date( 293 'Y', 294 $this->timestamp, 295 ); ?>"><?php echo date('Y', $this->timestamp); ?></option> 296 <option value="y" <?php selected('y', strpbrk('y', $this->value)); ?> data-preview="<?php echo date( 297 'y', 298 $this->timestamp, 299 ); ?>"><?php echo date('y', $this->timestamp); ?></option> 280 <label for="<?php echo esc_attr($this->id); ?>-year"> 281 <?php esc_html_e('Year', 'google-calendar-events'); ?> 282 <select name="" id="<?php echo esc_attr($this->id); ?>-year"> 283 <option value="" data-preview=""></option> 284 <option value="Y" <?php selected('Y', strpbrk('Y', $this->value)); ?> data-preview="<?php echo esc_attr( 285 gmdate('Y', $this->timestamp), 286 ); ?>"><?php echo esc_html(gmdate('Y', $this->timestamp)); ?></option> 287 <option value="y" <?php selected('y', strpbrk('y', $this->value)); ?> data-preview="<?php echo esc_attr( 288 gmdate('y', $this->timestamp), 289 ); ?>"><?php echo esc_html(gmdate('y', $this->timestamp)); ?></option> 300 290 </select> 301 291 </label> … … 314 304 ?> 315 305 <div> 316 <label for="<?php echo $this->id; ?>-hours"> 317 <?php _e('Hours', 'google-calendar-events'); ?> 318 <select name="" id="<?php echo $this->id; ?>-hours"> 319 <option value="" data-preview=""></option> 320 <option value="g" <?php selected('g', strpbrk('g', $this->value)); ?> data-preview="<?php echo date( 321 'g', 322 $this->timestamp, 323 ); ?>"><?php echo date('g', $this->timestamp) . ' (12h)'; ?></option> 324 <option value="G" <?php selected('G', strpbrk('G', $this->value)); ?> data-preview="<?php echo date( 325 'G', 326 $this->timestamp - 43200, 327 ); ?>"><?php echo date('G', $this->timestamp - 43200) . ' (24h)'; ?></option> 328 <option value="h" <?php selected('h', strpbrk('h', $this->value)); ?> data-preview="<?php echo date( 329 'h', 330 $this->timestamp, 331 ); ?>"><?php echo date('h', $this->timestamp) . ' (12h)'; ?></option> 332 <option value="H" <?php selected('H', strpbrk('H', $this->value)); ?> data-preview="<?php echo date( 333 'H', 334 $this->timestamp - 43200, 335 ); ?>"><?php echo date('H', $this->timestamp - 43200) . ' (24h)'; ?></option> 306 <label for="<?php echo esc_attr($this->id); ?>-hours"> 307 <?php esc_html_e('Hours', 'google-calendar-events'); ?> 308 <select name="" id="<?php echo esc_attr($this->id); ?>-hours"> 309 <option value="" data-preview=""></option> 310 <option value="g" <?php selected('g', strpbrk('g', $this->value)); ?> data-preview="<?php echo esc_attr( 311 gmdate('g', $this->timestamp), 312 ); ?>"><?php echo esc_html(gmdate('g', $this->timestamp) . ' (12h)'); ?></option> 313 <option value="G" <?php selected('G', strpbrk('G', $this->value)); ?> data-preview="<?php echo esc_attr( 314 gmdate('G', $this->timestamp - 43200), 315 ); ?>"><?php echo esc_html(gmdate('G', $this->timestamp - 43200) . ' (24h)'); ?></option> 316 <option value="h" <?php selected('h', strpbrk('h', $this->value)); ?> data-preview="<?php echo esc_attr( 317 gmdate('h', $this->timestamp), 318 ); ?>"><?php echo esc_html(gmdate('h', $this->timestamp) . ' (12h)'); ?></option> 319 <option value="H" <?php selected('H', strpbrk('H', $this->value)); ?> data-preview="<?php echo esc_attr( 320 gmdate('H', $this->timestamp - 43200), 321 ); ?>"><?php echo esc_html(gmdate('H', $this->timestamp - 43200) . ' (24h)'); ?></option> 336 322 </select> 337 323 </label> … … 350 336 ?> 351 337 <div> 352 <label for="<?php echo $this->id; ?>-minutes"> 353 <?php _e('Minutes', 'google-calendar-events'); ?> 354 <select name="" id="<?php echo $this->id; ?>-minutes"> 355 <option value="" data-preview=""></option> 356 <option value="i" <?php selected('i', strpbrk('i', $this->value)); ?> data-preview="<?php echo date( 357 'i', 358 $this->timestamp, 359 ); ?>"><?php echo date('i', $this->timestamp); ?></option> 338 <label for="<?php echo esc_attr($this->id); ?>-minutes"> 339 <?php esc_html_e('Minutes', 'google-calendar-events'); ?> 340 <select name="" id="<?php echo esc_attr($this->id); ?>-minutes"> 341 <option value="" data-preview=""></option> 342 <option value="i" <?php selected('i', strpbrk('i', $this->value)); ?> data-preview="<?php echo esc_attr( 343 gmdate('i', $this->timestamp), 344 ); ?>"><?php echo esc_html(gmdate('i', $this->timestamp)); ?></option> 360 345 </select> 361 346 </label> … … 374 359 ?> 375 360 <div> 376 <label for="<?php echo $this->id; ?>-meridiem"> 377 <?php _e('Meridiem', 'google-calendar-events'); ?> 378 <select name="" id="<?php echo $this->id; ?>-meridiem"> 379 <option value="" data-preview=""></option> 380 <option value="a" <?php selected('a', strpbrk('a', $this->value)); ?> data-preview="<?php echo date( 381 'a', 382 $this->timestamp, 383 ); ?>"><?php echo date('a', $this->timestamp); ?></option> 384 <option value="A" <?php selected('A', strpbrk('A', $this->value)); ?> data-preview="<?php echo date( 385 'A', 386 $this->timestamp, 387 ); ?>"><?php echo date('A', $this->timestamp); ?></option> 361 <label for="<?php echo esc_attr($this->id); ?>-meridiem"> 362 <?php esc_html_e('Meridiem', 'google-calendar-events'); ?> 363 <select name="" id="<?php echo esc_attr($this->id); ?>-meridiem"> 364 <option value="" data-preview=""></option> 365 <option value="a" <?php selected('a', strpbrk('a', $this->value)); ?> data-preview="<?php echo esc_attr( 366 gmdate('a', $this->timestamp), 367 ); ?>"><?php echo esc_html(gmdate('a', $this->timestamp)); ?></option> 368 <option value="A" <?php selected('A', strpbrk('A', $this->value)); ?> data-preview="<?php echo esc_attr( 369 gmdate('A', $this->timestamp), 370 ); ?>"><?php echo esc_html(gmdate('A', $this->timestamp)); ?></option> 388 371 </select> 389 372 </label> … … 402 385 ?> 403 386 <div> 404 <label for="<?php echo $this->id; ?>-divider">405 <?php _ex('Divider', 'A character to separate two elements', 'google-calendar-events'); ?>406 <select name="" id="<?php echo $this->id; ?>-divider">387 <label for="<?php echo esc_attr($this->id); ?>-divider"> 388 <?php echo esc_html_x('Divider', 'A character to separate two elements', 'google-calendar-events'); ?> 389 <select name="" id="<?php echo esc_attr($this->id); ?>-divider"> 407 390 <option value="" data-preview=""></option> 408 391 <option value="." <?php selected('.', strpbrk('.', $this->value)); ?> data-preview="." data-trim="true">.</option> -
google-calendar-events/trunk/includes/admin/fields/license.php
r3551626 r3805019 102 102 </div> 103 103 <?php if (!empty($this->card_description)) { ?> 104 <p class="sc_text--body_b3 sc_addon_item_desc"><?php echo $this->card_description; ?></p>104 <p class="sc_text--body_b3 sc_addon_item_desc"><?php echo wp_kses_post($this->card_description); ?></p> 105 105 <?php } ?> 106 106 <?php } ?> 107 107 108 <div class="simcal-addon-manage-license-field" data-addon="<?php echo $this->addon; ?>">108 <div class="simcal-addon-manage-license-field" data-addon="<?php echo esc_attr($this->addon); ?>"> 109 109 <input 110 110 type="text" 111 <?php echo $disabled; ?>112 name="<?php echo $this->name; ?>"113 id="<?php echo $this->id; ?>"114 value="<?php echo $this->value; ?>"115 class="<?php echo trim('sc_input sc_input_muted sc_input_full ' . $this->class); ?>"111 <?php echo wp_kses_post($disabled); ?> 112 name="<?php echo esc_attr($this->name); ?>" 113 id="<?php echo esc_attr($this->id); ?>" 114 value="<?php echo esc_attr($this->value); ?>" 115 class="<?php echo esc_attr(trim('sc_input sc_input_muted sc_input_full ' . $this->class)); ?>" 116 116 /> 117 117 … … 121 121 ? '' 122 122 : ' is_hidden'; ?>" 123 data-add-on="<?php echo $this->addon; ?>"123 data-add-on="<?php echo esc_attr($this->addon); ?>" 124 124 > 125 125 <span class="sc_btn_submit"><?php esc_html_e('Deactivate', 'google-calendar-events'); ?></span> … … 136 136 ? '' 137 137 : ' is_hidden'; ?>" 138 data-add-on="<?php echo $this->addon; ?>"138 data-add-on="<?php echo esc_attr($this->addon); ?>" 139 139 > 140 140 <span class="sc_btn_submit"><?php esc_html_e('Activate', 'google-calendar-events'); ?></span> … … 149 149 <span class="error sc-error-notice is_hidden"></span> 150 150 <strong class="label sc_license_active_label<?php echo $show_active_label ? '' : ' is_hidden'; ?>"> 151 <?php _e('(active)', 'google-calendar-events'); ?>151 <?php esc_html_e('(active)', 'google-calendar-events'); ?> 152 152 </strong> 153 153 </div> -
google-calendar-events/trunk/includes/admin/fields/radio.php
r2943704 r3805019 53 53 { 54 54 ?> 55 <fieldset id="<?php echo $this->id; ?>"56 class="<?php echo $this->class; ?>"57 <?php echo $this->style ? 'style="' . $this->style. '"' : ''; ?>>55 <fieldset id="<?php echo esc_attr($this->id); ?>" 56 class="<?php echo esc_attr($this->class); ?>" 57 <?php echo $this->style ? 'style="' . esc_attr($this->style) . '"' : ''; ?>> 58 58 <?php 59 59 echo $this->description ? '<p class="description">' . wp_kses_post($this->description) . '</p>' : ''; … … 61 61 if (!empty($this->title)): ?> 62 62 <legend class="screen-reader-text"> 63 <span><?php echo $this->title; ?></span>63 <span><?php echo esc_html($this->title); ?></span> 64 64 </legend> 65 65 <?php endif; … … 68 68 <?php foreach ($this->options as $option => $name): ?> 69 69 <li> 70 <label for="<?php echo $this->id . '-' . trim(strval($option)); ?>">71 <input name="<?php echo $this->name; ?>"72 id="<?php echo $this->id . '-' . trim(strval($option)); ?>"70 <label for="<?php echo esc_attr($this->id . '-' . trim(strval($option))); ?>"> 71 <input name="<?php echo esc_attr($this->name); ?>" 72 id="<?php echo esc_attr($this->id . '-' . trim(strval($option))); ?>" 73 73 class="simcal-field simcal-field-radio" 74 74 type="radio" 75 value="<?php echo trim(strval($option)); ?>"76 <?php echo $this->attributes; ?>75 value="<?php echo esc_attr(trim(strval($option))); ?>" 76 <?php echo wp_kses_post($this->attributes); ?> 77 77 <?php checked($option, $this->value, true); ?> 78 78 /> … … 83 83 </ul> 84 84 85 <?php echo $this->tooltip; ?> 85 <?php 86 $allowed_tooltip = ['i' => ['class' => [], 'data-tip' => []]]; 87 echo wp_kses($this->tooltip, $allowed_tooltip);?> 86 88 87 89 </fieldset> -
google-calendar-events/trunk/includes/admin/fields/select.php
r2943704 r3805019 98 98 ?> 99 99 <select name="<?php 100 echo $this->name;100 echo esc_attr($this->name); 101 101 if ($this->multiselect === true) { 102 102 echo '[]'; 103 103 } 104 104 ?>" 105 id="<?php echo $this->id; ?>"106 style="<?php echo $this->style; ?>"107 class="<?php echo $this->class; ?>"108 <?php echo $this->attributes; ?>105 id="<?php echo esc_attr($this->id); ?>" 106 style="<?php echo esc_attr($this->style); ?>" 107 class="<?php echo esc_attr($this->class); ?>" 108 <?php echo wp_kses_post($this->attributes); ?> 109 109 <?php echo $this->multiselect === true ? ' multiple="multiple"' : ''; ?>> 110 110 <?php … … 119 119 $selected = selected($this->value, trim(strval($option)), false); 120 120 } 121 echo '<option value="' . $option . '" ' . $selected . '>' . esc_attr($name) . '</option>'; 121 echo '<option value="' . esc_attr($option) . '" '; 122 echo wp_kses_post($selected); 123 echo '>' . esc_attr($name) . '</option>'; 122 124 } 123 125 ?> 124 126 </select> 125 127 <?php 126 echo $this->tooltip; 128 $allowed_tooltip = ['i' => ['class' => [], 'data-tip' => []]]; 129 echo wp_kses($this->tooltip, $allowed_tooltip); 127 130 128 131 if (!empty($this->description)) { -
google-calendar-events/trunk/includes/admin/fields/standard.php
r2943704 r3805019 52 52 { 53 53 ?> 54 <input type="<?php echo $this->subtype; ?>"55 name="<?php echo $this->name; ?>"56 id="<?php echo $this->id; ?>"57 value="<?php echo $this->value; ?>"58 class="<?php echo $this->class; ?>"<?php59 echo $this->style ? 'style="' . $this->style. '" ' : ' ';60 echo $this->placeholder ? 'placeholder="' . $this->placeholder. '"' : ' ';61 echo $this->attributes;54 <input type="<?php echo esc_attr($this->subtype); ?>" 55 name="<?php echo esc_attr($this->name); ?>" 56 id="<?php echo esc_attr($this->id); ?>" 57 value="<?php echo esc_attr($this->value); ?>" 58 class="<?php echo esc_attr($this->class); ?>"<?php 59 echo $this->style ? 'style="' . esc_attr($this->style) . '" ' : ' '; 60 echo $this->placeholder ? 'placeholder="' . esc_attr($this->placeholder) . '"' : ' '; 61 echo wp_kses_post($this->attributes); 62 62 ?>/> 63 63 <?php 64 echo $this->tooltip; 64 $allowed_tooltip = ['i' => ['class' => [], 'data-tip' => []]]; 65 echo wp_kses($this->tooltip, $allowed_tooltip); 65 66 66 67 if (!empty($this->description)) { … … 69 70 70 71 if (is_string($this->validation) && !empty($this->validation)) { 71 echo $this->validation;72 echo wp_kses_post($this->validation); 72 73 } 73 74 } -
google-calendar-events/trunk/includes/admin/fields/textarea.php
r2943704 r3805019 50 50 ?> 51 51 <textarea 52 name="<?php echo $this->name; ?>"53 id="<?php echo $this->id; ?>"52 name="<?php echo esc_attr($this->name); ?>" 53 id="<?php echo esc_attr($this->id); ?>" 54 54 <?php 55 echo $this->class ? 'class="' . $this->class. '" ' : '';56 echo $this->placeholder ? 'placeholder="' . $this->placeholder. '" ' : '';57 echo $this->style ? 'style="' . $this->style. '" ' : '';58 echo $this->attributes;59 ?>><?php echo $this->value; ?></textarea>55 echo $this->class ? 'class="' . esc_attr($this->class) . '" ' : ''; 56 echo $this->placeholder ? 'placeholder="' . esc_attr($this->placeholder) . '" ' : ''; 57 echo $this->style ? 'style="' . esc_attr($this->style) . '" ' : ''; 58 echo wp_kses_post($this->attributes); 59 ?>><?php echo esc_textarea($this->value); ?></textarea> 60 60 <?php 61 echo $this->tooltip; 61 $allowed_tooltip = ['i' => ['class' => [], 'data-tip' => []]]; 62 echo wp_kses($this->tooltip, $allowed_tooltip); 62 63 63 64 if (!empty($this->description)) { -
google-calendar-events/trunk/includes/admin/metaboxes/settings.php
r3783403 r3805019 157 157 } 158 158 ?> 159 <label for="_feed_type"><span><?php _e('Event Source', 'google-calendar-events'); ?></span>159 <label for="_feed_type"><span><?php esc_html_e('Event Source', 'google-calendar-events'); ?></span> 160 160 <select name="_feed_type" id="_feed_type"> 161 161 <optgroup 162 label="<?php _ex('Get events from', 'From which calendar source to load events from', 'google-calendar-events'); ?>"> 162 label="<?php echo esc_attr_x( 163 'Get events from', 164 'From which calendar source to load events from', 165 'google-calendar-events', 166 ); ?>"> 163 167 <?php foreach ($feed_options as $feed => $name) { ?> 164 <option value="<?php echo $feed; ?>" <?php selected($feed, $feed_type, true); ?>><?php echo $name; ?></option> 168 <option value="<?php echo esc_attr($feed); ?>" <?php selected($feed, $feed_type, true); ?>><?php echo esc_html( 169 $name, 170 ); ?></option> 165 171 <?php } ?> 166 172 </optgroup> … … 180 186 } 181 187 ?> 182 <label for="_calendar_type"><span><?php _e('Calendar Type', 'google-calendar-events'); ?></span>188 <label for="_calendar_type"><span><?php esc_html_e('Calendar Type', 'google-calendar-events'); ?></span> 183 189 <select name="_calendar_type" id="_calendar_type"> 184 <optgroup label="<?php _e('Calendar to use', 'google-calendar-events'); ?>">190 <optgroup label="<?php esc_html_e('Calendar to use', 'google-calendar-events'); ?>"> 185 191 <?php foreach ($calendar_options as $calendar => $name) { ?> 186 <option value="<?php echo $calendar; ?>" <?php selected(192 <option value="<?php echo esc_attr($calendar); ?>" <?php selected( 187 193 $calendar, 188 194 $calendar_type, 189 195 true, 190 ); ?>><?php echo $name; ?></option>196 ); ?>><?php echo esc_html($name); ?></option> 191 197 <?php } ?> 192 198 </optgroup> … … 198 204 foreach ($calendar_views as $calendar => $views) { 199 205 $calendar_type_view = isset($calendar_view[$calendar]) ? $calendar_view[$calendar] : ''; ?> 200 <label for="_calendar_view_<?php echo $calendar; ?>">201 <span><?php _e('View', 'google-calendar-events'); ?></span>202 <select name="_calendar_view[<?php echo $calendar; ?>]"203 id="_calendar_view_<?php echo $calendar; ?>">204 <optgroup label="<?php _e('View to display', 'google-calendar-events'); ?>">206 <label for="_calendar_view_<?php echo esc_attr($calendar); ?>"> 207 <span><?php esc_html_e('View', 'google-calendar-events'); ?></span> 208 <select name="_calendar_view[<?php echo esc_attr($calendar); ?>]" 209 id="_calendar_view_<?php echo esc_attr($calendar); ?>"> 210 <optgroup label="<?php esc_html_e('View to display', 'google-calendar-events'); ?>"> 205 211 <?php foreach ($views as $view => $name) { ?> 206 <option value="<?php echo $view; ?>" <?php selected($view, $calendar_type_view, true); ?>><?php echo $name; ?></option> 212 <option value="<?php echo esc_attr($view); ?>" <?php selected($view, $calendar_type_view, true); ?>><?php echo esc_html( 213 $name, 214 ); ?></option> 207 215 <?php } ?> 208 216 </optgroup> … … 259 267 $class = $tab['class'] ? $tab['class'] : []; 260 268 261 echo '<li class="' . $key . '-settings ' . $key . '-tab ' . implode(' ', $class) . '" data-tab="' . $key . '">'; 269 echo '<li class="' . 270 esc_attr($key) . 271 '-settings ' . 272 esc_attr($key) . 273 '-tab ' . 274 esc_attr(implode(' ', $class)) . 275 '" data-tab="' . 276 esc_attr($key) . 277 '">'; 262 278 echo '<a href="#' . 263 $tab['target'].279 esc_attr($tab['target']) . 264 280 '"><i class="' . 265 $icon.281 esc_attr($icon) . 266 282 '" ></i> <span>' . 267 283 esc_html($tab['label']) . … … 286 302 <thead> 287 303 <tr> 288 <th colspan="2"><?php _e('Event Settings', 'google-calendar-events'); ?></th>304 <th colspan="2"><?php esc_html_e('Event Settings', 'google-calendar-events'); ?></th> 289 305 </tr> 290 306 </thead> … … 292 308 <tr class="simcal-panel-field"> 293 309 <th> 294 <label for="_calendar_begins"><?php _e('Calendar Start', 'google-calendar-events'); ?></label>310 <label for="_calendar_begins"><?php esc_html_e('Calendar Start', 'google-calendar-events'); ?></label> 295 311 </th> 296 312 <td> … … 325 341 id="_calendar_begins" 326 342 class="simcal-field simcal-field-select simcal-field-inline simcal-field-switch-other"> 327 <optgroup label="<?php _e('Days', 'google-calendar-events'); ?>">343 <optgroup label="<?php esc_html_e('Days', 'google-calendar-events'); ?>"> 328 344 <option value="today" 329 345 data-hide-fields="_calendar_begins_custom_date,_calendar_begins_nth" 330 <?php selected('today', $calendar_begins, true); ?>><?php _e('Today', 'google-calendar-events'); ?></option>346 <?php selected('today', $calendar_begins, true); ?>><?php esc_html_e('Today', 'google-calendar-events'); ?></option> 331 347 <option value="now" 332 348 data-hide-fields="_calendar_begins_custom_date,_calendar_begins_nth" 333 <?php selected('now', $calendar_begins, true); ?>><?php _e('Now', 'google-calendar-events'); ?></option>349 <?php selected('now', $calendar_begins, true); ?>><?php esc_html_e('Now', 'google-calendar-events'); ?></option> 334 350 <option value="days_before" 335 351 data-hide-field="_calendar_begins_custom_date" … … 338 354 $calendar_begins, 339 355 true, 340 ); ?>><?php _e('Day(s) before today', 'google-calendar-events'); ?></option>356 ); ?>><?php esc_html_e('Day(s) before today', 'google-calendar-events'); ?></option> 341 357 <option value="days_after" 342 358 data-hide-field="_calendar_begins_custom_date" … … 345 361 $calendar_begins, 346 362 true, 347 ); ?>><?php _e('Day(s) after today', 'google-calendar-events'); ?></option>363 ); ?>><?php esc_html_e('Day(s) after today', 'google-calendar-events'); ?></option> 348 364 </optgroup> 349 <optgroup label="<?php _e('Weeks', 'google-calendar-events'); ?>">365 <optgroup label="<?php esc_html_e('Weeks', 'google-calendar-events'); ?>"> 350 366 <option value="this_week" 351 367 data-hide-fields="_calendar_begins_custom_date,_calendar_begins_nth" 352 <?php selected('this_week', $calendar_begins, true); ?>><?php _e('This week', 'google-calendar-events'); ?></option> 368 <?php selected( 369 'this_week', 370 $calendar_begins, 371 true, 372 ); ?>><?php esc_html_e('This week', 'google-calendar-events'); ?></option> 353 373 <option value="weeks_before" 354 374 data-hide-field="_calendar_begins_custom_date" … … 357 377 $calendar_begins, 358 378 true, 359 ); ?>><?php _e('Week(s) before current', 'google-calendar-events'); ?></option>379 ); ?>><?php esc_html_e('Week(s) before current', 'google-calendar-events'); ?></option> 360 380 <option value="weeks_after" 361 381 data-hide-field="_calendar_begins_custom_date" … … 364 384 $calendar_begins, 365 385 true, 366 ); ?>><?php _e('Week(s) after current', 'google-calendar-events'); ?></option>386 ); ?>><?php esc_html_e('Week(s) after current', 'google-calendar-events'); ?></option> 367 387 </optgroup> 368 <optgroup label="<?php _e('Months', 'google-calendar-events'); ?>">388 <optgroup label="<?php esc_html_e('Months', 'google-calendar-events'); ?>"> 369 389 <option value="this_month" 370 390 data-hide-fields="_calendar_begins_custom_date,_calendar_begins_nth" 371 <?php selected('this_month', $calendar_begins, true); ?>><?php _e('This month', 'google-calendar-events'); ?></option> 391 <?php selected( 392 'this_month', 393 $calendar_begins, 394 true, 395 ); ?>><?php esc_html_e('This month', 'google-calendar-events'); ?></option> 372 396 <option value="months_before" 373 397 data-hide-field="_calendar_begins_custom_date" … … 376 400 $calendar_begins, 377 401 true, 378 ); ?>><?php _e('Month(s) before current', 'google-calendar-events'); ?></option>402 ); ?>><?php esc_html_e('Month(s) before current', 'google-calendar-events'); ?></option> 379 403 <option value="months_after" 380 404 data-hide-field="_calendar_begins_custom_date" … … 383 407 $calendar_begins, 384 408 true, 385 ); ?>><?php _e('Month(s) after current', 'google-calendar-events'); ?></option>409 ); ?>><?php esc_html_e('Month(s) after current', 'google-calendar-events'); ?></option> 386 410 </optgroup> 387 <optgroup label="<?php _e('Years', 'google-calendar-events'); ?>">411 <optgroup label="<?php esc_html_e('Years', 'google-calendar-events'); ?>"> 388 412 <option value="this_year" 389 413 data-hide-fields="_calendar_begins_custom_date,_calendar_begins_nth" 390 <?php selected('this_year', $calendar_begins, true); ?>><?php _e('This year', 'google-calendar-events'); ?></option> 414 <?php selected( 415 'this_year', 416 $calendar_begins, 417 true, 418 ); ?>><?php esc_html_e('This year', 'google-calendar-events'); ?></option> 391 419 <option value="years_before" 392 420 data-show-field="_calendar_begins_nth" <?php selected( … … 394 422 $calendar_begins, 395 423 true, 396 ); ?>><?php _e('Year(s) before current', 'google-calendar-events'); ?></option>424 ); ?>><?php esc_html_e('Year(s) before current', 'google-calendar-events'); ?></option> 397 425 <option value="years_after" 398 426 data-hide-field="_calendar_begins_custom_date" … … 401 429 $calendar_begins, 402 430 true, 403 ); ?>><?php _e('Year(s) after current', 'google-calendar-events'); ?></option>431 ); ?>><?php esc_html_e('Year(s) after current', 'google-calendar-events'); ?></option> 404 432 </optgroup> 405 <optgroup label="<?php _e('Other', 'google-calendar-events'); ?>">433 <optgroup label="<?php esc_html_e('Other', 'google-calendar-events'); ?>"> 406 434 <option value="custom_date" 407 435 data-hide-field="_calendar_begins_nth" … … 410 438 $calendar_begins, 411 439 true, 412 ); ?>><?php _e('Specific date', 'google-calendar-events'); ?></option>440 ); ?>><?php esc_html_e('Specific date', 'google-calendar-events'); ?></option> 413 441 </optgroup> 414 442 </select> … … 422 450 ]); ?> 423 451 <i class="simcal-icon-help simcal-help-tip" 424 data-tip="<?php _e(452 data-tip="<?php esc_attr_e( 425 453 'The calendar default opening date. It will automatically adapt based on the chosen calendar type.', 426 454 'google-calendar-events', … … 430 458 <tr class="simcal-panel-field"> 431 459 <th> 432 <label for="_feed_earliest_event_date"><?php _e('Earliest Event', 'google-calendar-events'); ?></label>460 <label for="_feed_earliest_event_date"><?php esc_html_e('Earliest Event', 'google-calendar-events'); ?></label> 433 461 </th> 434 462 <td> … … 458 486 $earliest_event, 459 487 true, 460 ); ?>><?php _e('Same as start date', 'google-calendar-events'); ?></option>488 ); ?>><?php esc_html_e('Same as start date', 'google-calendar-events'); ?></option> 461 489 <option value="days_before" 462 490 data-show-field="_feed_earliest_event_date_range" <?php selected( … … 464 492 $earliest_event, 465 493 true, 466 ); ?>><?php _e('Day(s) before start date', 'google-calendar-events'); ?></option>494 ); ?>><?php esc_html_e('Day(s) before start date', 'google-calendar-events'); ?></option> 467 495 <option value="weeks_before" 468 496 data-show-field="_feed_earliest_event_date_range" <?php selected( … … 470 498 $earliest_event, 471 499 true, 472 ); ?>><?php _e('Week(s) before start date', 'google-calendar-events'); ?></option>500 ); ?>><?php esc_html_e('Week(s) before start date', 'google-calendar-events'); ?></option> 473 501 <option value="months_before" 474 502 data-show-field="_feed_earliest_event_date_range" <?php selected( … … 476 504 $earliest_event, 477 505 true, 478 ); ?>><?php _e('Month(s) before start date', 'google-calendar-events'); ?></option>506 ); ?>><?php esc_html_e('Month(s) before start date', 'google-calendar-events'); ?></option> 479 507 <option value="years_before" 480 508 data-show-field="_feed_earliest_event_date_range" <?php selected( … … 482 510 $earliest_event, 483 511 true, 484 ); ?>><?php _e('Year(s) before start date', 'google-calendar-events'); ?></option>512 ); ?>><?php esc_html_e('Year(s) before start date', 'google-calendar-events'); ?></option> 485 513 </select> 486 514 <i class="simcal-icon-help simcal-help-tip" 487 data-tip="<?php _e(515 data-tip="<?php esc_attr_e( 488 516 'Set the date for the earliest possible event to show in calendar. There will not be events before this date.', 489 517 'google-calendar-events', … … 493 521 <tr class="simcal-panel-field"> 494 522 <th> 495 <label for="_feed_latest_event_date"><?php _e('Latest Event', 'google-calendar-events'); ?></label>523 <label for="_feed_latest_event_date"><?php esc_html_e('Latest Event', 'google-calendar-events'); ?></label> 496 524 </th> 497 525 <td> … … 521 549 $earliest_event, 522 550 true, 523 ); ?>><?php _e('Day end of start date', 'google-calendar-events'); ?></option>551 ); ?>><?php esc_html_e('Day end of start date', 'google-calendar-events'); ?></option> 524 552 <option value="days_after" 525 553 data-show-field="_feed_latest_event_date_range" <?php selected( … … 527 555 $latest_event, 528 556 true, 529 ); ?>><?php _e('Day(s) after start date', 'google-calendar-events'); ?></option>557 ); ?>><?php esc_html_e('Day(s) after start date', 'google-calendar-events'); ?></option> 530 558 <option value="weeks_after" 531 559 data-show-field="_feed_latest_event_date_range" <?php selected( … … 533 561 $latest_event, 534 562 true, 535 ); ?>><?php _e('Weeks(s) after start date', 'google-calendar-events'); ?></option>563 ); ?>><?php esc_html_e('Weeks(s) after start date', 'google-calendar-events'); ?></option> 536 564 <option value="months_after" 537 565 data-show-field="_feed_latest_event_date_range" <?php selected( … … 539 567 $latest_event, 540 568 true, 541 ); ?>><?php _e('Month(s) after start date', 'google-calendar-events'); ?></option>569 ); ?>><?php esc_html_e('Month(s) after start date', 'google-calendar-events'); ?></option> 542 570 <option value="years_after" 543 571 data-show-field="_feed_latest_event_date_range" <?php selected( … … 545 573 $latest_event, 546 574 true, 547 ); ?>><?php _e('Year(s) after start date', 'google-calendar-events'); ?></option>575 ); ?>><?php esc_html_e('Year(s) after start date', 'google-calendar-events'); ?></option> 548 576 </select> 549 577 <i class="simcal-icon-help simcal-help-tip" 550 data-tip="<?php _e(578 data-tip="<?php esc_attr_e( 551 579 'Set the date for the latest possible event to show on calendar. There will not be events after this date.', 552 580 'google-calendar-events', … … 573 601 <thead> 574 602 <tr> 575 <th colspan="2"><?php _e('Miscellaneous', 'google-calendar-events'); ?></th>603 <th colspan="2"><?php esc_html_e('Miscellaneous', 'google-calendar-events'); ?></th> 576 604 </tr> 577 605 </thead> … … 580 608 <tr class="simcal-panel-field"> 581 609 <th> 582 <label for="_display_ics_export"><?php _e('Export Calendar', 'google-calendar-events'); ?></label>610 <label for="_display_ics_export"><?php esc_html_e('Export Calendar', 'google-calendar-events'); ?></label> 583 611 </th> 584 612 <td> … … 649 677 <tr class="simcal-panel-field"> 650 678 <th> 651 <label for="_calendar_is_static"><?php _e('Static Calendar', 'google-calendar-events'); ?></label>679 <label for="_calendar_is_static"><?php esc_html_e('Static Calendar', 'google-calendar-events'); ?></label> 652 680 </th> 653 681 <td> … … 671 699 <tr class="simcal-panel-field"> 672 700 <th> 673 <label for="_no_events_message"><?php _e('No Events Message', 'google-calendar-events'); ?></label>701 <label for="_no_events_message"><?php esc_html_e('No Events Message', 'google-calendar-events'); ?></label> 674 702 </th> 675 703 <td> … … 689 717 <tr class="simcal-panel-field"> 690 718 <th> 691 <label for="_event_formatting"><?php _e('Event Formatting', 'google-calendar-events'); ?></label>719 <label for="_event_formatting"><?php esc_html_e('Event Formatting', 'google-calendar-events'); ?></label> 692 720 </th> 693 721 <td> … … 719 747 <tr class="simcal-panel-field"> 720 748 <th> 721 <label for="_poweredby"><?php _e('Powered By', 'google-calendar-events'); ?></label>749 <label for="_poweredby"><?php esc_html_e('Powered By', 'google-calendar-events'); ?></label> 722 750 </th> 723 751 <td> … … 758 786 <thead> 759 787 <tr> 760 <th colspan="2"><?php _e('Date and Time', 'google-calendar-events'); ?></th>788 <th colspan="2"><?php esc_html_e('Date and Time', 'google-calendar-events'); ?></th> 761 789 </tr> 762 790 </thead> … … 764 792 <tr class="simcal-panel-field"> 765 793 <th> 766 <label for="_calendar_timezone_setting"><?php _e('Timezone', 'google-calendar-events'); ?></label>794 <label for="_calendar_timezone_setting"><?php esc_html_e('Timezone', 'google-calendar-events'); ?></label> 767 795 </th> 768 796 <td> … … 788 816 $timezone_setting, 789 817 true, 790 ); ?>><?php printf(_x('Site default', 'Use this site default setting', 'google-calendar-events') . ' (%s)', $timezone_default); ?></option>818 ); ?>><?php echo esc_html(sprintf(_x('Site default', 'Use this site default setting', 'google-calendar-events') . ' (%s)', $timezone_default)); ?></option> 791 819 <?php if ($show_use_calendar) { ?> 792 820 <option id="use_calendar" value="use_calendar" 793 data-show-field="_use_calendar_warning" <?php selected('use_calendar', $timezone_setting, true); ?>><?php _ex( 821 data-show-field="_use_calendar_warning" <?php selected( 822 'use_calendar', 823 $timezone_setting, 824 true, 825 ); ?>><?php echo esc_html_x( 794 826 'Event source default', 795 827 'Use the calendar default setting', … … 802 834 $timezone_setting, 803 835 true, 804 ); ?>><?php _ex('Custom', 'Use a custom setting', 'google-calendar-events'); ?></option>836 ); ?>><?php echo esc_html_x('Custom', 'Use a custom setting', 'google-calendar-events'); ?></option> 805 837 </select> 806 838 <select name="_feed_timezone" … … 811 843 </select> 812 844 <i class="simcal-icon-help simcal-help-tip" 813 data-tip="<?php _e(845 data-tip="<?php esc_attr_e( 814 846 'Using a different timezone may alter the date and time display of your calendar events. We recommended using the site default timezone.', 815 847 'google-calendar-events', 816 848 ); ?>"></i> 817 849 <p id="_use_calendar_warning" style="display: none;" class="simcal-field"> 818 <span class="attention"><?php _e('Warning', 'google-calendar-events'); ?>:</span> 819 <?php _e( 820 'Setting this to <code>Event source default</code> can at times cause unexpected results. Please test thoroughly.', 821 'google-calendar-events', 850 <span class="attention"><?php esc_html_e('Warning', 'google-calendar-events'); ?>:</span> 851 <?php echo wp_kses_post( 852 __( 853 'Setting this to <code>Event source default</code> can at times cause unexpected results. Please test thoroughly.', 854 'google-calendar-events', 855 ), 822 856 ); ?> 823 857 <a href="http://docs.simplecalendar.io/timezone-settings/" 824 target="_blank"><?php _e('See details.', 'google-calendar-events'); ?></a>858 target="_blank"><?php esc_html_e('See details.', 'google-calendar-events'); ?></a> 825 859 </p> 826 860 </td> … … 828 862 <tr class="simcal-panel-field"> 829 863 <th> 830 <label for="_calendar_date_format_setting"><?php _e('Date Format', 'google-calendar-events'); ?></label>864 <label for="_calendar_date_format_setting"><?php esc_html_e('Date Format', 'google-calendar-events'); ?></label> 831 865 </th> 832 866 <td> … … 846 880 $date_format_setting, 847 881 true, 848 ); ?>><?php _ex('Site default', 'Use this site default setting', 'google-calendar-events'); ?></option>882 ); ?>><?php echo esc_html_x('Site default', 'Use this site default setting', 'google-calendar-events'); ?></option> 849 883 <option value="use_custom" 850 884 data-show-field="_calendar_date_format" <?php selected( … … 852 886 $date_format_setting, 853 887 true, 854 ); ?>><?php _ex('Custom', 'Use a custom setting', 'google-calendar-events'); ?></option>888 ); ?>><?php echo esc_html_x('Custom', 'Use a custom setting', 'google-calendar-events'); ?></option> 855 889 <option value="use_custom_php" 856 890 data-show-field="_calendar_date_format_php_field" <?php selected( … … 858 892 $date_format_setting, 859 893 true, 860 ); ?>><?php _e('Custom (PHP format)', 'google-calendar-events'); ?></option>894 ); ?>><?php esc_html_e('Custom (PHP format)', 'google-calendar-events'); ?></option> 861 895 </select> 862 896 <i class="simcal-icon-help simcal-help-tip" 863 data-tip="<?php _e(897 data-tip="<?php esc_attr_e( 864 898 'This option sets how calendars display event dates. It is recommended to keep your site default setting.', 865 899 'google-calendar-events', … … 867 901 <p id="_calendar_date_format_default" 868 902 style="<?php echo $date_format_setting != 'use_site' ? 'display: none;' : ''; ?>"> 869 <em><?php _e('Preview', 'google-calendar-events'); ?>:</em> 870 <code><?php echo date_i18n($date_format_default, time()); ?></code>903 <em><?php esc_html_e('Preview', 'google-calendar-events'); ?>:</em> 904 <code><?php echo esc_html(date_i18n($date_format_default, time())); ?></code> 871 905 </p> 872 906 <?php simcal_print_field([ … … 886 920 id="_calendar_date_format_php" 887 921 class="simcal-field simcal-field-text simcal-field-small" 888 value="<?php echo $date_format_php; ?>"/> 889 <?php printf( 890 __('Enter a date format using %s values.', 'google-calendar-events'), 891 '<a href="//php.net/manual/en/function.date.php" target="_blank">PHP</a>', 922 value="<?php echo esc_attr($date_format_php); ?>"/> 923 <?php echo wp_kses_post( 924 sprintf( 925 /* translators: %s: link to PHP date format documentation */ 926 __('Enter a date format using %s values.', 'google-calendar-events'), 927 '<a href="//php.net/manual/en/function.date.php" target="_blank">PHP</a>', 928 ), 892 929 ); ?> 893 930 </label> 894 931 <p> 895 <em><?php _e('Preview', 'google-calendar-events'); ?>:</em> 896 <code><?php echo date_i18n($date_format_php, time()); ?></code>932 <em><?php esc_html_e('Preview', 'google-calendar-events'); ?>:</em> 933 <code><?php echo esc_html(date_i18n($date_format_php, time())); ?></code> 897 934 </p> 898 935 </div> … … 901 938 <tr class="simcal-panel-field"> 902 939 <th> 903 <label for="_calendar_datetime_separator"><?php _e('Separator', 'google-calendar-events'); ?></label>940 <label for="_calendar_datetime_separator"><?php esc_html_e('Separator', 'google-calendar-events'); ?></label> 904 941 </th> 905 942 <td> … … 922 959 <tr class="simcal-panel-field"> 923 960 <th> 924 <label for="_calendar_datetime_separator_spacing"><?php _e(961 <label for="_calendar_datetime_separator_spacing"><?php esc_html_e( 925 962 'Preserve Separator Spacing', 926 963 'google-calendar-events', … … 947 984 <tr class="simcal-panel-field"> 948 985 <th> 949 <label for="_calendar_time_format_setting"><?php _e('Time Format', 'google-calendar-events'); ?></label>986 <label for="_calendar_time_format_setting"><?php esc_html_e('Time Format', 'google-calendar-events'); ?></label> 950 987 </th> 951 988 <td> … … 965 1002 $time_format_setting, 966 1003 true, 967 ); ?>><?php _ex('Site default', 'Use this site default setting', 'google-calendar-events'); ?></option>1004 ); ?>><?php echo esc_html_x('Site default', 'Use this site default setting', 'google-calendar-events'); ?></option> 968 1005 <option value="use_custom" 969 1006 data-show-field="_calendar_time_format" <?php selected( … … 971 1008 $time_format_setting, 972 1009 true, 973 ); ?>><?php _ex('Custom', 'Use a custom setting', 'google-calendar-events'); ?></option>1010 ); ?>><?php echo esc_html_x('Custom', 'Use a custom setting', 'google-calendar-events'); ?></option> 974 1011 <option value="use_custom_php" 975 1012 data-show-field="_calendar_time_format_php_field" <?php selected( … … 977 1014 $time_format_setting, 978 1015 true, 979 ); ?>><?php _e('Custom (PHP format)', 'google-calendar-events'); ?></option>1016 ); ?>><?php esc_html_e('Custom (PHP format)', 'google-calendar-events'); ?></option> 980 1017 </select> 981 1018 <i class="simcal-icon-help simcal-help-tip" 982 data-tip="<?php _e(1019 data-tip="<?php esc_attr_e( 983 1020 'This option sets how calendars display event times. It is recommended to keep your site default setting.', 984 1021 'google-calendar-events', … … 986 1023 <p id="_calendar_time_format_default" 987 1024 style="<?php echo $time_format_setting != 'use_site' ? 'display: none;' : ''; ?>"> 988 <em><?php _e('Preview', 'google-calendar-events'); ?>:</em> 989 <code><?php echo date_i18n($time_format_default, time()); ?></code>1025 <em><?php esc_html_e('Preview', 'google-calendar-events'); ?>:</em> 1026 <code><?php echo esc_html(date_i18n($time_format_default, time())); ?></code> 990 1027 </p> 991 1028 <?php simcal_print_field([ … … 1005 1042 id="_calendar_time_format_php" 1006 1043 class="simcal-field simcal-field-text simcal-field-small" 1007 value="<?php echo $time_format_php; ?>"/> 1008 <?php printf( 1009 __('Enter a time format using %s values.', 'google-calendar-events'), 1010 '<a href="//php.net/manual/en/function.date.php" target="_blank">PHP</a>', 1044 value="<?php echo esc_attr($time_format_php); ?>"/> 1045 <?php echo wp_kses_post( 1046 sprintf( 1047 /* translators: %s: link to PHP date format documentation */ 1048 __('Enter a time format using %s values.', 'google-calendar-events'), 1049 '<a href="//php.net/manual/en/function.date.php" target="_blank">PHP</a>', 1050 ), 1011 1051 ); ?> 1012 1052 </label> 1013 1053 <p> 1014 <em><?php _e('Preview', 'google-calendar-events'); ?>:</em> 1015 <code><?php echo date_i18n($time_format_php, time()); ?></code>1054 <em><?php esc_html_e('Preview', 'google-calendar-events'); ?>:</em> 1055 <code><?php echo esc_html(date_i18n($time_format_php, time())); ?></code> 1016 1056 </p> 1017 1057 </div> … … 1020 1060 <tr class="simcal-panel-field"> 1021 1061 <th> 1022 <label for="_calendar_week_starts_on_setting"><?php _e('Week Starts On', 'google-calendar-events'); ?></label>1062 <label for="_calendar_week_starts_on_setting"><?php esc_html_e('Week Starts On', 'google-calendar-events'); ?></label> 1023 1063 </th> 1024 1064 <td> … … 1038 1078 $week_starts_setting, 1039 1079 true, 1040 ); ?>><?php printf(_x('Site default', 'Use this site default setting', 'google-calendar-events') . ' (%s)', date_i18n('l', strtotime("Sunday + $week_starts_default Days"))); ?></option>1080 ); ?>><?php echo esc_html(sprintf(_x('Site default', 'Use this site default setting', 'google-calendar-events') . ' (%s)', date_i18n('l', strtotime("Sunday + $week_starts_default Days")))); ?></option> 1041 1081 <option value="use_custom" <?php selected( 1042 1082 'use_custom', 1043 1083 $week_starts_setting, 1044 1084 true, 1045 ); ?>><?php _ex('Custom', 'Use a custom setting', 'google-calendar-events'); ?></option>1085 ); ?>><?php echo esc_html_x('Custom', 'Use a custom setting', 'google-calendar-events'); ?></option> 1046 1086 </select> 1047 1087 <select … … 1052 1092 <?php $day_names = simcal_get_calendar_names_i18n('day', 'full'); ?> 1053 1093 <?php for ($i = 0; $i <= 6; $i++): ?> 1054 <option value="<?php echo $i; ?>" <?php selected($i, $week_starts, true); ?>><?php echo $day_names[$i]; ?></option> 1094 <option value="<?php echo esc_attr($i); ?>" <?php selected($i, $week_starts, true); ?>><?php echo esc_html( 1095 $day_names[$i], 1096 ); ?></option> 1055 1097 <?php endfor; ?> 1056 1098 </select> 1057 1099 <i class="simcal-icon-help simcal-help-tip" 1058 data-tip="<?php _e(1100 data-tip="<?php esc_attr_e( 1059 1101 'Some calendars may use this setting to display the start of the week. It is recommended to keep the site default setting.', 1060 1102 'google-calendar-events', … … 1067 1109 <thead> 1068 1110 <tr> 1069 <th colspan="2"><?php _e('Cache', 'google-calendar-events'); ?></th>1111 <th colspan="2"><?php esc_html_e('Cache', 'google-calendar-events'); ?></th> 1070 1112 </tr> 1071 1113 </thead> … … 1080 1122 <tr class="simcal-panel-field"> 1081 1123 <th> 1082 <label for="_feed_cache_user_amount"><?php _ex(1124 <label for="_feed_cache_user_amount"><?php echo esc_html_x( 1083 1125 'Refresh Interval', 1084 1126 'Cache maximum interval', … … 1091 1133 id="_feed_cache_user_amount" 1092 1134 class="simcal-field simcal-field-number simcal-field-tiny simcal-field-inline" 1093 value="<?php echo $cache_freq; ?>"1135 value="<?php echo esc_attr($cache_freq); ?>" 1094 1136 min="0"/> 1095 1137 <select name="_feed_cache_user_unit" … … 1100 1142 $cache_unit, 1101 1143 true, 1102 ); ?>><?php _e('Minute(s)', 'google-calendar-events'); ?></option>1144 ); ?>><?php esc_html_e('Minute(s)', 'google-calendar-events'); ?></option> 1103 1145 <option value="3600" <?php selected( 1104 1146 '3600', 1105 1147 $cache_unit, 1106 1148 true, 1107 ); ?>><?php _e('Hour(s)', 'google-calendar-events'); ?></option>1149 ); ?>><?php esc_html_e('Hour(s)', 'google-calendar-events'); ?></option> 1108 1150 <option value="86400" <?php selected( 1109 1151 '86400', 1110 1152 $cache_unit, 1111 1153 true, 1112 ); ?>><?php _e('Day(s)', 'google-calendar-events'); ?></option>1154 ); ?>><?php esc_html_e('Day(s)', 'google-calendar-events'); ?></option> 1113 1155 <option value="604800" <?php selected( 1114 1156 '604800', 1115 1157 $cache_unit, 1116 1158 true, 1117 ); ?>><?php _e('Week(s)', 'google-calendar-events'); ?></option>1159 ); ?>><?php esc_html_e('Week(s)', 'google-calendar-events'); ?></option> 1118 1160 </select> 1119 1161 <i class="simcal-icon-help simcal-help-tip" 1120 data-tip="<?php _e(1162 data-tip="<?php esc_attr_e( 1121 1163 'If you add, edit or remove events in your calendar very often, you can set a lower interval to refresh the events displayed. Set a higher interval for best performance.', 1122 1164 'google-calendar-events', … … 1153 1195 <tr class="simcal-panel-field"> 1154 1196 <th> 1155 <label for="<?php echo $the_field->id; ?>"><?php echo $the_field->title; ?></label>1197 <label for="<?php echo esc_attr($the_field->id); ?>"><?php echo esc_html($the_field->title); ?></label> 1156 1198 </th> 1157 1199 <td><?php $the_field->html(); ?></td> -
google-calendar-events/trunk/includes/admin/notices.php
r3551626 r3805019 105 105 106 106 echo '<div class="' . 107 $notice->type.107 esc_attr($notice->type) . 108 108 ' ' . 109 $notice->class.109 esc_attr($notice->class) . 110 110 ' simcal-admin-notice" data-notice-id="' . 111 $name.111 esc_attr($name) . 112 112 '">' . 113 $dismiss_link.114 $notice->content.113 wp_kses_post($dismiss_link) . 114 wp_kses_post($notice->content) . 115 115 '</div>'; 116 116 }, -
google-calendar-events/trunk/includes/admin/pages/components/progress.php
r3551626 r3805019 56 56 $li_class = 'sc_checklist_item' . ($item_completed ? ' is_completed' : ''); 57 57 ?> 58 <li<?php echo $li_attrs; ?> class="<?php echo esc_attr($li_class); ?>">58 <li<?php echo wp_kses_post($li_attrs); ?> class="<?php echo esc_attr($li_class); ?>"> 59 59 <span class="sc_checklist_checkbox"> 60 60 <?php if ($item_completed) { ?> -
google-calendar-events/trunk/includes/admin/pages/connect/partials/google-calendar-api-key-connect.php
r3577278 r3805019 160 160 161 161 <?php esc_html_e('Connect in a single click without API keys, available in the ', 'google-calendar-events'); ?> 162 <a href="<?php echo simcal_ga_campaign_url( 163 'https://simplecalendar.io/downloads/google-calendar-pro/', 164 'core-plugin', 165 'connect-api-key-pro-addon', 162 <a href="<?php echo esc_url( 163 simcal_ga_campaign_url( 164 'https://simplecalendar.io/downloads/google-calendar-pro/', 165 'core-plugin', 166 'connect-api-key-pro-addon', 167 ), 166 168 ); ?>" target="_blank" class="sc_connect_pro_link"> 167 169 <img src="<?php echo esc_url($assets_base . 'crown.svg'); ?>" alt="" /> -
google-calendar-events/trunk/includes/admin/pages/connect/partials/helpful-links.php
r3551626 r3805019 25 25 </h3> 26 26 <div class="sc_helpful_links_cards_wrapper"> 27 <a href="<?php echo simcal_ga_campaign_url( 28 'https://docs.simplecalendar.io/', 29 'core-plugin', 30 'connect-documentation', 27 <a href="<?php echo esc_url( 28 simcal_ga_campaign_url('https://docs.simplecalendar.io/', 'core-plugin', 'connect-documentation'), 31 29 ); ?>" target="_blank" class="sc_helpful_link_card"> 32 30 <span class="sc_icon--circle"> -
google-calendar-events/trunk/includes/admin/pages/connect/partials/render-connect-fields.php
r3551626 r3805019 86 86 </div> 87 87 <?php if (!empty($field_after[$key])) { ?> 88 <?php echo $field_after[$key]; ?>88 <?php echo wp_kses_post($field_after[$key]); ?> 89 89 <?php } ?> 90 90 </div> -
google-calendar-events/trunk/includes/admin/pages/connect/sidebar.php
r3585959 r3805019 231 231 </li> 232 232 </ul> 233 <a href="<?php echo simcal_ga_campaign_url( 234 'https://simplecalendar.io/downloads/google-calendar-pro/', 235 'core-plugin', 236 'connect-sidebar-pro-addon', 233 <a href="<?php echo esc_url( 234 simcal_ga_campaign_url( 235 'https://simplecalendar.io/downloads/google-calendar-pro/', 236 'core-plugin', 237 'connect-sidebar-pro-addon', 238 ), 237 239 ); ?>" target="_blank" class="sc_btn sc_btn--blue sc_connect_pro_btn"> 238 240 <?php esc_html_e('Upgrade to Pro', 'google-calendar-events'); ?> -
google-calendar-events/trunk/includes/admin/pages/connect/steps/pro-credentials.php
r3577278 r3805019 110 110 <p 111 111 class="sc_text--body_b2 sc_text--dark sc_connect_credentials_subtitle" 112 data-sc-subtitle-disconnected="<?php echo esc_attr __(112 data-sc-subtitle-disconnected="<?php echo esc_attr( 113 113 $show_own_credentials 114 ? 'Enter your Google OAuth client credentials to get started. Your data is stored securely on your site and never on our servers.' 115 : 'Almost there! Connect your Google Calendar events in a single click using authentication via Simple Calendar.', 116 'google-calendar-events', 114 ? __( 115 'Enter your Google OAuth client credentials to get started. Your data is stored securely on your site and never on our servers.', 116 'google-calendar-events', 117 ) 118 : __( 119 'Almost there! Connect your Google Calendar events in a single click using authentication via Simple Calendar.', 120 'google-calendar-events', 121 ), 117 122 ); ?>" 118 123 data-sc-subtitle-connected="<?php echo esc_attr__( … … 162 167 </div> 163 168 <span id="sc_connect_oauth_status" class="sc_text--body_b2 sc_connect_oauth_status"> 164 <?php echo $auth_status_text; ?>169 <?php echo esc_html($auth_status_text); ?> 165 170 </span> 166 171 </div> -
google-calendar-events/trunk/includes/admin/pages/licenses.php
r3551626 r3805019 58 58 ?> 59 59 <br><br> 60 <a href="#" class="simcal-ml-[2px]" id="simcal-reset-licenses" data-dialog="<?php _e(60 <a href="#" class="simcal-ml-[2px]" id="simcal-reset-licenses" data-dialog="<?php esc_attr_e( 61 61 'WARNING: Are you sure you want to start over and delete all license keys from the settings?', 62 62 'google-calendar-events', 63 63 ); ?>"> 64 <?php _e('Delete your license keys', 'google-calendar-events'); ?>64 <?php esc_html_e('Delete your license keys', 'google-calendar-events'); ?> 65 65 <i class="simcal-icon-spinner simcal-icon-spin" style="display: none;"></i> 66 66 </a> -
google-calendar-events/trunk/includes/admin/pages/system-status.php
r3632810 r3805019 70 70 ?> 71 71 <div id="simcal-system-status-report"> 72 <p><?php _e('Please copy and paste this information when contacting support:', 'google-calendar-events'); ?> </p> 72 <p><?php esc_html_e( 73 'Please copy and paste this information when contacting support:', 74 'google-calendar-events', 75 ); ?> </p> 73 76 <textarea readonly="readonly" onclick="this.select();"></textarea> 74 <p><?php _e(77 <p><?php esc_html_e( 75 78 'You can also download your information as a text file to attach, or simply view it below.', 76 79 'google-calendar-events', 77 80 ); ?></p> 78 <p><a href="#" id="simcal-system-status-report-download" class="button button-primary"><?php _e(81 <p><a href="#" id="simcal-system-status-report-download" class="button button-primary"><?php esc_html_e( 79 82 'Download System Report', 80 83 'google-calendar-events', … … 136 139 '<mark class="error">' . 137 140 sprintf( 141 /* translators: 1: memory limit, 2: Codex URL for increasing PHP memory */ 138 142 __( 139 143 '%1$s - It is recomendend to set memory to at least 64MB. See: <a href="%2$s" target="_blank">Increasing memory allocated to PHP</a>', … … 218 222 include_once ABSPATH . 'wp-admin/includes/theme-install.php'; 219 223 220 if (version_compare($wp_version, '3.4', '<')) { 221 $active_theme = get_theme_data(get_stylesheet_directory() . '/style.css'); 222 $theme_name = '<a href="' . $active_theme['URI'] . '" target="_blank">' . $active_theme['Name'] . '</a>'; 223 $theme_version = $active_theme['Version']; 224 $theme_author = '<a href="' . $active_theme['AuthorURI'] . '" target="_blank">' . $active_theme['Author'] . '</a>'; 225 $theme_export = $active_theme['Name'] . ' - ' . $theme_version; 226 } else { 227 $active_theme = wp_get_theme(); 228 $theme_name = '<a href="' . $active_theme->ThemeURI . '" target="_blank">' . $active_theme->Name . '</a>'; 229 $theme_version = $active_theme->Version; 230 $theme_author = $active_theme->Author; 231 $theme_export = $active_theme->Name . ' - ' . $theme_version; 232 } 224 $active_theme = wp_get_theme(); 225 $theme_name = '<a href="' . $active_theme->ThemeURI . '" target="_blank">' . $active_theme->Name . '</a>'; 226 $theme_version = $active_theme->Version; 227 $theme_author = $active_theme->Author; 228 $theme_export = $active_theme->Name . ' - ' . $theme_version; 233 229 234 230 $theme_update_version = $theme_version; … … 247 243 $theme_version . 248 244 ' (' . 245 /* translators: %s: available theme version number */ 249 246 sprintf(__('%s is available', 'google-calendar-events'), esc_html($theme_update_version)) . 250 247 ')</mark>'; … … 266 263 267 264 if ($is_child_theme) { 268 if (version_compare($wp_version, '3.4', '<')) { 269 $parent_theme = $parent_theme_export = $active_theme['Template']; 270 } else { 271 $parent = wp_get_theme($active_theme->Template); 272 $parent_theme = '<dl>'; 273 $parent_theme .= '<dt>' . __('Name', 'google-calendar-events') . '</dt>'; 274 $parent_theme .= '<dd>' . $parent->Name . '</dd>'; 275 $parent_theme .= '<dt>' . __('Author', 'google-calendar-events') . '</dt>'; 276 $parent_theme .= '<dd>' . $parent->Author . '</dd>'; 277 $parent_theme .= '<dt>' . __('Version', 'google-calendar-events') . '</dt>'; 278 $parent_theme .= '<dd>' . $parent->Version . '</dd>'; 279 $parent_theme .= '</dl>'; 280 281 $parent_theme_export = strip_tags($parent->Name) . ' - ' . $parent->Version; 282 } 265 $parent = wp_get_theme($active_theme->Template); 266 $parent_theme = '<dl>'; 267 $parent_theme .= '<dt>' . __('Name', 'google-calendar-events') . '</dt>'; 268 $parent_theme .= '<dd>' . $parent->Name . '</dd>'; 269 $parent_theme .= '<dt>' . __('Author', 'google-calendar-events') . '</dt>'; 270 $parent_theme .= '<dd>' . $parent->Author . '</dd>'; 271 $parent_theme .= '<dt>' . __('Version', 'google-calendar-events') . '</dt>'; 272 $parent_theme .= '<dd>' . $parent->Version . '</dd>'; 273 $parent_theme .= '</dl>'; 274 275 $parent_theme_export = wp_strip_all_tags($parent->Name) . ' - ' . $parent->Version; 283 276 } 284 277 … … 340 333 $plugin_version . 341 334 ' (' . 335 /* translators: %s: available plugin version number */ 342 336 sprintf(__('%s is available', 'google-calendar-events'), esc_html($plugin_update_version)) . 343 337 ')</mark>'; … … 356 350 $plugin .= '</dl>'; 357 351 358 $sections['plugins'][sanitize_key( strip_tags($plugin_name))] = [352 $sections['plugins'][sanitize_key(wp_strip_all_tags($plugin_name))] = [ 359 353 'label' => $plugin_name, 360 'label_export' => strip_tags($plugin_data['Title']),354 'label_export' => wp_strip_all_tags($plugin_data['Title']), 361 355 'result' => $plugin, 362 356 'result_export' => $plugin_data['Version'], … … 388 382 } 389 383 390 if ($wpdb->use_mysqli) { 391 $mysql = @mysqli_get_server_info($wpdb->dbh); 384 $mysql_version = $wpdb->db_version(); 385 if ($mysql_version) { 386 $mysql = $mysql_version; 392 387 } else { 393 388 $mysql = '<mark class="error">' . __('Cannot connect to MySQL database.', 'google-calendar-events') . '</mark>'; … … 405 400 $server_timezone = 406 401 '<mark class="error">' . 402 /* translators: %s: server timezone name */ 407 403 sprintf(__('Server default timezone is %s - it should be UTC', 'google-calendar-events'), $default_timezone) . 408 404 '</mark>'; … … 604 600 if (isset($sections[$panel])): ?> 605 601 <table class="widefat simcal-system-status-report-panel"> 606 <thead class="<?php echo $panel; ?>">602 <thead class="<?php echo esc_attr($panel); ?>"> 607 603 <tr> 608 <th colspan="3" data-export="<?php echo $v['export']; ?>"><?php echo $v['label']; ?></th>604 <th colspan="3" data-export="<?php echo esc_attr($v['export']); ?>"><?php echo esc_html($v['label']); ?></th> 609 605 </tr> 610 606 </thead> … … 617 613 ?> 618 614 <td class="tooltip"><?php echo isset($cell['tooltip']) 619 ? ' <i class="simcal-icon-help simcal-help-tip" data-tip="' . $cell['tooltip']. '"></i> '615 ? ' <i class="simcal-icon-help simcal-help-tip" data-tip="' . esc_attr($cell['tooltip']) . '"></i> ' 620 616 : ''; ?></td> 621 <td class="label" data-export="<?php echo trim($label_export); ?>"><?php echo $cell['label']; ?></td> 622 <td class="result" data-export="<?php echo trim($result_export); ?>"><?php echo $cell['result']; ?></td> 617 <td class="label" data-export="<?php echo esc_attr(trim($label_export)); ?>"><?php echo wp_kses_post( 618 $cell['label'], 619 ); ?></td> 620 <td class="result" data-export="<?php echo esc_attr(trim($result_export)); ?>"><?php echo wp_kses_post( 621 $cell['result'], 622 ); ?></td> 623 623 </tr> 624 624 <?php endforeach; ?> … … 694 694 var file = new Blob( [ report ], { type: 'text/plain' } ); 695 695 jQuery( this ).attr( 'href', URL.createObjectURL( file ) ); 696 jQuery( this ).attr( 'download', '<?php echo sanitize_title( 697 str_replace(['http://', 'https://'], '', get_bloginfo('url')) . '-system-report-' . date('Y-m-d', time()), 696 jQuery( this ).attr( 'download', '<?php echo esc_attr( 697 sanitize_title( 698 str_replace(['http://', 'https://'], '', get_bloginfo('url')) . '-system-report-' . gmdate('Y-m-d', time()), 699 ), 698 700 ); ?>' ); 699 701 } ); -
google-calendar-events/trunk/includes/admin/post-types.php
r3717083 r3805019 107 107 case 'feed': 108 108 $feed = simcal_get_feed($post_id); 109 echo isset($feed->name) ? $feed->name: '—';109 echo isset($feed->name) ? esc_html($feed->name) : '—'; 110 110 break; 111 111 … … 128 128 } 129 129 130 echo $info;130 echo wp_kses_post($info); 131 131 break; 132 132 … … 497 497 if ($post_type == 'calendar' && isset($post->ID)) { 498 498 echo '<a id="simcal-clear-cache" class="button" data-id="' . 499 $post->ID.499 absint($post->ID) . 500 500 ' ">' . 501 501 '<i class="simcal-icon-spinner simcal-icon-spin" style="display: none;"></i> ' . 502 __('Clear cache', 'google-calendar-events') .502 esc_html__('Clear cache', 'google-calendar-events') . 503 503 '</a>'; 504 504 } … … 528 528 if (in_array($post_type, $post_types)) { ?> 529 529 <a href="#TB_inline?height=250&width=500&inlineId=simcal-insert-shortcode-panel" id="simcal-insert-shortcode-button" class="thickbox button insert-calendar add_calendar"> 530 <span class="wp-media-buttons-icon dashicons-before dashicons-calendar-alt"></span> <?php _e(530 <span class="wp-media-buttons-icon dashicons-before dashicons-calendar-alt"></span> <?php esc_html_e( 531 531 'Add Calendar', 532 532 'google-calendar-events', … … 548 548 <div id="simcal-insert-shortcode-panel" style="display:none;"> 549 549 <div class="simcal-insert-shortcode-panel"> 550 <h1><?php _e('Add Calendar', 'google-calendar-events'); ?></h1>551 <?php _e('Add a calendar to your post.', 'google-calendar-events'); ?>550 <h1><?php esc_html_e('Add Calendar', 'google-calendar-events'); ?></h1> 551 <?php esc_html_e('Add a calendar to your post.', 'google-calendar-events'); ?> 552 552 <?php if (!empty($calendars) && is_array($calendars)): ?> 553 553 <p> … … 555 555 <?php $multiselect = count($calendars) > 15 ? ' simcal-field-select-enhanced' : ''; ?> 556 556 <select id="simcal-choose-calendar" 557 class="simcal-field simcal-field-select<?php echo $multiselect; ?>"557 class="simcal-field simcal-field-select<?php echo esc_attr($multiselect); ?>" 558 558 name=""> 559 559 <?php foreach ($calendars as $id => $title): ?> 560 <option value="<?php echo $id; ?>"><?php echo $title; ?></option>560 <option value="<?php echo esc_attr($id); ?>"><?php echo esc_html($title); ?></option> 561 561 <?php endforeach; ?> 562 562 </select> 563 563 </label> 564 564 </p> 565 <p><input type="button" value="<?php _e(565 <p><input type="button" value="<?php esc_attr_e( 566 566 'Insert Calendar', 567 567 'google-calendar-events', 568 568 ); ?>" id="simcal-insert-shortcode" class="button button-primary button-large" name="" /></p> 569 569 <?php else: ?> 570 <p><em><?php _e('Could not find any calendars to add to this post.', 'google-calendar-events'); ?></em></p>571 <strong><a href="post-new.php?post_type=calendar"><?php _e(570 <p><em><?php esc_html_e('Could not find any calendars to add to this post.', 'google-calendar-events'); ?></em></p> 571 <strong><a href="post-new.php?post_type=calendar"><?php esc_html_e( 572 572 'Please add and configure new calendar first.', 573 573 'google-calendar-events', -
google-calendar-events/trunk/includes/admin/updater.php
r3551626 r3805019 200 200 $wp_list_table = _get_list_table('WP_Plugins_List_Table'); 201 201 echo '<tr class="plugin-update-tr"><td colspan="' . 202 $wp_list_table->get_column_count() .202 esc_attr((string) $wp_list_table->get_column_count()) . 203 203 '" class="plugin-update colspanchange"><div class="update-message">'; 204 204 … … 211 211 ); 212 212 213 $allowed_html = [ 214 'a' => [ 215 'href' => true, 216 'target' => true, 217 'class' => true, 218 ], 219 ]; 220 213 221 if (empty($version_info->download_link)) { 214 222 printf( 215 __( 216 'There is a new version of %1$s available. <a target="_blank" class="thickbox" href="%2$s">View version %3$s details</a>.', 217 'google-calendar-events', 223 wp_kses( 224 /* translators: 1: plugin name, 2: changelog URL, 3: new version number */ 225 __( 226 'There is a new version of %1$s available. <a target="_blank" class="thickbox" href="%2$s">View version %3$s details</a>.', 227 'google-calendar-events', 228 ), 229 $allowed_html, 218 230 ), 219 231 esc_html($version_info->name), … … 223 235 } else { 224 236 printf( 225 __( 226 'There is a new version of %1$s available. <a target="_blank" class="thickbox" href="%2$s">View version %3$s details</a> or <a href="%4$s">update now</a>.', 227 'google-calendar-events', 237 wp_kses( 238 /* translators: 1: plugin name, 2: changelog URL, 3: new version number, 4: update URL */ 239 __( 240 'There is a new version of %1$s available. <a target="_blank" class="thickbox" href="%2$s">View version %3$s details</a> or <a href="%4$s">update now</a>.', 241 'google-calendar-events', 242 ), 243 $allowed_html, 228 244 ), 229 245 esc_html($version_info->name), … … 373 389 if (!current_user_can('update_plugins')) { 374 390 wp_die( 375 __('You do not have permission to install plugin updates', 'google-calendar-events'),376 __('Error', 'google-calendar-events'),391 esc_html__('You do not have permission to install plugin updates', 'google-calendar-events'), 392 esc_html__('Error', 'google-calendar-events'), 377 393 ['response' => 403], 378 394 ); … … 382 398 383 399 if ($response && isset($response->sections['changelog'])) { 384 echo '<div style="background:#fff;padding:10px;">' . $response->sections['changelog']. '</div>';400 echo '<div style="background:#fff;padding:10px;">' . wp_kses_post($response->sections['changelog']) . '</div>'; 385 401 } 386 402 -
google-calendar-events/trunk/includes/calendars/admin/default-calendar-admin.php
r3663004 r3805019 83 83 <table id="default-calendar-settings"> 84 84 <thead> 85 <tr><th colspan="2"><?php _e('Default Calendar', 'google-calendar-events'); ?></th></tr>85 <tr><th colspan="2"><?php esc_html_e('Default Calendar', 'google-calendar-events'); ?></th></tr> 86 86 </thead> 87 87 <tbody class="simcal-panel-section"> 88 88 89 89 <tr class="simcal-panel-field simcal-default-calendar-grid" style="display: none;"> 90 <th><label for="_default_calendar_event_bubbles_action"><?php _e(90 <th><label for="_default_calendar_event_bubbles_action"><?php esc_html_e( 91 91 'Event Bubbles', 92 92 'google-calendar-events', … … 116 116 </tr> 117 117 <tr class="simcal-panel-field simcal-default-calendar-grid" style="display: none;"> 118 <th><label for="_default_calendar_trim_titles"><?php _e('Trim Event Titles', 'google-calendar-events'); ?></label></th> 118 <th><label for="_default_calendar_trim_titles"><?php esc_html_e( 119 'Trim Event Titles', 120 'google-calendar-events', 121 ); ?></label></th> 119 122 <td> 120 123 <?php … … 154 157 </tr> 155 158 <tr class="simcal-panel-field simcal-default-calendar-grid" style="display: none;"> 156 <th><label for="_default_calendar_grid_desktop_list_mobile"><?php _e(159 <th><label for="_default_calendar_grid_desktop_list_mobile"><?php esc_html_e( 157 160 'Switch to List View on Mobile', 158 161 'google-calendar-events', … … 176 179 </tr> 177 180 <tr class="simcal-panel-field simcal-default-calendar-list" style="display: none;"> 178 <th><label for="_default_calendar_list_grouped_span"><?php _e('Span', 'google-calendar-events'); ?></label></th>181 <th><label for="_default_calendar_list_grouped_span"><?php esc_html_e('Span', 'google-calendar-events'); ?></label></th> 179 182 <td> 180 183 <?php … … 213 216 </tr> 214 217 <tr class="simcal-panel-field simcal-default-calendar-list" style="display: none;"> 215 <th><label for="_default_calendar_list_header"><?php _e('Hide Header', 'google-calendar-events'); ?></label></th> 218 <th><label for="_default_calendar_list_header"><?php esc_html_e( 219 'Hide Header', 220 'google-calendar-events', 221 ); ?></label></th> 216 222 <td> 217 223 <?php … … 229 235 </tr> 230 236 <tr class="simcal-panel-field simcal-default-calendar-list" style="display: none;"> 231 <th><label for="_default_calendar_compact_list"><?php _e('Compact List', 'google-calendar-events'); ?></label></th> 237 <th><label for="_default_calendar_compact_list"><?php esc_html_e( 238 'Compact List', 239 'google-calendar-events', 240 ); ?></label></th> 232 241 <td> 233 242 <?php … … 248 257 </tr> 249 258 <tr class="simcal-panel-field simcal-default-calendar-grid simcal-default-calendar-list" style="display: none;"> 250 <th><label for="_default_calendar_limit_visible_events"><?php _e(259 <th><label for="_default_calendar_limit_visible_events"><?php esc_html_e( 251 260 'Limit Visible Events', 252 261 'google-calendar-events', … … 289 298 </tr> 290 299 <tr class="simcal-panel-field simcal-default-calendar-grid simcal-default-calendar-list" style="display: none;"> 291 <th><label for="_default_calendar_event_bubbles_action"><?php _e(300 <th><label for="_default_calendar_event_bubbles_action"><?php esc_html_e( 292 301 'Expand Multi-day Events', 293 302 'google-calendar-events', … … 308 317 'id' => '_default_calendar_expand_multi_day_events', 309 318 'tooltip' => __( 310 'For events spanning multiple days, you can display them on each day of the event, ' . 311 'only on the first day of the event, or on all days of the event, but only up to the current day. ' . 312 'Third option applies to list views only.', 319 'For events spanning multiple days, you can display them on each day of the event, only on the first day of the event, or on all days of the event, but only up to the current day. Third option applies to list views only.', 313 320 'google-calendar-events', 314 321 ), … … 341 348 <tbody class="simcal-panel-section"> 342 349 <tr class="simcal-panel-field simcal-default-calendar-grid simcal-default-calendar-list" style="display: none;"> 343 <th><label for="_default_calendar_style_theme"><?php _e('Theme', 'google-calendar-events'); ?></label></th>350 <th><label for="_default_calendar_style_theme"><?php esc_html_e('Theme', 'google-calendar-events'); ?></label></th> 344 351 <td> 345 352 <?php … … 362 369 </tr> 363 370 <tr class="simcal-panel-field simcal-default-calendar-grid simcal-default-calendar-list" style="display: none;"> 364 <th><label for="_default_calendar_style_today"><?php _e('Today', 'google-calendar-events'); ?></label></th>371 <th><label for="_default_calendar_style_today"><?php esc_html_e('Today', 'google-calendar-events'); ?></label></th> 365 372 <td> 366 373 <?php … … 383 390 </tr> 384 391 <tr class="simcal-panel-field simcal-default-calendar-grid simcal-default-calendar-list" style="display: none;"> 385 <th><label for="_default_calendar_style_days_events"><?php _e(392 <th><label for="_default_calendar_style_days_events"><?php esc_html_e( 386 393 'Days with Events', 387 394 'google-calendar-events', -
google-calendar-events/trunk/includes/calendars/views/default-calendar-grid.php
r3663004 r3805019 205 205 206 206 <table class="simcal-calendar-grid" 207 data-event-bubble-trigger="<?php echo $calendar->event_bubble_trigger; ?>">207 data-event-bubble-trigger="<?php echo esc_attr($calendar->event_bubble_trigger); ?>"> 208 208 <thead class="simcal-calendar-head"> 209 209 <tr> 210 210 <?php if (!$calendar->static) { ?> 211 <td class="simcal-nav simcal-prev-wrapper" colspan="<?php echo apply_filters( 212 'simcal_prev_cols', 213 '1', 211 <td class="simcal-nav simcal-prev-wrapper" colspan="<?php echo esc_attr( 212 (string) apply_filters('simcal_prev_cols', '1'), 214 213 ); ?>"> 215 <button class="simcal-nav-button simcal-month-nav simcal-prev" title="<?php _e(214 <button class="simcal-nav-button simcal-month-nav simcal-prev" title="<?php esc_attr_e( 216 215 'Previous Month', 217 216 'google-calendar-events', 218 ); ?>" aria-label="<?php _e(217 ); ?>" aria-label="<?php esc_attr_e( 219 218 'Previous Month', 220 219 'google-calendar-events', … … 222 221 </td> 223 222 <?php } ?> 224 <td colspan="<?php echo apply_filters('simcal_current_cols', $calendar->static ? '7' : '5'); ?>" 223 <td colspan="<?php echo esc_attr( 224 (string) apply_filters('simcal_current_cols', $calendar->static ? '7' : '5'), 225 ); ?>" 225 226 class="simcal-nav simcal-current" 226 227 aria-live="polite" 227 228 aria-atomic="true" 228 data-calendar-current="<?php echo $calendar->start; ?>">229 data-calendar-current="<?php echo esc_attr((string) $calendar->start); ?>"> 229 230 <?php 230 231 echo '<h3>'; … … 242 243 243 244 foreach ($current as $k => $v) { 244 echo ' <span class="simcal-current-' . $k, '">' . wp_date($v, $calendar->start) . '</span> '; 245 echo ' <span class="simcal-current-' . 246 esc_attr($k) . 247 '">' . 248 esc_html(wp_date($v, $calendar->start, new \DateTimeZone($calendar->timezone))) . 249 '</span> '; 245 250 } 246 251 … … 249 254 </td> 250 255 <?php if (!$calendar->static) { ?> 251 <td class="simcal-nav simcal-next-wrapper" colspan="<?php echo apply_filters( 252 'simcal_next_cols', 253 '1', 256 <td class="simcal-nav simcal-next-wrapper" colspan="<?php echo esc_attr( 257 (string) apply_filters('simcal_next_cols', '1'), 254 258 ); ?>"> 255 <button class="simcal-nav-button simcal-month-nav simcal-next" title="<?php _e(259 <button class="simcal-nav-button simcal-month-nav simcal-next" title="<?php esc_attr_e( 256 260 'Next Month', 257 261 'google-calendar-events', 258 ); ?>" aria-label="<?php _e(262 ); ?>" aria-label="<?php esc_attr_e( 259 263 'Next Month', 260 264 'google-calendar-events', … … 272 276 273 277 for ($i = $week_starts; $i <= 6; $i++): ?> 274 <th class="simcal-week-day simcal-week-day-<?php echo $i; ?>"275 data-screen-small="<?php echo mb_substr($week_days_short[$i], 0, 1, 'UTF-8'); ?>"276 data-screen-medium="<?php echo $week_days_short[$i]; ?>"277 data-screen-large="<?php echo $week_days_full[$i]; ?>"><?php echo $week_days_short[278 $ i279 ]; ?></th>278 <th class="simcal-week-day simcal-week-day-<?php echo esc_attr((string) $i); ?>" 279 data-screen-small="<?php echo esc_attr(mb_substr($week_days_short[$i], 0, 1, 'UTF-8')); ?>" 280 data-screen-medium="<?php echo esc_attr($week_days_short[$i]); ?>" 281 data-screen-large="<?php echo esc_attr($week_days_full[$i]); ?>"><?php echo esc_html( 282 $week_days_short[$i], 283 ); ?></th> 280 284 <?php endfor; 281 285 282 286 if ($week_starts !== 0): 283 287 for ($i = 0; $i < $week_starts; $i++): ?> 284 <th class="simcal-week-day simcal-week-day-<?php echo $i; ?>" 285 data-screen-small="<?php echo mb_substr($week_days_short[$i], 0, 1, 'UTF-8'); ?>" 286 data-screen-medium="<?php echo $week_days_short[$i]; ?>" 287 data-screen-large="<?php echo $week_days_full[$i]; ?>"><?php echo $week_days_short[ 288 $i 289 ]; ?></th> 288 <th class="simcal-week-day simcal-week-day-<?php echo esc_attr((string) $i); ?>" 289 data-screen-small="<?php echo esc_attr( 290 mb_substr($week_days_short[$i], 0, 1, 'UTF-8'), 291 ); ?>" 292 data-screen-medium="<?php echo esc_attr($week_days_short[$i]); ?>" 293 data-screen-large="<?php echo esc_attr($week_days_full[$i]); ?>"><?php echo esc_html( 294 $week_days_short[$i], 295 ); ?></th> 290 296 <?php endfor; 291 297 endif; … … 294 300 </thead> 295 301 296 <?php echo $this->draw_month( 297 date($this->format_timestamp($calendar->start, 'n')), 298 date($this->format_timestamp($calendar->start, 'Y')), 299 ); ?> 302 <?php 303 $month_html = $this->draw_month( 304 $this->format_timestamp($calendar->start, 'n'), 305 $this->format_timestamp($calendar->start, 'Y'), 306 ); 307 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- draw_month() escapes at the leaf nodes. 308 echo $month_html; 309 ?> 300 310 </table> 301 311 … … 432 442 ob_start(); 433 443 434 echo '<tbody class="simcal-month simcal-month-' . $month. '">' . "\n";435 echo "\t" . '<tr class="simcal-week simcal-week-' . $week_of_year. '">';444 echo '<tbody class="simcal-month simcal-month-' . esc_attr((string) $month) . '">' . "\n"; 445 echo "\t" . '<tr class="simcal-week simcal-week-' . esc_attr((string) $week_of_year) . '">'; 436 446 437 447 $days_in_row = 0; … … 448 458 $last_void_day_class = $a === $void_days_needed - 1 ? 'simcal-day-void-last' : ''; 449 459 450 echo '<td class="simcal-day simcal-day-void ' . $last_void_day_class. '"></td>' . "\n";460 echo '<td class="simcal-day simcal-day-void ' . esc_attr($last_void_day_class) . '"></td>' . "\n"; 451 461 452 462 // Reset day of the week count (sun, 0 - sat, 6). … … 477 487 $bg_color = '#' . $the_color->getHex(); 478 488 $color = $the_color->isDark() ? '#ffffff' : '#000000'; 479 $border_style = ' style="border: 1px solid ' . $bg_color . ';"';489 $border_style = 'border: 1px solid ' . $bg_color . ';'; 480 490 } elseif ($current_max < $now) { 481 491 $day_classes .= ' simcal-past simcal-day'; … … 511 521 // Event title in list. 512 522 $title = !empty($event->title) ? trim($event->title) : __('Event', 'google-calendar-events'); 513 if ($calendar->trim_titles >= 1) { 514 $title = 515 strlen($title) > $calendar->trim_titles 516 ? mb_substr($title, 0, $calendar->trim_titles) . '…' 517 : $title; 523 $title_html = esc_html($title); 524 if ($calendar->trim_titles >= 1 && mb_strlen($title) > $calendar->trim_titles) { 525 $title_html = esc_html(mb_substr($title, 0, $calendar->trim_titles)) . '…'; 518 526 } 519 527 … … 524 532 $bullet = 525 533 '<span class="simcal-event-color" style="background-color: ' . 526 $event_color.534 esc_attr($event_color) . 527 535 ';" aria-hidden="true"></span> '; 528 536 $bullet_colors[] = $event_color; … … 532 540 533 541 // Event contents. 534 $list_events .= "\t" . '<li class="' . $event_classes. '"' . $event_visibility . '>' . "\n";535 $list_events .= "\t\t" . '<span class="simcal-event-title">' . $bullet . $title . '</span>' . "\n";542 $list_events .= "\t" . '<li class="' . esc_attr($event_classes) . '"' . $event_visibility . '>' . "\n"; 543 $list_events .= "\t\t" . '<span class="simcal-event-title">' . $bullet . $title_html . '</span>' . "\n"; 536 544 $list_events .= 537 545 "\t\t" . … … 571 579 572 580 // The actual days with numbers and events in each row cell. 573 echo '<td class="' . $day_classes . '" data-events-count="' . strval($count) . '">' . "\n";581 echo '<td class="' . esc_attr($day_classes) . '" data-events-count="' . esc_attr(strval($count)) . '">' . "\n"; 574 582 575 583 if ($color) { 576 $day_style = ' style="background-color: ' . $bg_color . '; color: ' . $color . '"';584 $day_style = 'background-color: ' . $bg_color . '; color: ' . $color; 577 585 } elseif ($count > 0) { 578 586 $the_color = new Color($calendar->days_events_color); 579 587 $color = !$color ? ($the_color->isDark() ? '#ffffff' : '#000000') : $color; 580 588 $bg_color = !$bg_color ? '#' . $the_color->getHex() : $bg_color; 581 $day_style = ' style="background-color: ' . $bg_color . '; color: ' . $color . '"';589 $day_style = 'background-color: ' . $bg_color . '; color: ' . $color; 582 590 } else { 583 591 $day_style = ''; 584 592 } 585 593 586 echo "\t" . '<div' . $border_style . '>' . "\n"; 587 echo "\t\t" . '<span class="simcal-day-label simcal-day-number"' . $day_style . '>' . $day . '</span>' . "\n"; 594 echo "\t" . '<div' . ($border_style ? ' style="' . esc_attr($border_style) . '"' : '') . '>' . "\n"; 595 echo "\t\t" . 596 '<span class="simcal-day-label simcal-day-number"' . 597 ($day_style ? ' style="' . esc_attr($day_style) . '"' : '') . 598 '>' . 599 esc_html((string) $day) . 600 '</span>' . 601 "\n"; 602 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- event HTML from get_event_html(); attrs escaped above. 588 603 echo "\t\t" . $list_events . "\n"; 589 604 echo "\t\t"; … … 614 629 // Open a new week row. 615 630 if ($day < $days_in_month) { 616 echo '<tr class="simcal-week simcal-week-' . $week_of_year++. '">' . "\n";631 echo '<tr class="simcal-week simcal-week-' . esc_attr((string) $week_of_year++) . '">' . "\n"; 617 632 } 618 633 … … 632 647 $last_void_day_class = $i == $remainder_days ? 'simcal-day-void-last' : ''; 633 648 634 echo '<td class="simcal-day simcal-day-void ' . $last_void_day_class. '"></td>' . "\n";649 echo '<td class="simcal-day simcal-day-void ' . esc_attr($last_void_day_class) . '"></td>' . "\n"; 635 650 636 651 $week_day++; -
google-calendar-events/trunk/includes/calendars/views/default-calendar-list.php
r3663004 r3805019 190 190 191 191 if ($calendar instanceof Default_Calendar) { 192 $ disabled = $calendar->static === true || empty($calendar->events) ? ' disabled="disabled"' : '';192 $is_nav_disabled = $calendar->static === true || empty($calendar->events); 193 193 194 194 $hide_header = get_post_meta($this->calendar->id, '_default_calendar_list_header', true) == 'yes' ? true : false; … … 205 205 ); 206 206 207 echo '<div class="simcal-calendar-list ' . $compact_list_class. '">';207 echo '<div class="simcal-calendar-list ' . esc_attr($compact_list_class) . '">'; 208 208 209 209 if (!$hide_header && !$static_calendar) { … … 213 213 echo "\t\t" . 214 214 '<button class="simcal-nav-button simcal-prev" title="' . 215 __('Previous', 'google-calendar-events') . 216 '"' . 217 $disabled . 218 ' aria-label="' . 219 __('Previous', 'google-calendar-events') . 220 '">' . 221 "\n"; 215 esc_attr__('Previous', 'google-calendar-events') . 216 '"'; 217 disabled($is_nav_disabled); 218 echo ' aria-label="' . esc_attr__('Previous', 'google-calendar-events') . '">' . "\n"; 222 219 echo "\t\t\t" . '<i class="simcal-icon-left" aria-hidden="true"></i>' . "\n"; 223 220 echo "\t\t" . '</button>' . "\n"; … … 230 227 echo "\t" . 231 228 '<div class="simcal-nav simcal-current ' . 232 $header_class.229 esc_attr($header_class) . 233 230 '" aria-live="polite" aria-atomic="true" data-calendar-current="' . 234 $calendar->start.231 esc_attr((string) $calendar->start) . 235 232 '">' . 236 233 "\n"; … … 241 238 echo "\t\t" . 242 239 '<button class="simcal-nav-button simcal-next" title="' . 243 __('Next', 'google-calendar-events') . 244 '"' . 245 $disabled . 246 ' aria-label="' . 247 __('Next', 'google-calendar-events') . 248 '">'; 240 esc_attr__('Next', 'google-calendar-events') . 241 '"'; 242 disabled($is_nav_disabled); 243 echo ' aria-label="' . esc_attr__('Next', 'google-calendar-events') . '">'; 249 244 echo "\t\t\t" . '<i class="simcal-icon-right" aria-hidden="true"></i>' . "\n"; 250 245 echo "\t\t" . '</button>' . "\n"; … … 254 249 } 255 250 251 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- draw_list() escapes at the leaf nodes. 256 252 echo $this->draw_list($calendar->start); 257 253 … … 469 465 if ($date_order['y'] < $date_order['m']) { 470 466 // 2020, August - September. 471 $large = $small = date('Y', $st) . ', ';467 $large = $small = gmdate('Y', $st) . ', '; 472 468 $large .= date_i18n('F', $st) . ' - ' . date_i18n('F', $et); 473 469 $small .= date_i18n('M', $st) . ' - ' . date_i18n('M', $et); … … 476 472 $large = date_i18n('F', $st) . ' - ' . date_i18n('F', $et) . ', '; 477 473 $small = date_i18n('M', $st) . ' - ' . date_i18n('M', $et) . ' '; 478 $year = date('Y', $st);474 $year = gmdate('Y', $st); 479 475 $large .= $year; 480 476 $small .= $year; … … 482 478 } 483 479 } else { 484 $large = $small = date('Y', $st) . ' - ' .date('Y', $et);480 $large = $small = gmdate('Y', $st) . ' - ' . gmdate('Y', $et); 485 481 } 486 482 … … 546 542 $current_events = $this->get_events($timestamp); 547 543 $format = $calendar->date_format; 544 /* translators: 1: start date, 2: end date */ 545 $nothing_from_to_format = __('Nothing from %1$s to %2$s.', 'google-calendar-events'); 548 546 549 547 ob_start(); … … 553 551 $block_tag = $calendar->compact_list && !empty($current_events) ? 'div' : 'dl'; 554 552 555 $data_heading = '';556 553 $heading = $this->get_heading(); 557 foreach ($heading as $k => $v) {558 $data_heading .= ' data-heading-' . $k . '="' . $v . '"';559 }560 554 561 555 echo '<' . 562 $block_tag.556 tag_escape($block_tag) . 563 557 ' class="simcal-events-list-container"' . 564 558 ' data-prev="' . 565 $this->prev.559 esc_attr((string) $this->prev) . 566 560 '"' . 567 561 ' data-next="' . 568 $this->next . 569 '"' . 570 $data_heading . 571 '>'; 562 esc_attr((string) $this->next) . 563 '"'; 564 foreach ($heading as $k => $v) { 565 echo ' data-heading-' . esc_attr($k) . '="' . esc_attr($v) . '"'; 566 } 567 echo '>'; 572 568 573 569 if (!empty($current_events) && is_array($current_events)): … … 616 612 $bg_color = '#' . $the_color->getHex(); 617 613 $color = $the_color->isDark() ? '#ffffff' : '#000000'; 618 $border_style = ' style="border-bottom: 1px solid ' . $bg_color . ';"';619 $bg_style = ' style="background-color: ' . $bg_color . '; color: ' . $color . ';"';620 621 echo "\t" . '<dt class="simcal-day-label" ' . $border_style . '>';622 echo '<span ' . $bg_style . '>';614 $border_style = 'border-bottom: 1px solid ' . $bg_color . ';'; 615 $bg_style = 'background-color: ' . $bg_color . '; color: ' . $color . ';'; 616 617 echo "\t" . '<dt class="simcal-day-label" style="' . esc_attr($border_style) . '">'; 618 echo '<span style="' . esc_attr($bg_style) . '">'; 623 619 624 620 echo $format 625 621 ? '<span class="simcal-date-format" data-date-format="' . 626 $format.622 esc_attr($format) . 627 623 '">' . 628 date_i18n($format, $day_date_ts_offset, strtotime($day_date_offset->toDateTimeString())) .624 esc_html(date_i18n($format, $day_date_ts_offset, strtotime($day_date_offset->toDateTimeString()))) . 629 625 '</span> ' 630 626 : ' '; … … 639 635 640 636 // Add day of week number to CSS class. 641 $day_classes = 'simcal-weekday-' . date('w', $day_date_ts_offset);637 $day_classes = 'simcal-weekday-' . gmdate('w', $day_date_ts_offset); 642 638 643 639 // Is this the present, the past or the future, Doc? … … 690 686 "\t" . 691 687 '<li class="' . 692 $event_classes.688 esc_attr($event_classes) . 693 689 '" style="' . 694 $event_visibility . 695 $event_color . 690 esc_attr($event_visibility . $event_color) . 696 691 '" data-start="' . 697 692 esc_attr($event->start) . … … 724 719 "\t" . 725 720 '<li class="' . 726 $event_classes.721 esc_attr($event_classes) . 727 722 '" style="' . 728 $event_visibility . 729 $event_color . 723 esc_attr($event_visibility . $event_color) . 730 724 '" itemscope itemtype="http://schema.org/Event" data-start="' . 731 725 esc_attr($event->start) . … … 762 756 // Print final list of events for the current day. 763 757 $tag = $calendar->compact_list ? 'div' : 'dd'; 764 echo '<' . $tag . ' class="' . $day_classes . '" data-events-count="' . strval($count) . '">' . "\n"; 758 echo '<' . 759 tag_escape($tag) . 760 ' class="' . 761 esc_attr($day_classes) . 762 '" data-events-count="' . 763 esc_attr(strval($count)) . 764 '">' . 765 "\n"; 766 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- event HTML from get_event_html(); attrs escaped above. 765 767 echo "\t" . $list_events . "\n"; 766 echo '</' . $tag. '>' . "\n";768 echo '</' . tag_escape($tag) . '>' . "\n"; 767 769 endforeach; 768 770 else: … … 772 774 773 775 if ('events' == $calendar->group_type) { 774 echo !empty($message) ? $message : __('There are no upcoming events.', 'google-calendar-events'); 776 echo !empty($message) 777 ? wp_kses_post($message) 778 : esc_html__('There are no upcoming events.', 'google-calendar-events'); 775 779 } else { 776 780 if (!empty($message)) { 777 echo $message;781 echo wp_kses_post($message); 778 782 } else { 779 783 $from = Carbon::createFromTimestamp($this->start, $calendar->timezone)->getTimestamp(); 780 784 $to = Carbon::createFromTimestamp($this->end, $calendar->timezone)->getTimestamp(); 781 echo apply_filters( 782 'simcal_no_events_message', 783 sprintf( 784 __('Nothing from %1$s to %2$s.', 'google-calendar-events'), 785 date_i18n($calendar->date_format, $from), 786 date_i18n($calendar->date_format, $to), 787 ), 788 $calendar->id, 789 $from, 790 $to, 785 $nothing_message = sprintf( 786 $nothing_from_to_format, 787 date_i18n($calendar->date_format, $from), 788 date_i18n($calendar->date_format, $to), 789 ); 790 echo wp_kses_post( 791 (string) apply_filters('simcal_no_events_message', $nothing_message, $calendar->id, $from, $to), 791 792 ); 792 793 } … … 796 797 endif; 797 798 798 echo '</' . $block_tag. '>';799 echo '</' . tag_escape($block_tag) . '>'; 799 800 800 801 return ob_get_clean(); -
google-calendar-events/trunk/includes/events/event-builder.php
r3663004 r3805019 1106 1106 if ($unknown > 0) { 1107 1107 if ($known > 0) { 1108 /* translators: One more person attending the event. */ 1109 $others = sprintf(_n('1 more attendee', '%s more attendees', $unknown, 'google-calendar-events'), $unknown); 1108 $others = sprintf( 1109 /* translators: %s: number of additional attendees */ 1110 _n('%s more attendee', '%s more attendees', $unknown, 'google-calendar-events'), 1111 number_format_i18n($unknown), 1112 ); 1110 1113 } else { 1111 /* translators: One or more persons attending the event whose name is unknown. */1112 1114 $others = sprintf( 1113 _n('1 anonymous attendee', '%s anonymous attendees', $unknown, 'google-calendar-events'), 1114 $unknown, 1115 /* translators: %s: number of anonymous attendees */ 1116 _n('%s anonymous attendee', '%s anonymous attendees', $unknown, 'google-calendar-events'), 1117 number_format_i18n($unknown), 1115 1118 ); 1116 1119 } -
google-calendar-events/trunk/includes/events/event.php
r3564571 r3805019 402 402 } 403 403 404 $location['name'] = isset($var['name']) ? esc_attr( strip_tags($var['name'])) : '';405 $location['address'] = isset($var['address']) ? esc_attr( strip_tags($var['address'])) : '';404 $location['name'] = isset($var['name']) ? esc_attr(wp_strip_all_tags($var['name'])) : ''; 405 $location['address'] = isset($var['address']) ? esc_attr(wp_strip_all_tags($var['address'])) : ''; 406 406 $location['lat'] = isset($var['lat']) ? $this->esc_coordinate($var['lat']) : 0; 407 407 $location['lng'] = isset($var['lng']) ? $this->esc_coordinate($var['lng']) : 0; -
google-calendar-events/trunk/includes/events/events.php
r3551626 r3805019 542 542 $y = intval($year); 543 543 $w = absint($week); 544 $m = date('n', strtotime(strval($y) . '-W' . strval($w)));544 $m = gmdate('n', strtotime(strval($y) . '-W' . strval($w))); 545 545 $month_dt = Carbon::createFromDate($y, $m, 2, $this->timezone); 546 546 $days = []; -
google-calendar-events/trunk/includes/feeds/admin/google-admin.php
r3585959 r3805019 94 94 '<em style="font-size: 14px;">' . 95 95 sprintf( 96 /* translators: %s: URL to Google Calendar Pro add-on */ 96 97 __( 97 98 '<strong>Note:</strong> Calendars configured to use the <a href="%s" class=" hover:simcal-text-green-600 simcal-underline" target="_blank">Google Calendar Pro add-on</a> use a different method of authorization.', … … 146 147 '<p class="description">' . 147 148 sprintf( 149 /* translators: %s: URL to Google API key documentation */ 148 150 __( 149 151 '<a href="%s" class="simcal-underline hover:simcal-text-green-600 simcal-text-[13px]" target="_blank">Step-by-step instructions</a> ', … … 153 155 ) . 154 156 sprintf( 157 /* translators: %s: URL to Google Developers Console */ 155 158 __( 156 159 '<a href="%s" class="simcal-pl-[20px] simcal-underline hover:simcal-text-green-600 simcal-text-[13px]" target="_blank">Google Developers Console</a> ', … … 255 258 <table> 256 259 <thead> 257 <tr><th colspan="2"><?php _e('Google Calendar Settings', 'google-calendar-events'); ?></th></tr>260 <tr><th colspan="2"><?php esc_html_e('Google Calendar Settings', 'google-calendar-events'); ?></th></tr> 258 261 </thead> 259 262 <?php Settings::print_panel_fields($inputs, $post_id); ?> … … 274 277 return sprintf( 275 278 '<p class="description">' . 279 /* translators: %1$s: URL to documentation for making a Google Calendar public */ 276 280 __( 277 'Step 1: Set the Google Calendar you want to use as <strong>"public."</strong> <a href="%1 s" target="_blank">Detailed instructions</a>',281 'Step 1: Set the Google Calendar you want to use as <strong>"public."</strong> <a href="%1$s" target="_blank">Detailed instructions</a>', 278 282 'google-calendar-events', 279 283 ) . 280 284 '<br />' . 285 /* translators: %2$s: URL to documentation for finding a Google Calendar ID */ 281 286 __( 282 'Step 2: Copy and paste your Google Calendar ID here. <a href="%2 s" target="_blank">Detailed instructions</a>',287 'Step 2: Copy and paste your Google Calendar ID here. <a href="%2$s" target="_blank">Detailed instructions</a>', 283 288 'google-calendar-events', 284 289 ) . … … 376 381 '<i class="simcal-icon-warning"></i> ' . 377 382 sprintf( 383 /* translators: %s: URL to Simple Calendar settings page */ 378 384 __( 379 385 'Your Google Calendar events will not show up until you <a href="%s">create and save a Google API key</a>.', -
google-calendar-events/trunk/includes/feeds/admin/grouped-calendars-admin.php
r3564571 r3805019 80 80 <table> 81 81 <thead> 82 <tr><th colspan="2"><?php _e('Grouped Calendar Settings', 'google-calendar-events'); ?></th></tr>82 <tr><th colspan="2"><?php esc_html_e('Grouped Calendar Settings', 'google-calendar-events'); ?></th></tr> 83 83 </thead> 84 84 <tbody class="simcal-panel-section"> 85 85 <tr class="simcal-panel-field"> 86 <th><label for="_grouped_calendars_source"><?php _e('Get Calendars From', 'google-calendar-events'); ?></label></th> 86 <th><label for="_grouped_calendars_source"><?php esc_html_e( 87 'Get Calendars From', 88 'google-calendar-events', 89 ); ?></label></th> 87 90 <td> 88 91 <?php … … 98 101 $source, 99 102 true, 100 ); ?>><?php _e('Manual selection', 'google-calendar-events'); ?></option>103 ); ?>><?php esc_html_e('Manual selection', 'google-calendar-events'); ?></option> 101 104 <option value="category" data-show-field="_grouped_calendars_category" <?php selected( 102 105 'category', 103 106 $source, 104 107 true, 105 ); ?>><?php _e('Category', 'google-calendar-events'); ?></option>108 ); ?>><?php esc_html_e('Category', 'google-calendar-events'); ?></option> 106 109 </select> 107 <i class="simcal-icon-help simcal-help-tip" data-tip="<?php _e(110 <i class="simcal-icon-help simcal-help-tip" data-tip="<?php esc_attr_e( 108 111 'Choose from which calendar feeds you want to get events from. Choose them individually or select all those belonging to calendar feed categories.', 109 112 'google-calendar-events', … … 171 174 $style .= ' width: 100%; max-width: 500px'; 172 175 echo '<input type="text" disabled="disabled" name="_grouped_calendars_category" id="_grouped_calendars_category" style="' . 173 $style.176 esc_attr($style) . 174 177 '" placeholder="' . 175 __('There are no calendar categories yet.', 'google-calendar-events') .178 esc_attr__('There are no calendar categories yet.', 'google-calendar-events') . 176 179 '" />'; 177 180 }?> -
google-calendar-events/trunk/includes/feeds/admin/ics-feed-admin.php
r3632810 r3805019 124 124 <table> 125 125 <thead> 126 <tr><th colspan="2"><?php _e('ICS Feed Settings', 'google-calendar-events'); ?></th></tr>126 <tr><th colspan="2"><?php esc_html_e('ICS Feed Settings', 'google-calendar-events'); ?></th></tr> 127 127 </thead> 128 128 <?php do_action('simcal_ics_feed_settings_fields_before', $post_id); ?> … … 273 273 return sprintf( 274 274 '<p class="description">' . 275 /* translators: %1$s: URL to ICS feed import documentation */ 275 276 __( 276 277 'Export or download an ICS/iCal file from your calendar. <a href="%1$s" target="_blank">Detailed instructions</a>', -
google-calendar-events/trunk/includes/feeds/google.php
r3731889 r3805019 208 208 // Event title & description. 209 209 $title = $event->getSummary() ?? ''; 210 $title = strip_tags($title);210 $title = wp_strip_all_tags($title); 211 211 $title = !empty($title) 212 212 ? sanitize_text_field(iconv(mb_detect_encoding($title, mb_detect_order(), true), 'UTF-8', $title)) … … 597 597 if (!is_array($response_arr)) { 598 598 throw new Google_Service_Exception( 599 __('Unable to fetch calendar events via OAuth.', 'google-calendar-events'),599 esc_html__('Unable to fetch calendar events via OAuth.', 'google-calendar-events'), 600 600 1, 601 601 ); … … 603 603 604 604 if (isset($response_arr['Error']) && !empty($response_arr['Error'])) { 605 throw new Google_Service_Exception( $response_arr['Error'], 1);605 throw new Google_Service_Exception(esc_html((string) $response_arr['Error']), 1); 606 606 } 607 607 … … 610 610 ? (string) $response_arr['message'] 611 611 : __('Unable to fetch calendar events via OAuth.', 'google-calendar-events'); 612 throw new Google_Service_Exception( $message, 1);612 throw new Google_Service_Exception(esc_html($message), 1); 613 613 } 614 614 … … 622 622 623 623 if (is_array($response) && isset($response['Error']) && !empty($response['Error'])) { 624 throw new Google_Service_Exception( $response['Error'], 1);624 throw new Google_Service_Exception(esc_html((string) $response['Error']), 1); 625 625 } 626 626 } else { -
google-calendar-events/trunk/includes/feeds/ics-feed.php
r3694641 r3805019 250 250 } 251 251 252 if (empty($file['tmp_name']) || !is_uploaded_file($file['tmp_name'])) { 253 return new \WP_Error('ics_upload_error', __('The ICS file could not be uploaded.', 'google-calendar-events')); 254 } 255 252 256 $filename = isset($file['name']) ? sanitize_file_name(wp_basename(wp_unslash($file['name']))) : ''; 253 257 $extension = strtolower(pathinfo($filename, PATHINFO_EXTENSION)); … … 293 297 294 298 $filename = self::build_timestamped_filename($filename, $extension); 295 $destination = trailingslashit($upload_dir) . $filename; 296 $moved = is_uploaded_file($file['tmp_name']) ? @move_uploaded_file($file['tmp_name'], $destination) : false; 297 298 if (!$moved && false === file_put_contents($destination, $contents)) { 299 return new \WP_Error('ics_move_failed', __('The ICS file could not be saved.', 'google-calendar-events')); 300 } 301 302 $relative_path = trailingslashit(self::get_upload_subdirectory()) . $filename; 299 300 if (!function_exists('wp_handle_upload')) { 301 require_once ABSPATH . 'wp-admin/includes/file.php'; 302 } 303 304 $subdir_name = self::get_upload_subdirectory(); 305 $filter_upload_dir = static function ($dirs) use ($subdir_name) { 306 $subdir = '/' . $subdir_name; 307 $dirs['subdir'] = $subdir; 308 $dirs['path'] = $dirs['basedir'] . $subdir; 309 $dirs['url'] = $dirs['baseurl'] . $subdir; 310 311 return $dirs; 312 }; 313 314 $overrides = [ 315 'test_form' => false, 316 'test_type' => false, 317 'mimes' => [ 318 'ics' => 'text/calendar', 319 'ical' => 'text/calendar', 320 ], 321 'unique_filename_callback' => static function () use ($filename) { 322 return $filename; 323 }, 324 ]; 325 326 add_filter('upload_dir', $filter_upload_dir); 327 $uploaded = wp_handle_upload($file, $overrides); 328 remove_filter('upload_dir', $filter_upload_dir); 329 330 if (isset($uploaded['error'])) { 331 return new \WP_Error('ics_move_failed', $uploaded['error']); 332 } 333 334 $relative_path = trailingslashit(self::get_upload_subdirectory()) . wp_basename($uploaded['file']); 303 335 update_post_meta($post_id, '_ics_feed_file', $relative_path); 304 336 delete_post_meta($post_id, '_ics_feed_url'); -
google-calendar-events/trunk/includes/frontend/sc-event-single.php
r3717083 r3805019 397 397 do_action('simcal_before_event_detail', $post, $context); 398 398 399 $wrapper_class = esc_attr(implode(' ', $classes));399 $wrapper_class = implode(' ', $classes); 400 400 $schema_meta_html = !empty($context['schema_meta']) ? $context['schema_meta'] : ''; 401 401 ?> 402 <div class="<?php echo $wrapper_class; ?>" itemscope itemtype="https://schema.org/Event"> 403 <?php echo $schema_meta_html; ?> 402 <div class="<?php echo esc_attr($wrapper_class); ?>" itemscope itemtype="https://schema.org/Event"> 403 <?php echo wp_kses($schema_meta_html, [ 404 'meta' => [ 405 'itemprop' => true, 406 'content' => true, 407 ], 408 'span' => [ 409 'itemprop' => true, 410 'itemscope' => true, 411 'itemtype' => true, 412 'style' => true, 413 ], 414 ]); ?> 404 415 <?php do_action('simcal_before_event_detail_summary', $post, $context); ?> 405 416 <div class="simcal-event-detail__body"> … … 451 462 ?> 452 463 <figure class="simcal-event-detail__featured"> 453 <?php echo $featured_image; ?>464 <?php echo wp_kses_post($featured_image); ?> 454 465 </figure> 455 466 <?php … … 470 481 471 482 do_action('simcal_before_event_detail_meta', $post, $context); 483 484 $calendar_icon = $this->calendar_icon(); 485 $svg_allowed = $this->get_svg_allowed_html(); 472 486 ?> 473 487 <div class="simcal-event-detail__meta"> … … 475 489 <h3 class="simcal-event-detail__meta-label"><?php esc_html_e('Start', 'google-calendar-events'); ?></h3> 476 490 <p class="simcal-event-detail__meta-value"> 477 <span class="simcal-event-detail__icon" aria-hidden="true"><?php echo $this->calendar_icon(); ?></span>491 <span class="simcal-event-detail__icon" aria-hidden="true"><?php echo wp_kses($calendar_icon, $svg_allowed); ?></span> 478 492 <span><?php echo esc_html($start_label); ?></span> 479 493 </p> … … 482 496 <h3 class="simcal-event-detail__meta-label"><?php esc_html_e('End', 'google-calendar-events'); ?></h3> 483 497 <p class="simcal-event-detail__meta-value"> 484 <span class="simcal-event-detail__icon" aria-hidden="true"><?php echo $this->calendar_icon(); ?></span>498 <span class="simcal-event-detail__icon" aria-hidden="true"><?php echo wp_kses($calendar_icon, $svg_allowed); ?></span> 485 499 <span><?php echo esc_html($end_label); ?></span> 486 500 </p> … … 519 533 <h2 class="simcal-event-detail__description-title"><?php esc_html_e('Description', 'google-calendar-events'); ?></h2> 520 534 <div class="simcal-event-detail__description-content" itemprop="description"> 521 <?php echo $description_html; ?>535 <?php echo wp_kses_post($description_html); ?> 522 536 </div> 523 537 </div> … … 539 553 $lat = !empty($context['lat']) ? (float) $context['lat'] : 0; 540 554 $lng = !empty($context['lng']) ? (float) $context['lng'] : 0; 541 $location_attrs = $location ? ' itemprop="location" itemscope itemtype="https://schema.org/Place"' : '';542 543 555 do_action('simcal_before_event_detail_location', $post, $context); 544 556 … … 565 577 */ 566 578 $map_html = apply_filters('simcal_event_detail_map_html', $map_html, $post, $context); 579 $pin_icon = $this->pin_icon(); 580 $svg_allowed = $this->get_svg_allowed_html(); 567 581 ?> 568 <div class="simcal-event-detail__sidebar-card simcal-event-detail__location"<?php echo $location_attrs; ?>> 582 <div class="simcal-event-detail__sidebar-card simcal-event-detail__location"<?php if ( 583 $location 584 ): ?> itemprop="location" itemscope itemtype="https://schema.org/Place"<?php endif; ?>> 569 585 <h2 class="simcal-event-detail__sidebar-title"><?php esc_html_e('Address', 'google-calendar-events'); ?></h2> 570 586 <p class="simcal-event-detail__location-address"> 571 <span class="simcal-event-detail__icon" aria-hidden="true"><?php echo $this->pin_icon(); ?></span>587 <span class="simcal-event-detail__icon" aria-hidden="true"><?php echo wp_kses($pin_icon, $svg_allowed); ?></span> 572 588 <?php if ($location): ?> 573 589 <meta itemprop="name" content="<?php echo esc_attr($location); ?>" /> … … 582 598 <span><?php echo esc_html($address); ?></span> 583 599 </p> 584 <?php echo $map_html; ?>600 <?php echo wp_kses_post($map_html); ?> 585 601 <?php do_action('simcal_event_detail_location', $post, $context); ?> 586 602 </div> … … 626 642 <div class="simcal-event-detail__row"> 627 643 <dt><?php esc_html_e('Category', 'google-calendar-events'); ?></dt> 628 <dd><?php echo $categories; ?></dd>644 <dd><?php echo wp_kses_post($categories); ?></dd> 629 645 </div> 630 646 <?php endif; ?> … … 632 648 <div class="simcal-event-detail__row"> 633 649 <dt><?php esc_html_e('Tag', 'google-calendar-events'); ?></dt> 634 <dd><?php echo $tags; ?></dd>650 <dd><?php echo wp_kses_post($tags); ?></dd> 635 651 </div> 636 652 <?php endif; ?> … … 821 837 protected function format_in_timezone($timestamp, $timezone, $format) 822 838 { 823 if (function_exists('wp_date')) { 824 try { 825 return wp_date($format, $timestamp, new \DateTimeZone($timezone)); 826 } catch (\Exception $e) { 827 return wp_date($format, $timestamp); 828 } 829 } 830 831 $utc = gmdate('Y-m-d H:i:s', $timestamp); 832 833 return get_date_from_gmt($utc, $format); 839 try { 840 return wp_date($format, $timestamp, new \DateTimeZone($timezone)); 841 } catch (\Exception $e) { 842 $utc = gmdate('Y-m-d H:i:s', $timestamp); 843 844 return get_date_from_gmt($utc, $format); 845 } 834 846 } 835 847 … … 878 890 return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 21s-6-5.3-6-10a6 6 0 1 1 12 0c0 4.7-6 10-6 10z"/><circle cx="12" cy="11" r="2.2"/></svg>'; 879 891 } 892 893 /** 894 * Allowed HTML for inline SVG icons. 895 * 896 * @since 4.3.2 897 * 898 * @return array 899 */ 900 protected function get_svg_allowed_html() 901 { 902 return [ 903 'svg' => [ 904 'xmlns' => true, 905 'viewbox' => true, 906 'fill' => true, 907 'stroke' => true, 908 'stroke-width' => true, 909 'stroke-linecap' => true, 910 'stroke-linejoin' => true, 911 ], 912 'rect' => [ 913 'x' => true, 914 'y' => true, 915 'width' => true, 916 'height' => true, 917 'rx' => true, 918 ], 919 'path' => [ 920 'd' => true, 921 ], 922 'circle' => [ 923 'cx' => true, 924 'cy' => true, 925 'r' => true, 926 ], 927 ]; 928 } 880 929 } -
google-calendar-events/trunk/includes/functions/admin-svg.php
r2943704 r3805019 7 7 * 8 8 */ 9 10 if (!defined('ABSPATH')) { 11 exit(); 12 } 13 9 14 function svgfillstar() 10 15 { -
google-calendar-events/trunk/includes/functions/admin.php
r3717083 r3805019 999 999 } 1000 1000 1001 /* translators: %s: keyboard shortcut to copy (e.g. Ctrl+C) */ 1001 1002 $shortcut = sprintf(__('Press %s to copy.', 'google-calendar-events'), $cmd); 1002 1003 $shortcode = sprintf('[calendar id="%s"]', $post_id); … … 1005 1006 "class='simcal-shortcode simcal-calendar-shortcode simcal-shortcode-tip' " . 1006 1007 "title='" . 1007 $shortcut.1008 esc_attr($shortcut) . 1008 1009 "' " . 1009 1010 "onclick='this.select();' value='" . 1010 $shortcode.1011 esc_attr($shortcode) . 1011 1012 "' />"; 1012 1013 } … … 1063 1064 $name = $current_user->user_firstname ? $current_user->user_firstname : ''; 1064 1065 ?> 1065 <div id="simcal-drip" class="<?php echo $screen; ?>">1066 <div id="simcal-drip" class="<?php echo esc_attr($screen); ?>"> 1066 1067 <div class="signup"> 1067 1068 <p> 1068 <?php _e( 1069 "Enter your name and email and we'll send you a coupon code for <strong>20% off</strong> all Pro Add-on purchases.", 1070 'google-calendar-events', 1069 <?php echo wp_kses( 1070 __( 1071 "Enter your name and email and we'll send you a coupon code for <strong>20% off</strong> all Pro Add-on purchases.", 1072 'google-calendar-events', 1073 ), 1074 [ 1075 'strong' => [], 1076 ], 1071 1077 ); ?> 1072 1078 </p> 1073 1079 1074 1080 <p> 1075 <label for="simcal-drip-field-email"><?php _e('Your Email', 'google-calendar-events'); ?></label><br />1081 <label for="simcal-drip-field-email"><?php esc_html_e('Your Email', 'google-calendar-events'); ?></label><br /> 1076 1082 <input type="email" 1077 1083 id="simcal-drip-field-email" 1078 1084 name="fields[email]" 1079 value="<?php echo $current_user->user_email; ?>" />1085 value="<?php echo esc_attr($current_user->user_email); ?>" /> 1080 1086 </p> 1081 1087 1082 1088 <p> 1083 <label for="simcal-drip-field-first_name"><?php _e('First Name', 'google-calendar-events'); ?></label><br />1089 <label for="simcal-drip-field-first_name"><?php esc_html_e('First Name', 'google-calendar-events'); ?></label><br /> 1084 1090 <input type="text" 1085 1091 id="simcal-drip-field-first_name" 1086 1092 name="fields[first_name]" 1087 value="<?php echo $name; ?>" />1093 value="<?php echo esc_attr($name); ?>" /> 1088 1094 </p> 1089 1095 <p class="textright"> 1090 1096 <a href="#" 1091 1097 id="simcal-drip-signup" 1092 class="button button-primary"><?php _e('Send me the coupon', 'google-calendar-events'); ?></a>1098 class="button button-primary"><?php esc_html_e('Send me the coupon', 'google-calendar-events'); ?></a> 1093 1099 </p> 1094 1100 <div class="textright"> 1095 <em><?php _e('No spam. Unsubscribe anytime.', 'google-calendar-events'); ?></em>1101 <em><?php esc_html_e('No spam. Unsubscribe anytime.', 'google-calendar-events'); ?></em> 1096 1102 <br/> 1097 <a href="<?php echo simcal_ga_campaign_url(simcal_get_url('addons'), 'core-plugin', 'sidebar-link'); ?>"1098 target="_blank"><?php _e('Just take me the add-ons', 'google-calendar-events'); ?></a>1103 <a href="<?php echo esc_url(simcal_ga_campaign_url(simcal_get_url('addons'), 'core-plugin', 'sidebar-link')); ?>" 1104 target="_blank"><?php esc_html_e('Just take me the add-ons', 'google-calendar-events'); ?></a> 1099 1105 </div> 1100 1106 </div> 1101 1107 <div class="thank-you" style="display: none;"> 1102 <?php _e('Thank you!', 'google-calendar-events'); ?>1108 <?php esc_html_e('Thank you!', 'google-calendar-events'); ?> 1103 1109 </div> 1104 1110 <div class="clear"> … … 1121 1127 <div class="main"> 1122 1128 <p class="heading centered"> 1123 <?php _e('Some of the features included with our premium add-ons', 'google-calendar-events'); ?>1129 <?php esc_html_e('Some of the features included with our premium add-ons', 'google-calendar-events'); ?> 1124 1130 </p> 1125 1131 1126 1132 <ul> 1127 <li><div class="dashicons dashicons-yes"></div> <?php _e(1133 <li><div class="dashicons dashicons-yes"></div> <?php esc_html_e( 1128 1134 'Display color coded events', 1129 1135 'google-calendar-events', 1130 1136 ); ?></li> 1131 <li><div class="dashicons dashicons-yes"></div> <?php _e('Show week & day views', 'google-calendar-events'); ?></li> 1132 <li><div class="dashicons dashicons-yes"></div> <?php _e('Fast view switching', 'google-calendar-events'); ?></li> 1133 <li><div class="dashicons dashicons-yes"></div> <?php _e( 1137 <li><div class="dashicons dashicons-yes"></div> <?php esc_html_e( 1138 'Show week & day views', 1139 'google-calendar-events', 1140 ); ?></li> 1141 <li><div class="dashicons dashicons-yes"></div> <?php esc_html_e( 1142 'Fast view switching', 1143 'google-calendar-events', 1144 ); ?></li> 1145 <li><div class="dashicons dashicons-yes"></div> <?php esc_html_e( 1134 1146 'Event titles & start times in grid', 1135 1147 'google-calendar-events', 1136 1148 ); ?></li> 1137 <li><div class="dashicons dashicons-yes"></div> <?php _e('Limit event display times', 'google-calendar-events'); ?></li> 1138 <li><div class="dashicons dashicons-yes"></div> <?php _e( 1149 <li><div class="dashicons dashicons-yes"></div> <?php esc_html_e( 1150 'Limit event display times', 1151 'google-calendar-events', 1152 ); ?></li> 1153 <li><div class="dashicons dashicons-yes"></div> <?php esc_html_e( 1139 1154 'Display private calendar events', 1140 1155 'google-calendar-events', 1141 1156 ); ?></li> 1142 <li><div class="dashicons dashicons-yes"></div> <?php _e(1157 <li><div class="dashicons dashicons-yes"></div> <?php esc_html_e( 1143 1158 'Show attendees & RSVP status', 1144 1159 'google-calendar-events', 1145 1160 ); ?></li> 1146 <li><div class="dashicons dashicons-yes"></div> <?php _e('Display attachments', 'google-calendar-events'); ?></li> 1147 <li><div class="dashicons dashicons-yes"></div> <?php _e('Priority email support', 'google-calendar-events'); ?></li> 1161 <li><div class="dashicons dashicons-yes"></div> <?php esc_html_e( 1162 'Display attachments', 1163 'google-calendar-events', 1164 ); ?></li> 1165 <li><div class="dashicons dashicons-yes"></div> <?php esc_html_e( 1166 'Priority email support', 1167 'google-calendar-events', 1168 ); ?></li> 1148 1169 </ul> 1149 1170 1150 1171 <div class="centered"> 1151 <a href="<?php echo simcal_ga_campaign_url(simcal_get_url('addons'), 'core-plugin', 'sidebar-link'); ?>"1172 <a href="<?php echo esc_url(simcal_ga_campaign_url(simcal_get_url('addons'), 'core-plugin', 'sidebar-link')); ?>" 1152 1173 class="button-primary button-large" target="_blank"> 1153 <?php _e('Upgrade to Premium Now', 'google-calendar-events'); ?></a>1174 <?php esc_html_e('Upgrade to Premium Now', 'google-calendar-events'); ?></a> 1154 1175 </div> 1155 1176 </div> -
google-calendar-events/trunk/includes/functions/deprecated.php
r2943704 r3805019 40 40 if (empty($date)) { 41 41 $current_time = current_time('timestamp'); 42 $timestamp = mktime(0, 0, 0, date('m', $current_time), date('d', $current_time),date('Y', $current_time));42 $timestamp = mktime(0, 0, 0, gmdate('m', $current_time), gmdate('d', $current_time), gmdate('Y', $current_time)); 43 43 } else { 44 44 $date = explode('/', $date); -
google-calendar-events/trunk/includes/ics-export.php
r3632810 r3805019 83 83 header('Content-Length: ' . strlen($ics)); 84 84 85 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- ICS download body (text/calendar), not HTML. 85 86 echo $ics; 86 87 exit(); … … 188 189 '">'; 189 190 191 $svg_allowed = self::get_svg_allowed_html(); 192 190 193 if ($show_ics_export) { 191 $export_url = esc_url(self::get_export_url($calendar_id)); 192 $export_tooltip = esc_attr__( 193 'By pressing this you will get an ICS file of this calendar.', 194 'google-calendar-events', 195 ); 196 194 $export_icon = self::render_icon('export'); 197 195 echo '<a href="' . 198 $export_url.196 esc_url(self::get_export_url($calendar_id)) . 199 197 '" id="simcal-ics-export-' . 200 198 esc_attr($uid) . … … 202 200 esc_attr((string) $calendar_id) . 203 201 '" title="' . 204 $export_tooltip.202 esc_attr__('By pressing this you will get an ICS file of this calendar.', 'google-calendar-events') . 205 203 '">'; 206 echo self::render_icon('export');204 echo wp_kses($export_icon, $svg_allowed); 207 205 echo '<span class="simcal-calendar-action-label">' . esc_html__('Export', 'google-calendar-events') . '</span>'; 208 206 echo '</a>'; … … 212 210 213 211 if ($show_print) { 214 $print_tooltip = esc_attr__('Print a copy of this calendar view.', 'google-calendar-events'); 215 212 $print_icon = self::render_icon('print'); 216 213 echo '<button type="button" id="simcal-print-' . 217 214 esc_attr($uid) . … … 219 216 esc_attr((string) $calendar_id) . 220 217 '" title="' . 221 $print_tooltip.218 esc_attr__('Print a copy of this calendar view.', 'google-calendar-events') . 222 219 '">'; 223 echo self::render_icon('print');220 echo wp_kses($print_icon, $svg_allowed); 224 221 echo '<span class="simcal-calendar-action-label">' . esc_html__('Print', 'google-calendar-events') . '</span>'; 225 222 echo '</button>'; … … 257 254 258 255 return isset($icons[$icon]) ? $icons[$icon] : ''; 256 } 257 258 /** 259 * Allowed HTML for calendar action SVG icons. 260 * 261 * @since 4.3.2 262 * 263 * @return array 264 */ 265 public static function get_svg_allowed_html() 266 { 267 return [ 268 'svg' => [ 269 'class' => true, 270 'xmlns' => true, 271 'width' => true, 272 'height' => true, 273 'viewbox' => true, 274 'fill' => true, 275 'stroke' => true, 276 'stroke-width' => true, 277 'stroke-linecap' => true, 278 'stroke-linejoin' => true, 279 'aria-hidden' => true, 280 ], 281 'path' => [ 282 'd' => true, 283 ], 284 'polyline' => [ 285 'points' => true, 286 ], 287 'line' => [ 288 'x1' => true, 289 'y1' => true, 290 'x2' => true, 291 'y2' => true, 292 ], 293 'rect' => [ 294 'x' => true, 295 'y' => true, 296 'width' => true, 297 'height' => true, 298 ], 299 ]; 259 300 } 260 301 -
google-calendar-events/trunk/includes/main.php
r3632810 r3805019 271 271 add_action('admin_notices', function () { 272 272 echo '<div class="error"><p>' . 273 sprintf( 274 __( 275 'The Simple Calendar plugin now includes the features previously provided by the Google Calendar OAuth Helper add-on. Please deactivate and remove the OAuth Helper add-on to avoid redundancy.', 276 'google-calendar-events', 277 ), 278 simcal_ga_campaign_url(simcal_get_url('addons'), 'core-plugin', 'admin-notice'), 273 esc_html__( 274 'The Simple Calendar plugin now includes the features previously provided by the Google Calendar OAuth Helper add-on. Please deactivate and remove the OAuth Helper add-on to avoid redundancy.', 275 'google-calendar-events', 279 276 ) . 280 277 '</p></div>'; -
google-calendar-events/trunk/includes/post-types.php
r3717083 r3805019 413 413 414 414 if ('after' == $pos) { 415 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- already-filtered post content; wp_kses_post would strip embeds. 415 416 echo $the_content; 416 417 simcal_print_calendar($id); 417 418 } elseif ('before' == $pos) { 418 419 simcal_print_calendar($id); 420 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- already-filtered post content; wp_kses_post would strip embeds. 419 421 echo $the_content; 420 422 } else { 423 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- already-filtered post content; wp_kses_post would strip embeds. 421 424 echo $the_content; 422 425 } -
google-calendar-events/trunk/includes/updates/update-v300.php
r3551626 r3805019 374 374 private function convert_legacy_range($date) 375 375 { 376 $date = empty($date) ? date('m/d/Y', time()) : $date;376 $date = empty($date) ? gmdate('m/d/Y', time()) : $date; 377 377 $timestamp = Carbon::createFromFormat('m/d/Y', $date)->getTimestamp(); 378 return date('Y-m-d', $timestamp);378 return gmdate('Y-m-d', $timestamp); 379 379 } 380 380 } -
google-calendar-events/trunk/includes/vendor/autoload.php
r3783403 r3805019 20 20 require_once __DIR__ . '/composer/autoload_real.php'; 21 21 22 return ComposerAutoloaderInit 10059a6994cc633857bdbfd53b252461::getLoader();22 return ComposerAutoloaderInit5f373d91a51b0354e747a5e3eae25c43::getLoader(); -
google-calendar-events/trunk/includes/vendor/composer/autoload_real.php
r3783403 r3805019 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 10059a6994cc633857bdbfd53b2524615 class ComposerAutoloaderInit5f373d91a51b0354e747a5e3eae25c43 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit 10059a6994cc633857bdbfd53b252461', 'loadClassLoader'), true, true);25 spl_autoload_register(array('ComposerAutoloaderInit5f373d91a51b0354e747a5e3eae25c43', 'loadClassLoader'), true, true); 26 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 27 spl_autoload_unregister(array('ComposerAutoloaderInit 10059a6994cc633857bdbfd53b252461', 'loadClassLoader'));27 spl_autoload_unregister(array('ComposerAutoloaderInit5f373d91a51b0354e747a5e3eae25c43', 'loadClassLoader')); 28 28 29 29 require __DIR__ . '/autoload_static.php'; 30 call_user_func(\Composer\Autoload\ComposerStaticInit 10059a6994cc633857bdbfd53b252461::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInit5f373d91a51b0354e747a5e3eae25c43::getInitializer($loader)); 31 31 32 32 $loader->setClassMapAuthoritative(true); -
google-calendar-events/trunk/includes/vendor/composer/autoload_static.php
r3783403 r3805019 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 10059a6994cc633857bdbfd53b2524617 class ComposerStaticInit5f373d91a51b0354e747a5e3eae25c43 8 8 { 9 9 public static $classMap = array ( … … 89 89 { 90 90 return \Closure::bind(function () use ($loader) { 91 $loader->classMap = ComposerStaticInit 10059a6994cc633857bdbfd53b252461::$classMap;91 $loader->classMap = ComposerStaticInit5f373d91a51b0354e747a5e3eae25c43::$classMap; 92 92 93 93 }, null, ClassLoader::class); -
google-calendar-events/trunk/includes/widgets/calendar.php
r3551626 r3805019 73 73 public function widget($args, $instance) 74 74 { 75 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- HTML wrappers provided by WordPress/theme. 75 76 echo $args['before_widget']; 76 77 77 78 if (!empty($instance['title'])) { 78 echo $args['before_title'] . apply_filters('widget_title', $instance['title']) . $args['after_title']; 79 $title = apply_filters('widget_title', $instance['title'], $instance, $this->id_base); 80 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- before/after_title from theme; title escaped below. 81 echo $args['before_title'] . esc_html($title) . $args['after_title']; 79 82 } 80 83 … … 84 87 } 85 88 89 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- HTML wrappers provided by WordPress/theme. 86 90 echo $args['after_widget']; 87 91 } … … 132 136 133 137 <p> 134 <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:', 'google-calendar-events'); ?></label> 138 <label for="<?php echo esc_attr( 139 $this->get_field_id('title'), 140 ); ?>"><?php esc_html_e('Title:', 'google-calendar-events'); ?></label> 135 141 <br> 136 142 <input type="text" 137 name="<?php echo $this->get_field_name('title'); ?>"138 id="<?php echo $this->get_field_id('title'); ?>"143 name="<?php echo esc_attr($this->get_field_name('title')); ?>" 144 id="<?php echo esc_attr($this->get_field_id('title')); ?>" 139 145 class="widefat simcal-field simcal-field-standard simcal-field-text" 140 value="<?php echo $title; ?>">146 value="<?php echo esc_attr($title); ?>"> 141 147 </p> 142 148 143 149 <p> 144 <label for="<?php echo $this->get_field_id(145 'calendar_id',146 ); ?>"><?php _e('Calendar:', 'google-calendar-events'); ?></label>150 <label for="<?php echo esc_attr( 151 $this->get_field_id('calendar_id'), 152 ); ?>"><?php esc_html_e('Calendar:', 'google-calendar-events'); ?></label> 147 153 <br> 148 154 <?php $multiselect = count($this->calendars) > 15 ? ' simcal-field-select-enhanced' : ''; ?> 149 <select name="<?php echo $this->get_field_name('calendar_id'); ?>"150 id="<?php echo $this->get_field_id('calendar_id'); ?>"151 class="simcal-field simcal-field-select<?php echo $multiselect; ?>"152 data-noresults="<?php __('No calendars found.', 'google-calendar-events'); ?>">155 <select name="<?php echo esc_attr($this->get_field_name('calendar_id')); ?>" 156 id="<?php echo esc_attr($this->get_field_id('calendar_id')); ?>" 157 class="simcal-field simcal-field-select<?php echo esc_attr($multiselect); ?>" 158 data-noresults="<?php echo esc_attr__('No calendars found.', 'google-calendar-events'); ?>"> 153 159 <?php foreach ($this->calendars as $id => $name): ?> 154 <option value="<?php echo $id; ?>" <?php selected($id, $calendar_id, true); ?>><?php echo $name; ?></option> 160 <option value="<?php echo esc_attr((string) $id); ?>" <?php selected($id, $calendar_id, true); ?>><?php echo esc_html( 161 $name, 162 ); ?></option> 155 163 <?php endforeach; ?> 156 164 </select> -
google-calendar-events/trunk/includes/wp-requirements.php
r3551626 r3805019 12 12 */ 13 13 14 if (!defined('ABSPATH')) { 15 exit(); 16 } 17 14 18 if (!class_exists('SimCal_WP_Requirements')) { 15 19 class SimCal_WP_Requirements … … 92 96 public function __construct($name, $plugin, $requirements) 93 97 { 94 $this->name = htmlspecialchars( strip_tags($name));98 $this->name = htmlspecialchars(wp_strip_all_tags($name)); 95 99 $this->plugin = $plugin; 96 100 $this->requirements = $requirements; … … 189 193 $notice = '<div class="error">' . "\n"; 190 194 $notice .= "\t" . '<p>' . "\n"; 191 $notice .= '<strong>' . sprintf('%s could not be activated.', $name) . '</strong><br>';195 $notice .= '<strong>' . esc_html(sprintf('%s could not be activated.', $name)) . '</strong><br>'; 192 196 193 197 foreach ($failures as $requirement => $found) { … … 196 200 if ('Extensions' == $requirement) { 197 201 if (is_array($found)) { 198 $notice .= sprintf('Required PHP Extension(s) not found: %s.', join(', ', $found)) . '<br>';202 $notice .= esc_html(sprintf('Required PHP Extension(s) not found: %s.', join(', ', $found))) . '<br>'; 199 203 } 200 204 } else { 201 205 $notice .= 202 sprintf('Required %1$s version: %2$s - Version found: %3$s', $requirement, $required, $found) . '<br>'; 203 } 204 } 205 206 $notice .= '<em>' . sprintf('Please update to meet %s requirements.', $name) . '</em>' . "\n"; 206 esc_html(sprintf('Required %1$s version: %2$s - Version found: %3$s', $requirement, $required, $found)) . 207 '<br>'; 208 } 209 } 210 211 $notice .= '<em>' . esc_html(sprintf('Please update to meet %s requirements.', $name)) . '</em>' . "\n"; 207 212 $notice .= "\t" . '</p>' . "\n"; 208 213 if ($message) { 209 $notice .= $message;214 $notice .= wp_kses_post($message); 210 215 } 211 216 $notice .= '</div>'; … … 220 225 public function print_notice() 221 226 { 222 echo $this->notice;227 echo wp_kses_post($this->notice); 223 228 } 224 229 -
google-calendar-events/trunk/readme.txt
r3783403 r3805019 2 2 Contributors: simplecalendar, rosinghal, pderksen, nickyoung87, nekojira, rosshanney 3 3 Tags: google calendar, outlook, ical, events, add to calendar 4 Requires at least: 4.24 Requires at least: 5.3 5 5 Requires PHP: 8.1 6 Tested up to: 7. 07 Stable tag: 4.3. 26 Tested up to: 7.1 7 Stable tag: 4.3.3 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 220 220 221 221 == Changelog == 222 223 = 4.3.3 = 224 * Fix: An stored Cross-Site Scripting (XSS) vulnerability. 222 225 223 226 = 4.3.2 = -
google-calendar-events/trunk/third-party/symfony/polyfill-php80/PhpToken.php
r3433589 r3805019 46 46 public function getTokenName(): ?string 47 47 { 48 if ( 'UNKNOWN' === $name = token_name($this->id)) {49 $name = \strlen($this->text) > 1 || \ord($this->text) < 32 ? null : $this->text;48 if ($this->id < 256) { 49 return \chr($this->id & 0xff); 50 50 } 51 return $name;51 return 'UNKNOWN' === ($name = token_name($this->id)) ? null : $name; 52 52 } 53 53 /** … … 81 81 foreach ($tokens as $index => $token) { 82 82 if (\is_string($token)) { 83 $id = \ord($token); 83 // b" is the only such token longer than one char 84 $id = \ord($token[-1]); 84 85 $text = $token; 85 86 } else { … … 88 89 $tokens[$index] = new static($id, $text, $line, $position); 89 90 $position += \strlen($text); 91 $line += preg_match_all('/\r\n?|\n/', $text); 90 92 } 91 93 return $tokens; -
google-calendar-events/trunk/third-party/vendor/autoload.php
r3783403 r3805019 20 20 require_once __DIR__ . '/composer/autoload_real.php'; 21 21 22 return ComposerAutoloaderInit c2fc2dc8d5563f0e93bfe8b7237df564::getLoader();22 return ComposerAutoloaderInite4a25b7984e5e1f4f98762527a4da08b::getLoader(); -
google-calendar-events/trunk/third-party/vendor/composer/autoload_classmap.php
r3783403 r3805019 54 54 'SimpleCalendar\\plugin_deps\\Carbon\\Laravel\\ServiceProvider' => $baseDir . '/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php', 55 55 'SimpleCalendar\\plugin_deps\\Carbon\\LazyTranslator' => $baseDir . '/nesbot/carbon/lazy/Carbon/TranslatorStrongType.php', 56 'SimpleCalendar\\plugin_deps\\Carbon\\MessageFormatter\\LazyMessageFormatter' => $baseDir . '/nesbot/carbon/lazy/Carbon/MessageFormatter/MessageFormatterMapper StrongType.php',56 'SimpleCalendar\\plugin_deps\\Carbon\\MessageFormatter\\LazyMessageFormatter' => $baseDir . '/nesbot/carbon/lazy/Carbon/MessageFormatter/MessageFormatterMapperWeakType.php', 57 57 'SimpleCalendar\\plugin_deps\\Carbon\\MessageFormatter\\MessageFormatterMapper' => $baseDir . '/nesbot/carbon/src/Carbon/MessageFormatter/MessageFormatterMapper.php', 58 58 'SimpleCalendar\\plugin_deps\\Carbon\\PHPStan\\AbstractMacro' => $baseDir . '/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php', 59 'SimpleCalendar\\plugin_deps\\Carbon\\PHPStan\\AbstractReflectionMacro' => $baseDir . '/nesbot/carbon/lazy/Carbon/PHPStan/AbstractMacro Builtin.php',59 'SimpleCalendar\\plugin_deps\\Carbon\\PHPStan\\AbstractReflectionMacro' => $baseDir . '/nesbot/carbon/lazy/Carbon/PHPStan/AbstractMacroStatic.php', 60 60 'SimpleCalendar\\plugin_deps\\Carbon\\PHPStan\\LazyMacro' => $baseDir . '/nesbot/carbon/lazy/Carbon/PHPStan/MacroWeakType.php', 61 61 'SimpleCalendar\\plugin_deps\\Carbon\\PHPStan\\Macro' => $baseDir . '/nesbot/carbon/src/Carbon/PHPStan/Macro.php', -
google-calendar-events/trunk/third-party/vendor/composer/autoload_real.php
r3783403 r3805019 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit c2fc2dc8d5563f0e93bfe8b7237df5645 class ComposerAutoloaderInite4a25b7984e5e1f4f98762527a4da08b 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit c2fc2dc8d5563f0e93bfe8b7237df564', 'loadClassLoader'), true, true);25 spl_autoload_register(array('ComposerAutoloaderInite4a25b7984e5e1f4f98762527a4da08b', 'loadClassLoader'), true, true); 26 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 27 spl_autoload_unregister(array('ComposerAutoloaderInit c2fc2dc8d5563f0e93bfe8b7237df564', 'loadClassLoader'));27 spl_autoload_unregister(array('ComposerAutoloaderInite4a25b7984e5e1f4f98762527a4da08b', 'loadClassLoader')); 28 28 29 29 require __DIR__ . '/autoload_static.php'; 30 call_user_func(\Composer\Autoload\ComposerStaticInit c2fc2dc8d5563f0e93bfe8b7237df564::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInite4a25b7984e5e1f4f98762527a4da08b::getInitializer($loader)); 31 31 32 32 $loader->setClassMapAuthoritative(true); 33 33 $loader->register(true); 34 34 35 $filesToLoad = \Composer\Autoload\ComposerStaticInit c2fc2dc8d5563f0e93bfe8b7237df564::$files;35 $filesToLoad = \Composer\Autoload\ComposerStaticInite4a25b7984e5e1f4f98762527a4da08b::$files; 36 36 $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { 37 37 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { -
google-calendar-events/trunk/third-party/vendor/composer/autoload_static.php
r3783403 r3805019 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit c2fc2dc8d5563f0e93bfe8b7237df5647 class ComposerStaticInite4a25b7984e5e1f4f98762527a4da08b 8 8 { 9 9 public static $files = array ( … … 59 59 'SimpleCalendar\\plugin_deps\\Carbon\\Laravel\\ServiceProvider' => __DIR__ . '/../..' . '/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php', 60 60 'SimpleCalendar\\plugin_deps\\Carbon\\LazyTranslator' => __DIR__ . '/../..' . '/nesbot/carbon/lazy/Carbon/TranslatorStrongType.php', 61 'SimpleCalendar\\plugin_deps\\Carbon\\MessageFormatter\\LazyMessageFormatter' => __DIR__ . '/../..' . '/nesbot/carbon/lazy/Carbon/MessageFormatter/MessageFormatterMapper StrongType.php',61 'SimpleCalendar\\plugin_deps\\Carbon\\MessageFormatter\\LazyMessageFormatter' => __DIR__ . '/../..' . '/nesbot/carbon/lazy/Carbon/MessageFormatter/MessageFormatterMapperWeakType.php', 62 62 'SimpleCalendar\\plugin_deps\\Carbon\\MessageFormatter\\MessageFormatterMapper' => __DIR__ . '/../..' . '/nesbot/carbon/src/Carbon/MessageFormatter/MessageFormatterMapper.php', 63 63 'SimpleCalendar\\plugin_deps\\Carbon\\PHPStan\\AbstractMacro' => __DIR__ . '/../..' . '/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php', 64 'SimpleCalendar\\plugin_deps\\Carbon\\PHPStan\\AbstractReflectionMacro' => __DIR__ . '/../..' . '/nesbot/carbon/lazy/Carbon/PHPStan/AbstractMacro Builtin.php',64 'SimpleCalendar\\plugin_deps\\Carbon\\PHPStan\\AbstractReflectionMacro' => __DIR__ . '/../..' . '/nesbot/carbon/lazy/Carbon/PHPStan/AbstractMacroStatic.php', 65 65 'SimpleCalendar\\plugin_deps\\Carbon\\PHPStan\\LazyMacro' => __DIR__ . '/../..' . '/nesbot/carbon/lazy/Carbon/PHPStan/MacroWeakType.php', 66 66 'SimpleCalendar\\plugin_deps\\Carbon\\PHPStan\\Macro' => __DIR__ . '/../..' . '/nesbot/carbon/src/Carbon/PHPStan/Macro.php', … … 672 672 { 673 673 return \Closure::bind(function () use ($loader) { 674 $loader->classMap = ComposerStaticInit c2fc2dc8d5563f0e93bfe8b7237df564::$classMap;674 $loader->classMap = ComposerStaticInite4a25b7984e5e1f4f98762527a4da08b::$classMap; 675 675 676 676 }, null, ClassLoader::class);
Note:
See TracChangeset
for help on using the changeset viewer.