Tribe__Events__Aggregator__Settings::maybe_clear_meetup_credentials( WP_Screen $screen )
Hooked to current_screen, this method identifies whether or not eb credentials should be cleared
Contents
Parameters
- $screen
-
(WP_Screen) (Required) The current screen instance.
Source
File: src/Tribe/Aggregator/Settings.php
public function maybe_clear_meetup_credentials( $screen ) {
if ( 'tribe_events_page_tribe-common' !== $screen->base ) {
return;
}
if ( tribe_get_request_var( 'tab', false ) !== 'addons' ) {
return;
}
$action = tribe_get_request_var( 'action' ) === 'disconnect-meetup';
$nonce = tribe_get_request_var( '_wpnonce' );
if ( ! ( $action && $nonce && wp_verify_nonce( $nonce, 'disconnect-meetup' ) ) ) {
return;
}
$this->clear_meetup_credentials();
wp_redirect(
Tribe__Settings::instance()->get_url( [ 'tab' => 'addons' ] )
);
die;
}
Changelog
| Version | Description |
|---|---|
| 4.9.6 | Introduced. |