golden hour
/var/www/html/wp-content/plugins/the-events-calendar/src/Tribe
⬆️ Go Up
Upload
File/Folder
Size
Actions
API.php
27.83 KB
Del
OK
Adjacent_Events.php
9.13 KB
Del
OK
Admin
-
Del
OK
Admin_List.php
14.59 KB
Del
OK
Aggregator
-
Del
OK
Aggregator.php
16.7 KB
Del
OK
Ajax
-
Del
OK
Amalgamator.php
8.86 KB
Del
OK
Assets.php
19.96 KB
Del
OK
Backcompat.php
2.79 KB
Del
OK
Bar.php
3.28 KB
Del
OK
Capabilities.php
5.56 KB
Del
OK
Collections
-
Del
OK
Constants.php
1.64 KB
Del
OK
Cost_Utils.php
4.81 KB
Del
OK
Customizer
-
Del
OK
Dates
-
Del
OK
Deactivation.php
1.31 KB
Del
OK
Default_Values.php
793 B
Del
OK
Editor
-
Del
OK
Editor.php
16.92 KB
Del
OK
Embedded_Maps.php
5.37 KB
Del
OK
Event_Cleaner.php
2.59 KB
Del
OK
Event_Cleaner_Scheduler.php
5.95 KB
Del
OK
Event_Tickets
-
Del
OK
Featured_Events
-
Del
OK
Featured_Events.php
1.75 KB
Del
OK
Front_Page_View.php
9.87 KB
Del
OK
Google
-
Del
OK
Gutenberg.php
2.71 KB
Del
OK
I18n.php
10.51 KB
Del
OK
Ignored_Events.php
31.25 KB
Del
OK
Importer
-
Del
OK
Integrations
-
Del
OK
JSON_LD
-
Del
OK
Linked_Posts
-
Del
OK
Linked_Posts.php
43.79 KB
Del
OK
List_Widget.php
7.64 KB
Del
OK
Main.php
195.46 KB
Del
OK
Meta
-
Del
OK
Models
-
Del
OK
Options_Exception.php
890 B
Del
OK
Organizer.php
22.22 KB
Del
OK
Plugin_Register.php
675 B
Del
OK
Post_Exception.php
859 B
Del
OK
Privacy.php
1.31 KB
Del
OK
Query.php
54.4 KB
Del
OK
REST
-
Del
OK
Recurring_Event_Cleanup.php
2.13 KB
Del
OK
Repositories
-
Del
OK
Revisions
-
Del
OK
Rewrite.php
30.31 KB
Del
OK
Service_Providers
-
Del
OK
Shortcode
-
Del
OK
Template
-
Del
OK
Template_Factory.php
17.79 KB
Del
OK
Templates.php
24.04 KB
Del
OK
Timezones.php
6.37 KB
Del
OK
Updater.php
8.13 KB
Del
OK
Utils
-
Del
OK
Validator
-
Del
OK
Venue.php
22.95 KB
Del
OK
Views
-
Del
OK
iCal.php
26.37 KB
Del
OK
Edit: Event_Cleaner.php
<?php /** * Class Event_Cleaner * * @since 4.6.13 */ class Tribe__Events__Event_Cleaner { /** * @var $scheduler */ private $scheduler; /** * The option name to move old events to trash. * * @var $key_trash_events * * @since 4.6.13 */ public $key_trash_events = 'trash-past-events'; /** * The option name to permanently delete old events. * * @var $key_delete_events * * @since 4.6.13 */ public $key_delete_events = 'delete-past-events'; public function __construct( Tribe__Events__Event_Cleaner_Scheduler $scheduler = null ) { $this->scheduler = $scheduler ? $scheduler : new Tribe__Events__Event_Cleaner_Scheduler(); } /** * Receives the existing value and the new value (modified by user) for the $key_trash_events option, * compares them and runs the scheduler if the conditions are satisfied. * * @param array<string,mixed>|null $old_value The old value of the `tribe_events_calendar_options` option. * @param array<string,mixed>|null $new_value The old value of the `tribe_events_calendar_options` option. * * @since 4.6.13 * @since 5.3.0 Loosen the type-checking to avoid errors during option updates. */ public function move_old_events_to_trash( $old_value = [], $new_value = [] ) { $old_value = (array) $old_value; $new_value = (array) $new_value; $old_value = empty( $old_value[ $this->key_trash_events ] ) ? null : $old_value[ $this->key_trash_events ]; $new_value = empty( $new_value[ $this->key_trash_events ] ) ? null : $new_value[ $this->key_trash_events ]; if ( $new_value == $old_value ) { return; } if ( null === $new_value ) { $this->scheduler->trash_clear_scheduled_task(); return; } $this->scheduler->set_trash_new_date( $new_value ); $this->scheduler->move_old_events_to_trash(); } /** * Receives the existing value and the new value (modified by user) for the $key_delete_events option, * compares them and runs the scheduler if the conditions are satisfied. * * @param array $old_value * @param array $new_value * * @since 4.6.13 */ public function permanently_delete_old_events( array $old_value, array $new_value ) { $old_value = empty( $old_value[ $this->key_delete_events ] ) ? null : $old_value[ $this->key_delete_events ]; $new_value = empty( $new_value[ $this->key_delete_events ] ) ? null : $new_value[ $this->key_delete_events ]; if ( $new_value == $old_value ) { return; } if ( null === $new_value ) { $this->scheduler->delete_clear_scheduled_task(); return; } $this->scheduler->set_delete_new_date( $new_value ); $this->scheduler->permanently_delete_old_events(); } }
Save