WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

User:DavePar/Plugin API/loginout

Description

Used to change the appearance of the login/logout link when wp_loginout() is referenced in a theme.

Prototype

 loginout_filter($content) 

Examples

Will boldface the "logout" link, but not the "login" link:

add_filter('loginout', array('foo_bar', 'loginout_filter'));

class foo_bar {
    function loginout_filter($content) {
        if (strpos($content, __('Logout')) !== false) {
            $content = "<strong>$content</strong>";
        }
        return $content;
    }
}

Parameters

content
The text of the login/logout link.

Related

See wp_loginout().