0815

Du musst dich anmelden um Beiträge und Themen zu erstellen. Einloggen · Registrieren

A Better Way for Users to Logout

The old way of displaying a “Logout” link for your users looks like this:

<a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout">Logout</a>

Now, since WordPress 2.7, we can simplify this hodgepodge with a sleeker, cleaner, built-in template tag:

<a href="<?php echo wp_logout_url(); ?>">Logout</a>

Sweetness.




0