File Editor
Directories:
.. (Back)
Admin
Aggregator
Ajax
Collections
Customizer
Dates
Editor
Event_Status
Event_Tickets
Featured_Events
Google
Importer
Integrations
JSON_LD
Linked_Posts
Meta
Models
REST
Repositories
Revisions
Service_Providers
Shortcode
Taxonomy
Template
Utils
Validator
Views
Files:
API.php
Adjacent_Events.php
Admin_List.php
Aggregator.php
Amalgamator.php
Assets.php
Capabilities.php
Constants.php
Cost_Utils.php
Deactivation.php
Default_Values.php
Editor.php
Embedded_Maps.php
Event_Cleaner.php
Event_Cleaner_Scheduler.php
Featured_Events.php
Front_Page_View.php
Gutenberg.php
I18n.php
Ignored_Events.php
Linked_Posts.php
Main.php
Options_Exception.php
Organizer.php
Plugin_Register.php
Post_Exception.php
Privacy.php
Query.php
Rewrite.php
Template_Factory.php
Templates.php
Timezones.php
Updater.php
Venue.php
iCal.php
Create New File
Create
Edit File: Deactivation.php
<?php class Tribe__Events__Deactivation extends Tribe__Abstract_Deactivation { /** * Set a flag to indicate that the plugin has been deactivated * and needs to be reinitialized if it is reactivated */ private function set_flags() { // Ensure the class is loaded before using it, we're in shutdown context and common autoloader might be unset. require_once __DIR__ . '/Updater.php'; $updater = new Tribe__Events__Updater( Tribe__Main::VERSION ); // Reset uses cached values, which means the sub-sites will be overwritten by the main site cache. if ( $this->network && ! is_main_site() ) { return; } $updater->reset(); } /** * Remove event-related capabilities */ private function clear_capabilities() { // Ensure the class is loaded before using it, we're in shutdown context and common autoloader might be unset. require_once __DIR__ . '/Capabilities.php'; $capabilities = new Tribe__Events__Capabilities(); $capabilities->remove_all_caps(); } /** * The deactivation routine for a single blog */ protected function blog_deactivate() { $this->set_flags(); $this->clear_capabilities(); $this->flush_rewrite_rules(); /** * Fires an action during the-events-calendar deactivation */ do_action( 'tribe_events_blog_deactivate' ); } /** * An abridged version that is less DB intensive. * * @see wp_is_large_network() and the 'wp_is_large_network' filter */ protected function short_blog_deactivate() { $this->set_flags(); } }
Save Changes
Rename File
Rename