@@ -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" 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" 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" 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" 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" 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" 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" 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" 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" 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" 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 | } |