post('content/clear', wp_json_encode([ 'auth_token' => ATBS_Handlers::atbs_get_guest_user_identity(), ])); } /** * Plugin deactivation hook. * Removes the options for the plugin. */ public function atbs_deactivation_hook() { //clear the demo data ATBS_Handlers::atbs_api()->post('content/clear', wp_json_encode([ 'auth_token' => ATBS_Handlers::atbs_get_guest_user_identity(), ])); // Remove the options for the plugin delete_option('atbs_is_logged_in'); delete_option('atbs_is_guest_logged_in'); delete_option('atbs_user_identity'); delete_option('atbs_user_email'); delete_option('atbs_guest_identity'); if (($post_id = get_option('atbs_post_id', null)) && ($post = get_post($post_id))) { wp_delete_post($post_id); } delete_option('atbs_post_id'); delete_option('atbs_oauth_token'); } }