Skip to main content

mbr_logout_link

Usage

This shortcode returns a HTML link to log out the current user from WordPress and redirect that logged out user to a chosen page/post/URL.

Parameters

ParametersDescription
redirectSpecifies the URL the user will be redirected to after a logout.
Default: As defined in ActiveMember360, Settings, Memberships, Redirect on logout.
Required: no.
textSpecifies the text to use for the logout HTML link.
Default: Log out
Required: no.
cssSpecifies the CSS class use for the logout HTML link.
Default: mbr_logout_link
Required: no.

Validity

This shortcode is evaluated for any type of visitor.

Conditional Branching

This shortcode does NOT support conditional branching with [ELSE_logout_link].

Nesting

Shortcode nesting is NOT supported.

Examples

Will return the logout link that will redirect the logged out user to the page/post defined in ActiveMember360, Settings, Memberships, Redirect on logout and be displayed as Log out.

[mbr_logout_link]

API

For direct use in PHP code use this structure:

echo mbr_logout_link( array( 'redirect'=>'https://example.com', 'text'=>'Click here to logout' ) );