Logout of WordPress without confirmation
When you go to logout of WordPress admin or front end (eg a customer/user), you are prompted to confirm to logout.

However, sometimes this isn’t desirable. To get around this, you need to add the following code to the functions.php file of your WordPress site.
Note: you need to change https://yourdomain.com to the URL of the page in your website that you want the person redirected to eg My Account, or the home page of the site.
