@@ -95,7 +95,7 @@ |
||
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | } else { |
| 98 | - // @todo eventually if a date range picker is needed, this can be extended |
|
| 98 | + // @todo eventually if a date range picker is needed, this can be extended |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | ?> |
@@ -335,7 +335,7 @@ |
||
| 335 | 335 | */ |
| 336 | 336 | private function meridiem() { |
| 337 | 337 | |
| 338 | - ?> |
|
| 338 | + ?> |
|
| 339 | 339 | <div> |
| 340 | 340 | <label for="<?php echo $this->id; ?>-meridiem"> |
| 341 | 341 | <?php _e( 'Meridiem', 'google-calendar-events' ); ?> |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | value="<?php echo $this->value; ?>" |
| 58 | 58 | class="<?php echo $this->class; ?>"<?php |
| 59 | 59 | echo $this->style ? 'style="' . $this->style . '" ' : ' '; |
| 60 | - echo $this->placeholder ? 'placeholder="' . $this->placeholder . '"' : ' '; |
|
| 60 | + echo $this->placeholder ? 'placeholder="' . $this->placeholder . '"' : ' '; |
|
| 61 | 61 | echo $this->attributes; ?>/> |
| 62 | 62 | <?php |
| 63 | 63 | |
@@ -75,8 +75,8 @@ |
||
| 75 | 75 | 'keys' => array( |
| 76 | 76 | 'title' => __( 'Premium Add-on License Keys', 'google-calendar-events' ), |
| 77 | 77 | 'description' => __( 'Enter your add-on license keys below, making sure to activate each one to ensure they are valid.', 'google-calendar-events' ) . |
| 78 | - '<br/><br/>' . |
|
| 79 | - '<em>' . __( 'Your license keys are used for access to automatic upgrades and premium support.', 'google-calendar-events' ) . '</em>', |
|
| 78 | + '<br/><br/>' . |
|
| 79 | + '<em>' . __( 'Your license keys are used for access to automatic upgrades and premium support.', 'google-calendar-events' ) . '</em>', |
|
| 80 | 80 | ), |
| 81 | 81 | ); |
| 82 | 82 | return apply_filters( 'simcal_add_' . $this->option_group . '_' . $this->id .'_sections', $sections ); |
@@ -272,9 +272,9 @@ |
||
| 272 | 272 | |
| 273 | 273 | if ( $post_type == 'calendar' && isset( $post->ID ) ) { |
| 274 | 274 | echo '<a id="simcal-clear-cache" class="button" data-id="' . $post->ID . ' ">' . |
| 275 | - '<i class="simcal-icon-spinner simcal-icon-spin" style="display: none;"></i> ' . |
|
| 276 | - __( 'Clear cache', 'google-calendar-events' ) . |
|
| 277 | - '</a>'; |
|
| 275 | + '<i class="simcal-icon-spinner simcal-icon-spin" style="display: none;"></i> ' . |
|
| 276 | + __( 'Clear cache', 'google-calendar-events' ) . |
|
| 277 | + '</a>'; |
|
| 278 | 278 | } |
| 279 | 279 | } |
| 280 | 280 | |
@@ -82,12 +82,12 @@ discard block |
||
| 82 | 82 | return array( |
| 83 | 83 | 'name' => $this->feed->name, |
| 84 | 84 | 'description' => __( "To read events from your public Google Calendars you'll need create a Google API key and save it here.", 'google-calendar-events' ) . |
| 85 | - '<br/><br/>' . |
|
| 86 | - '<em style="font-size: 14px;">' . |
|
| 87 | - sprintf( __( '<strong>Note:</strong> Calendars configured to use the <strong><a href="%s" target="_blank">Google Calendar Pro add-on</a></strong> use a different method of authorization.', 'google-calendar-events' ), |
|
| 88 | - simcal_ga_campaign_url( simcal_get_url( 'gcal-pro' ), 'core-plugin', 'settings-link' ) |
|
| 89 | - ) . |
|
| 90 | - '</em>', |
|
| 85 | + '<br/><br/>' . |
|
| 86 | + '<em style="font-size: 14px;">' . |
|
| 87 | + sprintf( __( '<strong>Note:</strong> Calendars configured to use the <strong><a href="%s" target="_blank">Google Calendar Pro add-on</a></strong> use a different method of authorization.', 'google-calendar-events' ), |
|
| 88 | + simcal_ga_campaign_url( simcal_get_url( 'gcal-pro' ), 'core-plugin', 'settings-link' ) |
|
| 89 | + ) . |
|
| 90 | + '</em>', |
|
| 91 | 91 | 'fields' => array( |
| 92 | 92 | 'api_key' => array( |
| 93 | 93 | 'type' => 'standard', |
@@ -273,12 +273,12 @@ discard block |
||
| 273 | 273 | 'post' => $post_id, |
| 274 | 274 | 'dismissable' => false, |
| 275 | 275 | 'content' => '<p>' . |
| 276 | - '<i class="simcal-icon-warning"></i> ' . |
|
| 277 | - sprintf( |
|
| 278 | - __( 'Your Google Calendar events will not show up until you <a href="%s">create and save a Google API key</a>.', 'google-calendar-events' ), |
|
| 279 | - admin_url( 'edit.php?post_type=calendar&page=simple-calendar_settings&tab=feeds' ) |
|
| 280 | - ) . |
|
| 281 | - '</p>', |
|
| 276 | + '<i class="simcal-icon-warning"></i> ' . |
|
| 277 | + sprintf( |
|
| 278 | + __( 'Your Google Calendar events will not show up until you <a href="%s">create and save a Google API key</a>.', 'google-calendar-events' ), |
|
| 279 | + admin_url( 'edit.php?post_type=calendar&page=simple-calendar_settings&tab=feeds' ) |
|
| 280 | + ) . |
|
| 281 | + '</p>', |
|
| 282 | 282 | ) |
| 283 | 283 | ); |
| 284 | 284 | |
@@ -305,11 +305,11 @@ discard block |
||
| 305 | 305 | 'post' => $post_id, |
| 306 | 306 | 'dismissable' => false, |
| 307 | 307 | 'content' => '<p>' . |
| 308 | - '<i class="simcal-icon-warning"></i> ' . |
|
| 309 | - __( 'While trying to retrieve events, Google returned an error:', 'google-calendar-events' ) . |
|
| 310 | - '<br>' . $message . '<br>' . |
|
| 311 | - __( 'Please ensure that both your Google Calendar ID and API Key are valid and that the Google Calendar you want to display is public.', 'google-calendar-events' ) . |
|
| 312 | - '</p>', |
|
| 308 | + '<i class="simcal-icon-warning"></i> ' . |
|
| 309 | + __( 'While trying to retrieve events, Google returned an error:', 'google-calendar-events' ) . |
|
| 310 | + '<br>' . $message . '<br>' . |
|
| 311 | + __( 'Please ensure that both your Google Calendar ID and API Key are valid and that the Google Calendar you want to display is public.', 'google-calendar-events' ) . |
|
| 312 | + '</p>', |
|
| 313 | 313 | ) |
| 314 | 314 | ); |
| 315 | 315 | |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | * |
| 112 | 112 | * @param string $api_key Google API key. |
| 113 | 113 | * |
| 114 | - * @return true|string |
|
| 114 | + * @return string |
|
| 115 | 115 | */ |
| 116 | 116 | public function check_google_api_key( $api_key = '' ) { |
| 117 | 117 | |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | * |
| 241 | 241 | * @param string $google_calendar_id |
| 242 | 242 | * |
| 243 | - * @return true|string |
|
| 243 | + * @return string |
|
| 244 | 244 | */ |
| 245 | 245 | public function test_api_key_connection( $google_calendar_id ) { |
| 246 | 246 | |
@@ -298,8 +298,8 @@ |
||
| 298 | 298 | 'name' => '_default_calendar_expand_multi_day_events', |
| 299 | 299 | 'id' => '_default_calendar_expand_multi_day_events', |
| 300 | 300 | 'tooltip' => __( 'For events spanning multiple days, you can display them on each day of the event, ' . |
| 301 | - 'only on the first day of the event, or on all days of the event, but only up to the current day. ' . |
|
| 302 | - 'Third option applies to list views only.', 'google-calendar-events' ), |
|
| 301 | + 'only on the first day of the event, or on all days of the event, but only up to the current day. ' . |
|
| 302 | + 'Third option applies to list views only.', 'google-calendar-events' ), |
|
| 303 | 303 | 'value' => $multi_day_value, |
| 304 | 304 | 'options' => array( |
| 305 | 305 | 'yes' => __( 'Yes, display on all days of event', 'google-calendar-events' ), |
@@ -784,8 +784,8 @@ |
||
| 784 | 784 | if ( 'yes' == $poweredby ) { |
| 785 | 785 | $align = is_rtl() ? 'left' : 'right'; |
| 786 | 786 | echo '<small class="simcal-powered simcal-align-' . $align .'">' . |
| 787 | - sprintf( __( 'Powered by <a href="%s" target="_blank">Simple Calendar</a>', 'google-calendar-events' ), simcal_get_url( 'home' ) ) . |
|
| 788 | - '</small>'; |
|
| 787 | + sprintf( __( 'Powered by <a href="%s" target="_blank">Simple Calendar</a>', 'google-calendar-events' ), simcal_get_url( 'home' ) ) . |
|
| 788 | + '</small>'; |
|
| 789 | 789 | } |
| 790 | 790 | |
| 791 | 791 | echo '</div>'; |
@@ -594,21 +594,21 @@ discard block |
||
| 594 | 594 | if ( ! $event->whole_day ) { |
| 595 | 595 | |
| 596 | 596 | $time_start = $this->calendar->datetime_separator . |
| 597 | - ' <span class="simcal-event-start simcal-event-start-time" ' . |
|
| 598 | - 'data-event-start="' . $start->getTimestamp() . '" ' . |
|
| 599 | - 'data-event-format="' . $this->calendar->time_format . '" ' . |
|
| 600 | - 'itemprop="startDate" data-content="' . $start->toIso8601String() . '">' . |
|
| 601 | - date_i18n( $this->calendar->time_format, $start->getTimestamp() ) . |
|
| 602 | - '</span> '; |
|
| 597 | + ' <span class="simcal-event-start simcal-event-start-time" ' . |
|
| 598 | + 'data-event-start="' . $start->getTimestamp() . '" ' . |
|
| 599 | + 'data-event-format="' . $this->calendar->time_format . '" ' . |
|
| 600 | + 'itemprop="startDate" data-content="' . $start->toIso8601String() . '">' . |
|
| 601 | + date_i18n( $this->calendar->time_format, $start->getTimestamp() ) . |
|
| 602 | + '</span> '; |
|
| 603 | 603 | |
| 604 | 604 | if ( $end instanceof Carbon ) { |
| 605 | 605 | |
| 606 | 606 | $time_end = ' <span class="simcal-event-end simcal-event-end-time" ' . |
| 607 | - 'data-event-end="' . $end->getTimestamp() . '" ' . |
|
| 608 | - 'data-event-format="' . $this->calendar->time_format . '" ' . |
|
| 609 | - 'itemprop="endDate" data-content="' . $end->toIso8601String() . '">' . |
|
| 610 | - date_i18n( $this->calendar->time_format, $end->getTimestamp() ) . |
|
| 611 | - '</span> '; |
|
| 607 | + 'data-event-end="' . $end->getTimestamp() . '" ' . |
|
| 608 | + 'data-event-format="' . $this->calendar->time_format . '" ' . |
|
| 609 | + 'itemprop="endDate" data-content="' . $end->toIso8601String() . '">' . |
|
| 610 | + date_i18n( $this->calendar->time_format, $end->getTimestamp() ) . |
|
| 611 | + '</span> '; |
|
| 612 | 612 | |
| 613 | 613 | } |
| 614 | 614 | |
@@ -617,23 +617,23 @@ discard block |
||
| 617 | 617 | if ( $event->multiple_days ) { |
| 618 | 618 | |
| 619 | 619 | $output = ' <span class="simcal-event-start simcal-event-start-date" ' . |
| 620 | - 'data-event-start="' . $start->getTimestamp() . '" ' . |
|
| 621 | - 'data-event-format="' . $this->calendar->date_format . '" ' . |
|
| 622 | - 'itemprop="startDate" data-content="' . $start->toIso8601String() . '">' . |
|
| 623 | - date_i18n( $this->calendar->date_format, $start->getTimestamp() ) . |
|
| 624 | - '</span> ' . |
|
| 625 | - $time_start; |
|
| 620 | + 'data-event-start="' . $start->getTimestamp() . '" ' . |
|
| 621 | + 'data-event-format="' . $this->calendar->date_format . '" ' . |
|
| 622 | + 'itemprop="startDate" data-content="' . $start->toIso8601String() . '">' . |
|
| 623 | + date_i18n( $this->calendar->date_format, $start->getTimestamp() ) . |
|
| 624 | + '</span> ' . |
|
| 625 | + $time_start; |
|
| 626 | 626 | |
| 627 | 627 | if ( $end instanceof Carbon ) { |
| 628 | 628 | |
| 629 | 629 | $output .= '-' . |
| 630 | - ' <span class="simcal-event-start simcal-event-end-date" ' . |
|
| 631 | - 'data-event-start="' . $end->getTimestamp() . '" ' . |
|
| 632 | - 'data-event-format="' . $this->calendar->date_format . '" ' . |
|
| 633 | - 'itemprop="endDate" data-content="' . $end->toIso8601String() . '">' . |
|
| 634 | - date_i18n( $this->calendar->date_format, $end->getTimestamp() ) . |
|
| 635 | - '</span> ' . |
|
| 636 | - $time_end; |
|
| 630 | + ' <span class="simcal-event-start simcal-event-end-date" ' . |
|
| 631 | + 'data-event-start="' . $end->getTimestamp() . '" ' . |
|
| 632 | + 'data-event-format="' . $this->calendar->date_format . '" ' . |
|
| 633 | + 'itemprop="endDate" data-content="' . $end->toIso8601String() . '">' . |
|
| 634 | + date_i18n( $this->calendar->date_format, $end->getTimestamp() ) . |
|
| 635 | + '</span> ' . |
|
| 636 | + $time_end; |
|
| 637 | 637 | } |
| 638 | 638 | |
| 639 | 639 | } else { |
@@ -641,12 +641,12 @@ discard block |
||
| 641 | 641 | $time_end = ! empty( $time_start ) && ! empty( $time_end ) ? ' - ' . $time_end : ''; |
| 642 | 642 | |
| 643 | 643 | $output = ' <span class="simcal-event-start simcal-event-start-date" ' . |
| 644 | - 'data-event-start="' . $start->getTimestamp() . '" ' . |
|
| 645 | - 'data-event-format="' . $this->calendar->date_format . '">' . |
|
| 646 | - date_i18n( $this->calendar->date_format, $start->getTimestamp() ) . |
|
| 647 | - '</span> ' . |
|
| 648 | - $time_start . |
|
| 649 | - $time_end; |
|
| 644 | + 'data-event-start="' . $start->getTimestamp() . '" ' . |
|
| 645 | + 'data-event-format="' . $this->calendar->date_format . '">' . |
|
| 646 | + date_i18n( $this->calendar->date_format, $start->getTimestamp() ) . |
|
| 647 | + '</span> ' . |
|
| 648 | + $time_start . |
|
| 649 | + $time_end; |
|
| 650 | 650 | |
| 651 | 651 | } |
| 652 | 652 | |
@@ -705,11 +705,11 @@ discard block |
||
| 705 | 705 | } |
| 706 | 706 | |
| 707 | 707 | return '<span class="simcal-event-' . $bound . ' ' . 'simcal-event-' . $bound . '-' . $format . '" ' . |
| 708 | - 'data-event-' . $bound . '="' . $event_dt->getTimestamp() . '" ' . |
|
| 709 | - 'data-event-format="' . $dt_format . '" ' . |
|
| 710 | - 'itemprop="' . $bound . 'Date" data-content="' . $event_dt->toIso8601String() . '">' . |
|
| 711 | - $value . |
|
| 712 | - '</span>'; |
|
| 708 | + 'data-event-' . $bound . '="' . $event_dt->getTimestamp() . '" ' . |
|
| 709 | + 'data-event-format="' . $dt_format . '" ' . |
|
| 710 | + 'itemprop="' . $bound . 'Date" data-content="' . $event_dt->toIso8601String() . '">' . |
|
| 711 | + $value . |
|
| 712 | + '</span>'; |
|
| 713 | 713 | } |
| 714 | 714 | |
| 715 | 715 | /** |
@@ -928,35 +928,35 @@ discard block |
||
| 928 | 928 | $tagregexp = implode( '|', array_values( $this->tags ) ); |
| 929 | 929 | |
| 930 | 930 | return '/' |
| 931 | - . '\\[' // Opening bracket |
|
| 932 | - . '(\\[?)' // 1: Optional second opening bracket for escaping tags: [[tag]] |
|
| 933 | - . "($tagregexp)" // 2: Tag name |
|
| 934 | - . '(?![\\w-])' // Not followed by word character or hyphen |
|
| 935 | - . '(' // 3: Unroll the loop: Inside the opening tag |
|
| 936 | - . '[^\\]\\/]*' // Not a closing bracket or forward slash |
|
| 937 | - . '(?:' |
|
| 938 | - . '\\/(?!\\])' // A forward slash not followed by a closing bracket |
|
| 939 | - . '[^\\]\\/]*' // Not a closing bracket or forward slash |
|
| 940 | - . ')*?' |
|
| 941 | - . ')' |
|
| 942 | - . '(?:' |
|
| 943 | - . '(\\/)' // 4: Self closing tag ... |
|
| 944 | - . '\\]' // ... and closing bracket |
|
| 945 | - . '|' |
|
| 946 | - . '\\]' // Closing bracket |
|
| 947 | - . '(?:' |
|
| 948 | - . '(' // 5: Unroll the loop: Optionally, anything between the opening and closing tags |
|
| 949 | - . '[^\\[]*+' // Not an opening bracket |
|
| 950 | - . '(?:' |
|
| 951 | - . '\\[(?!\\/\\2\\])' // An opening bracket not followed by the closing tag |
|
| 952 | - . '[^\\[]*+' // Not an opening bracket |
|
| 953 | - . ')*+' |
|
| 954 | - . ')' |
|
| 955 | - . '\\[\\/\\2\\]' // Closing tag |
|
| 956 | - . ')?' |
|
| 957 | - . ')' |
|
| 958 | - . '(\\]?)' // 6: Optional second closing bracket for escaping tags: [[tag]] |
|
| 959 | - . '/s'; |
|
| 931 | + . '\\[' // Opening bracket |
|
| 932 | + . '(\\[?)' // 1: Optional second opening bracket for escaping tags: [[tag]] |
|
| 933 | + . "($tagregexp)" // 2: Tag name |
|
| 934 | + . '(?![\\w-])' // Not followed by word character or hyphen |
|
| 935 | + . '(' // 3: Unroll the loop: Inside the opening tag |
|
| 936 | + . '[^\\]\\/]*' // Not a closing bracket or forward slash |
|
| 937 | + . '(?:' |
|
| 938 | + . '\\/(?!\\])' // A forward slash not followed by a closing bracket |
|
| 939 | + . '[^\\]\\/]*' // Not a closing bracket or forward slash |
|
| 940 | + . ')*?' |
|
| 941 | + . ')' |
|
| 942 | + . '(?:' |
|
| 943 | + . '(\\/)' // 4: Self closing tag ... |
|
| 944 | + . '\\]' // ... and closing bracket |
|
| 945 | + . '|' |
|
| 946 | + . '\\]' // Closing bracket |
|
| 947 | + . '(?:' |
|
| 948 | + . '(' // 5: Unroll the loop: Optionally, anything between the opening and closing tags |
|
| 949 | + . '[^\\[]*+' // Not an opening bracket |
|
| 950 | + . '(?:' |
|
| 951 | + . '\\[(?!\\/\\2\\])' // An opening bracket not followed by the closing tag |
|
| 952 | + . '[^\\[]*+' // Not an opening bracket |
|
| 953 | + . ')*+' |
|
| 954 | + . ')' |
|
| 955 | + . '\\[\\/\\2\\]' // Closing tag |
|
| 956 | + . ')?' |
|
| 957 | + . ')' |
|
| 958 | + . '(\\]?)' // 6: Optional second closing bracket for escaping tags: [[tag]] |
|
| 959 | + . '/s'; |
|
| 960 | 960 | } |
| 961 | 961 | |
| 962 | 962 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | * |
| 66 | 66 | * @since 3.0.0 |
| 67 | 67 | * |
| 68 | - * @return array |
|
| 68 | + * @return string[] |
|
| 69 | 69 | */ |
| 70 | 70 | public function get_content_tags() { |
| 71 | 71 | return array( |
@@ -498,8 +498,8 @@ discard block |
||
| 498 | 498 | * @since 3.0.0 |
| 499 | 499 | * @access private |
| 500 | 500 | * |
| 501 | - * @param $title |
|
| 502 | - * @param $attr |
|
| 501 | + * @param string $title |
|
| 502 | + * @param string $attr |
|
| 503 | 503 | * |
| 504 | 504 | * @return string |
| 505 | 505 | */ |