WP Logout link

I have been playing with WordPress recently, and of course faced some challenges.
One of them is having a simple link to logout WordPress, just like login
for login, you can easily link to…
/wp-login.php
For register, you do
/wp-login.php?action=register
But that is not as simple if you want to logout, you need to pass another argument (called _wpnonce) which looks like a session ID that is changed every login.
That makes it almost impossible to allow logging out using a simple link, unless you install some plugins.
So after some playing, I was actually able to do that by adding new php file.
I called wp-logout.php and placed it in my website root.
This way, I can call it anywhere I want to logout the current user
Either download attached or use code below

Resource1: https://wpbeaches.com/create-loginlogout-link-wordpress/
Resource2: http://wpgpl.com/wordpress-tricks/how-to-add-a-loginlogout-link-to-your-navigation-menu/

CodeFunctionName What is this?

Public

Tested

Original Work

Access is limited.

Login here using your Linkedin account. to see or download code.

No registration, not another password to remember, login using your Linkedin account and have access to all public codes in Mydevlib.com

Linkedin Login

Views 3,959

Downloads 1,432

CodeID
DB ID