/
var
/
www
/
vhosts
/
ihelp.ro
/
ajutam.ro
/
wp-content
/
plugins
/
the-events-calendar
/
src
/
Tribe
/
/var/www/vhosts/ihelp.ro/ajutam.ro/wp-content/plugins/the-events-calendar/src/Tribe
mkdir
upload
Name
Size
Mode
Actions
Admin/
-
0755
rm
Aggregator/
-
0755
rm
Ajax/
-
0755
rm
Collections/
-
0755
rm
Customizer/
-
0755
rm
Dates/
-
0755
rm
Editor/
-
0755
rm
Event_Status/
-
0755
rm
Event_Tickets/
-
0755
rm
Featured_Events/
-
0755
rm
Google/
-
0755
rm
Importer/
-
0755
rm
Integrations/
-
0755
rm
JSON_LD/
-
0755
rm
Linked_Posts/
-
0755
rm
Meta/
-
0755
rm
Models/
-
0755
rm
Repositories/
-
0755
rm
REST/
-
0755
rm
Revisions/
-
0755
rm
Service_Providers/
-
0755
rm
Shortcode/
-
0755
rm
Template/
-
0755
rm
Utils/
-
0755
rm
Validator/
-
0755
rm
Views/
-
0755
rm
Adjacent_Events.php
9349
0644
edit
dl
rm
Admin_List.php
14941
0644
edit
dl
rm
Aggregator.php
17104
0644
edit
dl
rm
Amalgamator.php
9084
0644
edit
dl
rm
API.php
28503
0644
edit
dl
rm
Assets.php
20039
0644
edit
dl
rm
Backcompat.php
2856
0644
edit
dl
rm
Bar.php
3362
0644
edit
dl
rm
Capabilities.php
5690
0644
edit
dl
rm
Constants.php
1808
0644
edit
dl
rm
Cost_Utils.php
4924
0644
edit
dl
rm
Deactivation.php
1340
0644
edit
dl
rm
Default_Values.php
793
0644
edit
dl
rm
Editor.php
18815
0644
edit
dl
rm
Embedded_Maps.php
5495
0644
edit
dl
rm
Event_Cleaner.php
2653
0644
edit
dl
rm
Event_Cleaner_Scheduler.php
6094
0644
edit
dl
rm
Featured_Events.php
1797
0644
edit
dl
rm
Front_Page_View.php
10104
0644
edit
dl
rm
Gutenberg.php
3346
0644
edit
dl
rm
I18n.php
10753
0644
edit
dl
rm
iCal.php
27052
0644
edit
dl
rm
Ignored_Events.php
32233
0644
edit
dl
rm
Linked_Posts.php
44838
0644
edit
dl
rm
List_Widget.php
7823
0644
edit
dl
rm
Main.php
201687
0644
edit
dl
rm
Options_Exception.php
890
0644
edit
dl
rm
Organizer.php
23282
0644
edit
dl
rm
Plugin_Register.php
676
0644
edit
dl
rm
Post_Exception.php
859
0644
edit
dl
rm
Privacy.php
1341
0644
edit
dl
rm
Query.php
56057
0644
edit
dl
rm
Recurring_Event_Cleanup.php
2180
0644
edit
dl
rm
Rewrite.php
31038
0644
edit
dl
rm
Templates.php
24618
0644
edit
dl
rm
Template_Factory.php
18215
0644
edit
dl
rm
Timezones.php
6516
0644
edit
dl
rm
Updater.php
9696
0644
edit
dl
rm
Venue.php
24244
0644
edit
dl
rm
Edit:
/var/www/vhosts/ihelp.ro/ajutam.ro/wp-content/plugins/the-events-calendar/src/Tribe/Timezones.php
(6516B)
<?php /** * Helpers for handling timezone based event datetimes. * * In our timezone logic, the term "local" refers to the locality of an event * rather than the local WordPress timezone. */ class Tribe__Events__Timezones extends Tribe__Timezones { public static function init() { self::display_timezones(); parent::init(); } /** * Takes care of appending timezone information to the display of * event date/times. */ protected static function display_timezones() { if ( tribe_get_option( 'tribe_events_timezones_show_zone' ) ) { add_filter( 'tribe_events_event_schedule_details_inner', [ __CLASS__, 'append_timezone' ], 10, 2 ); add_filter( 'tribe_events_event_short_schedule_details_inner', [ __CLASS__, 'append_timezone' ], 10, 2 ); } } /** * Adds the timezone to the event schedule information. * * @param string $schedule_text * @param int|null $event_id * * @return string */ public static function append_timezone( $schedule_text, $event_id = null ) { static $hide_for_all_day; if ( ! isset( $hide_for_all_day ) ) { $hide_for_all_day = apply_filters( 'tribe_events_hide_timezone_for_all_day_events', true ); } if ( tribe_event_is_all_day( $event_id ) && $hide_for_all_day ) { return $schedule_text; } $timezone = self::is_mode( 'site' ) ? self::wp_timezone_abbr( tribe_get_start_date( $event_id, true, Tribe__Date_Utils::DBDATETIMEFORMAT ) ) : self::get_event_timezone_abbr( $event_id ); if ( ! empty( $timezone ) ) { $timezone_text = " <span class='timezone'> $timezone </span>"; $schedule_text = $schedule_text . $timezone_text; } return $schedule_text; } /** * Returns the timezone string for the specified event (if null it assumes the * current event where that can be determined). * * If no timezone has explicitly been set for the event, it returns the global * WordPress timezone string. * * @param int|null $event_id * * @return string */ public static function get_event_timezone_string( $event_id = null ) { $event_id = Tribe__Events__Main::postIdHelper( $event_id ); $tzstring = get_post_meta( $event_id, '_EventTimezone', true ); return $tzstring ? $tzstring : self::wp_timezone_string(); } /** * Returns the event's timezone abbreviation if it can be determined, or else * falls back on the full timezone string/offset text (again, if known - if it * is not it will assume the global WP timezone setting). * * @param int|null $event_id * * @return string */ public static function get_event_timezone_abbr( $event_id = null ) { $abbr = get_post_meta( $event_id, '_EventTimezoneAbbr', true ); if ( empty( $abbr ) ) { $timezone_string = self::get_event_timezone_string( $event_id ); $date = tribe_get_start_date( $event_id, true, Tribe__Date_Utils::DBDATETIMEFORMAT ); $abbr = self::abbr( $date, $timezone_string ); } return empty( $abbr ) ? $timezone_string : $abbr; } /** * Returns a timestamp for the event start date that can be passed to tribe_format_date() * in order to produce the time in the correct timezone. * * @param int $event_id * @param string $timezone * * @return int */ public static function event_start_timestamp( $event_id, $timezone = null ) { return self::get_event_timestamp( $event_id, 'Start', $timezone ); } /** * Returns a timestamp for the event end date that can be passed to tribe_format_date() * in order to produce the time in the correct timezone. * * @param int $event_id * @param string $timezone * * @return int */ public static function event_end_timestamp( $event_id, $timezone = null ) { return self::get_event_timestamp( $event_id, 'End', $timezone ); } /** * Returns a timestamp for the event date that can be passed to tribe_format_date() * in order to produce the time in the correct timezone. * * @param int $event_id * @param string $type (expected to be 'Start' or 'End') * @param string $timezone * * @return int */ protected static function get_event_timestamp( $event_id, $type = 'Start', $timezone = null ) { static $cache_var_name = __METHOD__; $timestamps = tribe_get_var( $cache_var_name, [] ); $cache_key = "{$event_id}:{$type}:{$timezone}"; if ( isset( $timestamps[ $cache_key ] ) ) { return $timestamps[ $cache_key ]; } $event = get_post( Tribe__Events__Main::postIdHelper( $event_id ) ); $event_tz = get_post_meta( $event->ID, '_EventTimezone', true ); $site_tz = self::wp_timezone_string(); if ( null === $timezone ) { $timezone = self::mode(); } // Should we use the event specific timezone or the site-wide timezone? $use_event_tz = self::EVENT_TIMEZONE === $timezone; $use_site_tz = self::SITE_TIMEZONE === $timezone; // Determine if the event timezone and site timezone the same *or* if the event does not have timezone // information (in which case, we'll assume the event time inherits the site timezone) $site_zone_is_event_zone = ( $event_tz === $site_tz || empty( $event_tz ) ); // If the event-specific timezone is suitable, we can obtain it without any conversion work if ( $use_event_tz || ( $use_site_tz && $site_zone_is_event_zone ) ) { $datetime = get_post_meta( $event->ID, "_Event{$type}Date", true ); return $timestamps[ $cache_key ] = strtotime( $datetime ); } // Otherwise lets load the event's UTC time and convert it $datetime = isset( $event->{"Event{$type}DateUTC"} ) ? $event->{"Event{$type}DateUTC"} : get_post_meta( $event->ID, "_Event{$type}DateUTC", true ); $tzstring = ( self::SITE_TIMEZONE === $timezone ) ? self::wp_timezone_string() : $timezone; $localized = self::to_tz( $datetime, $tzstring ); $timestamps[ $cache_key ] = strtotime( $localized ); tribe_set_var( $cache_var_name, $timestamps ); return $timestamps[ $cache_key ]; } /** * Returns a string representing the timezone/offset currently desired for * the display of dates and times. * * @return string */ public static function mode() { $mode = self::EVENT_TIMEZONE; if ( 'site' === tribe_get_option( 'tribe_events_timezone_mode' ) ) { $mode = self::SITE_TIMEZONE; } return apply_filters( 'tribe_events_current_display_timezone', $mode ); } /** * Confirms if the current timezone mode matches the $possible_mode. * * @param string $possible_mode * * @return bool */ public static function is_mode( $possible_mode ) { return $possible_mode === self::mode(); } }
Save
cmd:
run