Gotowebinar_Helpers::disconnect()
Disconnect the current connect by removing the options saved in wp_options.
Return Return
(void)
Source Source
File: src/integrations/gotowebinar/helpers/gotowebinar-helpers.php
public function disconnect() { // Check nonce. if ( false === wp_verify_nonce( automator_filter_input( 'nonce' ), 'gtw-disconnect-nonce' ) ) { return; } // Admin only action. if ( ! current_user_can( 'manage_options' ) ) { return; } $configs = array( 'options' => array( '_uncannyowl_gtw_settings', '_uncannyowl_gtw_settings_expired', 'uap_automator_gtw_api_consumer_key', 'uap_automator_gtw_api_consumer_secret', ), 'transients' => array( '_uncannyowl_gtw_settings', ), ); // Delete the options. foreach ( $configs['options'] as $option_key ) { delete_option( $option_key ); } // Delete the transients. foreach ( $configs['transients'] as $transient_key ) { delete_transient( $transient_key ); } wp_safe_redirect( automator_get_premium_integrations_settings_url( 'go-to-webinar' ) . '&connection=disconnected' ); die; }
Expand full source code Collapse full source code View on Github