Created
December 20, 2021 15:44
-
-
Save alordiel/2efd1f6a29a45063735bcf15a8317733 to your computer and use it in GitHub Desktop.
Hardcoded log out for appPresser
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function api_logout( $request ) { | |
do_action( 'appp_logout_header' ); | |
if( ! defined('DOING_AJAX') ) { | |
define('DOING_AJAX', true); | |
} | |
wp_logout(); | |
$response = array( | |
'message' => __('Logout success.', 'apppresser'), | |
'success' => true, | |
'logout_redirect' => [ | |
'url' => 'https://www.practiceportuguese.com/app/logged-out-welcome/', | |
'title' => 'Practice Portuguese', | |
], | |
); | |
return rest_ensure_response( $response ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment