Changeset 3470542
- Timestamp:
- 02/26/2026 04:56:23 PM (4 weeks ago)
- Location:
- cs-integration
- Files:
-
- 86 added
- 9 edited
-
tags/1.0.8 (added)
-
tags/1.0.8/LICENSE.txt (added)
-
tags/1.0.8/README.md (added)
-
tags/1.0.8/README.txt (added)
-
tags/1.0.8/admin (added)
-
tags/1.0.8/admin/class-cs-integration-admin.php (added)
-
tags/1.0.8/admin/css (added)
-
tags/1.0.8/admin/css/cs-integration-admin.css (added)
-
tags/1.0.8/admin/index.php (added)
-
tags/1.0.8/admin/js (added)
-
tags/1.0.8/admin/js/cs-integration-admin.js (added)
-
tags/1.0.8/admin/partials (added)
-
tags/1.0.8/admin/partials/cs-integration-admin-display.php (added)
-
tags/1.0.8/assets (added)
-
tags/1.0.8/assets/arrow-back.svg (added)
-
tags/1.0.8/assets/arrow-forward.svg (added)
-
tags/1.0.8/assets/calendar.svg (added)
-
tags/1.0.8/assets/caret-down-filled.svg (added)
-
tags/1.0.8/assets/clock.svg (added)
-
tags/1.0.8/assets/close.svg (added)
-
tags/1.0.8/assets/icon-256x256.png (added)
-
tags/1.0.8/assets/location.svg (added)
-
tags/1.0.8/cs-integration.php (added)
-
tags/1.0.8/fonts (added)
-
tags/1.0.8/fonts/glyphs (added)
-
tags/1.0.8/fonts/glyphs/LICENSE.txt (added)
-
tags/1.0.8/fonts/glyphs/README.txt (added)
-
tags/1.0.8/fonts/glyphs/config.json (added)
-
tags/1.0.8/fonts/glyphs/css (added)
-
tags/1.0.8/fonts/glyphs/css/animation.css (added)
-
tags/1.0.8/fonts/glyphs/css/glyphs-codes.css (added)
-
tags/1.0.8/fonts/glyphs/css/glyphs-embedded.css (added)
-
tags/1.0.8/fonts/glyphs/css/glyphs-ie7-codes.css (added)
-
tags/1.0.8/fonts/glyphs/css/glyphs-ie7.css (added)
-
tags/1.0.8/fonts/glyphs/css/glyphs.css (added)
-
tags/1.0.8/fonts/glyphs/demo.html (added)
-
tags/1.0.8/fonts/glyphs/font (added)
-
tags/1.0.8/fonts/glyphs/font/glyphs.eot (added)
-
tags/1.0.8/fonts/glyphs/font/glyphs.svg (added)
-
tags/1.0.8/fonts/glyphs/font/glyphs.ttf (added)
-
tags/1.0.8/fonts/glyphs/font/glyphs.woff (added)
-
tags/1.0.8/fonts/glyphs/font/glyphs.woff2 (added)
-
tags/1.0.8/includes (added)
-
tags/1.0.8/includes/class-cs-integration-activator.php (added)
-
tags/1.0.8/includes/class-cs-integration-deactivator.php (added)
-
tags/1.0.8/includes/class-cs-integration-i18n.php (added)
-
tags/1.0.8/includes/class-cs-integration-loader.php (added)
-
tags/1.0.8/includes/class-cs-integration.php (added)
-
tags/1.0.8/includes/index.php (added)
-
tags/1.0.8/index.php (added)
-
tags/1.0.8/languages (added)
-
tags/1.0.8/languages/cs-integration.pot (added)
-
tags/1.0.8/languages/en_GB.mo (added)
-
tags/1.0.8/languages/en_GB.po (added)
-
tags/1.0.8/languages/fr.mo (added)
-
tags/1.0.8/languages/fr.po (added)
-
tags/1.0.8/public (added)
-
tags/1.0.8/public/class-cs-integration-public.php (added)
-
tags/1.0.8/public/css (added)
-
tags/1.0.8/public/css/cs-integration-public.css (added)
-
tags/1.0.8/public/index.php (added)
-
tags/1.0.8/public/js (added)
-
tags/1.0.8/public/js/cs-integration-public-orig.js (added)
-
tags/1.0.8/public/js/cs-integration-public.js (added)
-
tags/1.0.8/public/partials (added)
-
tags/1.0.8/public/partials/cs-integration-public-display.php (added)
-
tags/1.0.8/public/shortcodes (added)
-
tags/1.0.8/public/shortcodes/class-churchsuite.php (added)
-
tags/1.0.8/public/shortcodes/class-cs-calendar-event-view.php (added)
-
tags/1.0.8/public/shortcodes/class-cs-calendar-shortcode.php (added)
-
tags/1.0.8/public/shortcodes/class-cs-compact-event-view.php (added)
-
tags/1.0.8/public/shortcodes/class-cs-date-utilities.php (added)
-
tags/1.0.8/public/shortcodes/class-cs-event-card-view.php (added)
-
tags/1.0.8/public/shortcodes/class-cs-event-cards-shortcode.php (added)
-
tags/1.0.8/public/shortcodes/class-cs-event-list-shortcode.php (added)
-
tags/1.0.8/public/shortcodes/class-cs-event.php (added)
-
tags/1.0.8/public/shortcodes/class-cs-group-view.php (added)
-
tags/1.0.8/public/shortcodes/class-cs-group.php (added)
-
tags/1.0.8/public/shortcodes/class-cs-item.php (added)
-
tags/1.0.8/public/shortcodes/class-cs-json-api.php (added)
-
tags/1.0.8/public/shortcodes/class-cs-shortcode.php (added)
-
tags/1.0.8/public/shortcodes/class-cs-smallgroups-shortcode.php (added)
-
tags/1.0.8/public/shortcodes/class-cs-view.php (added)
-
tags/1.0.8/public/shortcodes/index.php (added)
-
tags/1.0.8/uninstall.php (added)
-
trunk/README.md (modified) (2 diffs)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/cs-integration.php (modified) (2 diffs)
-
trunk/public/shortcodes/class-cs-calendar-event-view.php (modified) (3 diffs)
-
trunk/public/shortcodes/class-cs-calendar-shortcode.php (modified) (9 diffs)
-
trunk/public/shortcodes/class-cs-compact-event-view.php (modified) (4 diffs)
-
trunk/public/shortcodes/class-cs-date-utilities.php (added)
-
trunk/public/shortcodes/class-cs-event-card-view.php (modified) (4 diffs)
-
trunk/public/shortcodes/class-cs-event-list-shortcode.php (modified) (3 diffs)
-
trunk/public/shortcodes/class-cs-group.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cs-integration/trunk/README.md
r3468771 r3470542 4 4 * Requires at least: 6.4 5 5 * Tested up to: 6.9 6 * Stable tag: 1.0. 76 * Stable tag: 1.0.8 7 7 * License: GPLv2 or later 8 8 … … 209 209 ## Changelog 210 210 211 ### 1.0.8 212 **2026-02-26** 213 * Refactored the Locale code to use the wordpress site locale rather than 214 the server locale, and to use the wordpress admin settings for full 215 date or time output. This means the time and date output should always 216 be sympathetic with the Wordpress site settings. Also moved all the 217 time and date string creation to a new module so it can be easily 218 modified without having to update many files. 219 * Version bump to 1.0.8 220 211 221 ### 1.0.7 212 222 -
cs-integration/trunk/README.txt
r3468771 r3470542 4 4 * Requires at least: 6.4 5 5 * Tested up to: 6.9 6 * Stable tag: 1.0. 76 * Stable tag: 1.0.8 7 7 * License: GPLv2 or later 8 8 … … 209 209 == Changelog == 210 210 211 = 1.0.8 = 212 213 **2026-02-26** 214 * Refactored the Locale code to use the wordpress site locale rather than 215 the server locale, and to use the wordpress admin settings for full 216 date or time output. This means the time and date output should always 217 be sympathetic with the Wordpress site settings. Also moved all the 218 time and date string creation to a new module so it can be easily 219 modified without having to update many files. 220 * Version bump to 1.0.8 221 222 211 223 = 1.0.7 = 212 224 -
cs-integration/trunk/cs-integration.php
r3468771 r3470542 20 20 * Plugin URI: https://github.com/AlwynBarry/cs-integration 21 21 * Description: CS Integration provides shortcodes to request and display JSON data from the public JSON ChurchSuite feeds. 22 * Version: 1.0. 722 * Version: 1.0.8 23 23 * Author: Alwyn Barry 24 24 * Author URI: https://github.com/AlwynBarry/ … … 39 39 * This will be updated it as we release new versions. 40 40 */ 41 const CS_INTEGRATION_VERSION = '1.0. 7';41 const CS_INTEGRATION_VERSION = '1.0.8'; 42 42 43 43 /** -
cs-integration/trunk/public/shortcodes/class-cs-calendar-event-view.php
r3468771 r3470542 4 4 5 5 6 require_once plugin_dir_path( __FILE__ ) . 'class-cs-date-utilities.php'; 6 7 require_once plugin_dir_path( __FILE__ ) . 'class-churchsuite.php'; 7 8 require_once plugin_dir_path( __FILE__ ) . 'class-cs-view.php'; 8 9 require_once plugin_dir_path( __FILE__ ) . 'class-cs-event.php'; 9 10 11 use amb_dev\CSI\Cs_Date_Utilities; 10 12 use amb_dev\CSI\ChurchSuite as ChurchSuite; 11 13 use amb_dev\CSI\Cs_View as Cs_View; … … 59 61 */ 60 62 public function display() : string { 61 // A value to prevent repeated creation of a new instance62 $timeFormat = datefmt_create(63 \Locale::getDefault(),64 \IntlDateFormatter::NONE,65 \IntlDateFormatter::SHORT,66 null,67 \IntlDateFormatter::GREGORIAN68 );69 63 // Display the event wrapper, and include the event unique ID, the event 70 64 // status and the event category as classes to be styled, if these are set … … 86 80 $event_time = ''; 87 81 if ( $this->cs_event->is_start_date() ) { 88 $event_time .= ' <div class="cs-time"><span class="cs-start-time">' . datefmt_format( $timeFormat,$this->cs_event->get_start_date() ) . '</span>';89 $event_time .= ( $this->cs_event->is_end_date() ) ? '-' . '<span class="cs-end-time">' . datefmt_format( $timeFormat,$this->cs_event->get_end_date() ) . '</span>' : '';82 $event_time .= ' <div class="cs-time"><span class="cs-start-time">' . Cs_Date_Utilities::get_site_formatted_time( $this->cs_event->get_start_date() ) . '</span>'; 83 $event_time .= ( $this->cs_event->is_end_date() ) ? '-' . '<span class="cs-end-time">' . Cs_Date_Utilities::get_site_formatted_time( $this->cs_event->get_end_date() ) . '</span>' : ''; 90 84 $event_time .= '</div>' . "\n"; 91 85 } -
cs-integration/trunk/public/shortcodes/class-cs-calendar-shortcode.php
r3468771 r3470542 4 4 5 5 6 require_once plugin_dir_path( __FILE__ ) . 'class-cs-date-utilities.php'; 6 7 require_once plugin_dir_path( __FILE__ ) . 'class-churchsuite.php'; 7 8 require_once plugin_dir_path( __FILE__ ) . 'class-cs-shortcode.php'; … … 9 10 require_once plugin_dir_path( __FILE__ ) . 'class-cs-calendar-event-view.php'; 10 11 12 use amb_dev\CSI\Cs_Date_Utilities; 11 13 use amb_dev\CSI\ChurchSuite as ChurchSuite; 12 14 use amb_dev\CSI\Cs_Shortcode as Cs_Shortcode; … … 47 49 * Constant values created to prevent unnecessary re-creation of values used in expressions 48 50 */ 49 protected \IntlDateFormatter $shortDayFormat;50 protected \IntlDateFormatter $shortMonthFormat;51 protected \IntlDateFormatter $longMonthFormat;52 51 protected readonly \DateInterval $one_day; 53 52 protected readonly \DateInterval $one_week; … … 73 72 */ 74 73 public function __construct( $atts ) { 75 // Set the date formatters used to remove repeated instance creation 76 $this->set_date_formatters(); 77 74 78 75 // Set the date constants used to remove repeated instance creation 79 $this->page_url = get_permalink();80 76 $this->one_day = \DateInterval::createFromDateString( '1 day' ); 81 77 $this->one_week = \DateInterval::createFromDateString( '1 week' ); 82 78 $this->one_month = \DateInterval::createFromDateString( '1 month' ); 79 80 // Set the values always required by this shortcode 81 $this->page_url = get_permalink(); 83 82 $this->today = new \DateTime(); 84 83 $this->today->setTime( 0, 0 ); … … 86 85 // Set the requested base date. This either comes from the page query 87 86 // or, if there is an error with the date supplied by the page query or 88 // no page query date, we check for a date_start attribute. If the 89 // date_start attribute is not correctly formed, we 87 // no page query date, we check for a date_start attribute. 90 88 $query_value = get_query_var('cs-date'); 91 89 if ( ( $query_value !== '' ) && ( $date = \DateTime::createFromFormat( "Y-m-d", $query_value ) ) ) { … … 119 117 120 118 /* 121 * Set the 'constant' values used to remove repeated instance creation of the required date formatters.122 *123 * @since 1.0.2124 */125 private function set_date_formatters() {126 $this->shortDayFormat = datefmt_create(127 \Locale::getDefault(),128 \IntlDateFormatter::FULL,129 \IntlDateFormatter::NONE,130 null,131 \IntlDateFormatter::GREGORIAN,132 'EEE'133 );134 $this->shortMonthFormat = datefmt_create(135 \Locale::getDefault(),136 \IntlDateFormatter::FULL,137 \IntlDateFormatter::NONE,138 null,139 \IntlDateFormatter::GREGORIAN,140 'MMM'141 );142 $this->longMonthFormat = datefmt_create(143 \Locale::getDefault(),144 \IntlDateFormatter::FULL,145 \IntlDateFormatter::NONE,146 null,147 \IntlDateFormatter::GREGORIAN,148 'MMMM'149 );150 }151 152 /*153 119 * Returns the number of days in a given month and year, taking into account leap years. 154 120 * … … 262 228 . ' <div class="cs-calendar-month-header">' . "\n" 263 229 . ' <div class="cs-calendar-month-title">' . "\n" 264 . ' ' . datefmt_format($this->longMonthFormat, $date) . ' ' . $date->format( 'Y') . "\n"230 . ' ' . Cs_Date_Utilities::get_month_name_by_locale( $date ) . ' ' . Cs_Date_Utilities::get_year_by_locale( $date ) . "\n" 265 231 . ' </div>' . "\n" 266 232 . ' <div class="cs-calendar-month-nav">' . "\n" … … 287 253 $period = new \DatePeriod( $sunday_date, $this->one_day, $saturday_date ); 288 254 foreach ( $period as $day ) { 289 $output .= ' <div class="cs-calendar-day-name-cell">' . datefmt_format($this->shortDayFormat, $day) . '</div>' . "\n";255 $output .= ' <div class="cs-calendar-day-name-cell">' . Cs_Date_Utilities::get_short_day_name_by_locale( $day ) . '</div>' . "\n"; 290 256 } 291 257 … … 327 293 $day = (int) $date->format( 'j' ); 328 294 $output .= ' <div class="cs-date' . ( ( $day === 1 ) ? ' cs-first-day' : '' ) . '">' . "\n"; 329 $output .= ' <span class="cs-day">' . $date->format( 'D') . '</span>' . "\n";330 $output .= ' <span class="cs-date-number">' . $day. '</span>' . "\n";331 $output .= ' <span class="cs-month">' . datefmt_format($this->shortMonthFormat, $date) . '</span>' . "\n";332 $output .= ' <span class="cs-year">' . $date->format( 'Y') . '</span>' . "\n";295 $output .= ' <span class="cs-day">' . Cs_Date_Utilities::get_day_name_by_locale( $date ) . '</span>' . "\n"; 296 $output .= ' <span class="cs-date-number">' . Cs_Date_Utilities::get_day_number_by_locale( $date ) . '</span>' . "\n"; 297 $output .= ' <span class="cs-month">' . Cs_Date_Utilities::get_short_month_name_by_locale( $date ) . '</span>' . "\n"; 298 $output .= ' <span class="cs-year">' . Cs_Date_Utilities::get_year_by_locale( $date ) . '</span>' . "\n"; 333 299 $output .= ' </div>'; 334 300 // Output the start of the div containing the details of the events on this date -
cs-integration/trunk/public/shortcodes/class-cs-compact-event-view.php
r3468771 r3470542 4 4 5 5 6 require_once plugin_dir_path( __FILE__ ) . 'class-cs-date-utilities.php'; 6 7 require_once plugin_dir_path( __FILE__ ) . 'class-churchsuite.php'; 7 8 require_once plugin_dir_path( __FILE__ ) . 'class-cs-view.php'; 8 9 require_once plugin_dir_path( __FILE__ ) . 'class-cs-event.php'; 9 10 11 use amb_dev\CSI\Cs_Date_Utilities; 10 12 use amb_dev\CSI\ChurchSuite as ChurchSuite; 11 13 use amb_dev\CSI\Cs_View as Cs_View; … … 32 34 33 35 /* 34 * Constant values created to prevent unnecessary re-creation of values used in expressions35 * @since 1.0.036 */37 protected \IntlDateFormatter $timeFormat;38 39 /*40 36 * The event to be displayed, set via the constructor 41 37 * @since 1.0.0 … … 57 53 parent::__construct( $cs ); 58 54 $this->cs_event = $cs_event; 59 $this->set_date_formatters();60 }61 62 /*63 * Set the 'constant' values used to remove repeated instance creation of the required date formatters.64 */65 private function set_date_formatters() {66 // Set the date formatters used to remove repeated instance creation67 $this->timeFormat = datefmt_create(68 \Locale::getDefault(),69 \IntlDateFormatter::NONE,70 \IntlDateFormatter::SHORT,71 null,72 \IntlDateFormatter::GREGORIAN73 );74 55 } 75 56 … … 89 70 // Display the event time and the end time if provided 90 71 if ( $this->cs_event->is_start_date() ) { 91 $output .= ' <div class="cs-time"><span class="cs-start-time">' . datefmt_format( $this->timeFormat,$this->cs_event->get_start_date() ) . '</span>';92 $output .= ( $this->cs_event->is_end_date() ) ? '-' . '<span class="cs-end-time">' . datefmt_format( $this->timeFormat,$this->cs_event->get_end_date() ) . '</span>' : '';72 $output .= ' <div class="cs-time"><span class="cs-start-time">' . Cs_Date_Utilities::get_site_formatted_time( $this->cs_event->get_start_date() ) . '</span>'; 73 $output .= ( $this->cs_event->is_end_date() ) ? '-' . '<span class="cs-end-time">' . Cs_Date_Utilities::get_site_formatted_time( $this->cs_event->get_end_date() ) . '</span>' : ''; 93 74 $output .= '</div>' . "\n"; 94 75 } -
cs-integration/trunk/public/shortcodes/class-cs-event-card-view.php
r3468771 r3470542 4 4 5 5 6 require_once plugin_dir_path( __FILE__ ) . 'class-cs-date-utilities.php'; 6 7 require_once plugin_dir_path( __FILE__ ) . 'class-churchsuite.php'; 7 8 require_once plugin_dir_path( __FILE__ ) . 'class-cs-view.php'; 8 9 require_once plugin_dir_path( __FILE__ ) . 'class-cs-event.php'; 9 10 11 use amb_dev\CSI\Cs_Date_Utilities; 10 12 use amb_dev\CSI\ChurchSuite as ChurchSuite; 11 13 use amb_dev\CSI\Cs_View as Cs_View; … … 32 34 33 35 /* 34 * Constant values created to prevent unnecessary re-creation of values used in expressions35 * @since 1.0.236 * @access protected37 * @var \IntlDateFormatter $monthAndDateFormat - a date formatter for month name and date38 * @var \IntlDateFormatter $timeFormat - a date formatter for a hour:min time39 */40 protected \IntlDateFormatter $monthAndDateFormat;41 protected \IntlDateFormatter $timeFormat;42 43 /*44 36 * The event to be displayed, set via the constructor 45 37 * @since 1.0.0 … … 61 53 parent::__construct( $cs ); 62 54 $this->cs_event = $cs_event; 63 $this->set_date_formatters();64 }65 66 /*67 * Set the 'constant' values used to remove repeated instance creation of the required date formatters.68 *69 * @since 1.0.770 */71 private function set_date_formatters() {72 // Set the date formatters used to remove repeated instance creation73 $this->monthAndDateFormat = datefmt_create(74 \Locale::getDefault(),75 \IntlDateFormatter::MEDIUM,76 \IntlDateFormatter::NONE,77 null,78 \IntlDateFormatter::GREGORIAN79 );80 $this->timeFormat = datefmt_create(81 \Locale::getDefault(),82 \IntlDateFormatter::NONE,83 \IntlDateFormatter::SHORT,84 null,85 \IntlDateFormatter::GREGORIAN86 );87 55 } 88 56 … … 117 85 // Display the start and end times where they are provided 118 86 if ( $this->cs_event->is_start_date() ) { 119 $output .= ' <div class="cs-date"><span class="cs-date-gliph">' . datefmt_format( $this->monthAndDateFormat,$this->cs_event->get_start_date() ) . '</span></div>' . "\n";87 $output .= ' <div class="cs-date"><span class="cs-date-gliph">' . Cs_Date_Utilities::get_site_formatted_date( $this->cs_event->get_start_date() ) . '</span></div>' . "\n"; 120 88 $output .= ' <div class="cs-time">'; 121 $output .= ' <span class="cs-time-gliph cs-start-time">' . datefmt_format( $this->timeFormat,$this->cs_event->get_start_date() ) . '</span>';122 $output .= ( $this->cs_event->is_end_date() ) ? ' - <span class="cs-end-time">' . datefmt_format( $this->timeFormat,$this->cs_event->get_end_date() ) . '</span>' . "\n" : "\n";89 $output .= ' <span class="cs-time-gliph cs-start-time">' . Cs_Date_Utilities::get_site_formatted_time( $this->cs_event->get_start_date() ) . '</span>'; 90 $output .= ( $this->cs_event->is_end_date() ) ? ' - <span class="cs-end-time">' . Cs_Date_Utilities::get_site_formatted_time( $this->cs_event->get_end_date() ) . '</span>' . "\n" : "\n"; 123 91 $output .= ' </div>' . "\n"; 124 92 } -
cs-integration/trunk/public/shortcodes/class-cs-event-list-shortcode.php
r3468771 r3470542 4 4 5 5 6 require_once plugin_dir_path( __FILE__ ) . 'class-cs-date-utilities.php'; 6 7 require_once plugin_dir_path( __FILE__ ) . 'class-churchsuite.php'; 7 8 require_once plugin_dir_path( __FILE__ ) . 'class-cs-shortcode.php'; … … 9 10 require_once plugin_dir_path( __FILE__ ) . 'class-cs-compact-event-view.php'; 10 11 12 use amb_dev\CSI\Cs_Date_Utilities; 11 13 use amb_dev\CSI\ChurchSuite as ChurchSuite; 12 14 use amb_dev\CSI\Cs_Shortcode as Cs_Shortcode; … … 75 77 protected function display_event_date( \DateTime $event_date ) : string { 76 78 $result = '<div class="cs-date">'; 77 $result .= '<span class="cs-day">' . datefmt_format( datefmt_create( \Locale::getDefault(), \IntlDateFormatter::NONE, \IntlDateFormatter::NONE, null, \IntlDateFormatter::GREGORIAN, 'EE' ),$event_date ) . '</span>';78 $result .= '<span class="cs-date-number">' . datefmt_format( datefmt_create( \Locale::getDefault(), \IntlDateFormatter::NONE, \IntlDateFormatter::NONE, null, \IntlDateFormatter::GREGORIAN, 'dd' ),$event_date ) . '</span>';79 $result .= '<span class="cs-month">' . datefmt_format( datefmt_create( \Locale::getDefault(), \IntlDateFormatter::NONE, \IntlDateFormatter::NONE, null, \IntlDateFormatter::GREGORIAN, 'MMM' ),$event_date ) . '</span>';80 $result .= '<span class="cs-year">' . datefmt_format( datefmt_create( \Locale::getDefault(), \IntlDateFormatter::NONE, \IntlDateFormatter::NONE, null, \IntlDateFormatter::GREGORIAN, 'yyyy' ),$event_date ) . '</span>';79 $result .= '<span class="cs-day">' . Cs_Date_Utilities::get_day_name_by_locale( $event_date ) . '</span>'; 80 $result .= '<span class="cs-date-number">' . Cs_Date_Utilities::get_day_number_by_locale( $event_date ) . '</span>'; 81 $result .= '<span class="cs-month">' . Cs_Date_Utilities::get_short_month_name_by_locale( $event_date ) . '</span>'; 82 $result .= '<span class="cs-year">' . Cs_Date_Utilities::get_year_by_locale( $event_date ) . '</span>'; 81 83 $result .= '</div>'; 82 84 return $result; -
cs-integration/trunk/public/shortcodes/class-cs-group.php
r3468771 r3470542 3 3 namespace amb_dev\CSI; 4 4 5 6 require_once plugin_dir_path( __FILE__ ) . 'class-cs-date-utilities.php'; 5 7 require_once plugin_dir_path( __FILE__ ) . 'class-churchsuite.php'; 6 8 require_once plugin_dir_path( __FILE__ ) . 'class-cs-item.php'; 7 9 10 use amb_dev\CSI\Cs_Date_Utilities; 8 11 use amb_dev\CSI\ChurchSuite as ChurchSuite; 9 12 use amb_dev\CSI\Cs_Item as Cs_Item; … … 147 150 protected function fetch_time_of_meeting( \stdclass $group_obj ) : string { 148 151 return ( isset( $group_obj->time ) && ( $group_obj->time !== '' ) ) 149 ? datefmt_format( datefmt_create( \Locale::getDefault(), \IntlDateFormatter::NONE, \IntlDateFormatter::SHORT, null, \IntlDateFormatter::GREGORIAN ),date_create( $group_obj->time ) )152 ? Cs_Date_Utilities::get_site_formatted_time( date_create( $group_obj->time ) ) 150 153 : '' ; 151 154 }
Note: See TracChangeset
for help on using the changeset viewer.