芝麻web文件管理V1.00
编辑当前文件:/home/ezdajrnh/www/wp-content/plugins/google-site-kit/includes/Core/Util/Uninstallation.php
context = $context; $this->options = $options ?: new Options( $this->context ); } /** * Registers functionality through WordPress hooks. * * @since 1.20.0 */ public function register() { add_action( 'googlesitekit_uninstallation', function () { $this->uninstall(); $this->clear_scheduled_events(); } ); add_action( 'googlesitekit_deactivation', function () { $this->clear_scheduled_events(); } ); add_action( 'googlesitekit_reset', function () { $this->clear_scheduled_events(); } ); } /** * Runs necessary logic for uninstallation of the plugin. * * If connected to the proxy, it will issue a request to unregister the site. * * @since 1.20.0 */ private function uninstall() { $credentials = new Credentials( new Encrypted_Options( $this->options ) ); if ( $credentials->has() && $credentials->using_proxy() ) { $google_proxy = new Google_Proxy( $this->context ); $google_proxy->unregister_site( $credentials ); } } /** * Clears all scheduled events. * * @since 1.136.0 */ private function clear_scheduled_events() { foreach ( self::SCHEDULED_EVENTS as $event ) { // Only clear scheduled events that are set, important in E2E // testing. if ( (bool) wp_next_scheduled( $event ) ) { wp_unschedule_hook( $event ); } } } }