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
Parameters | Description |
---|---|
redirect | Specifies the URL the user will be redirected to after a logout. Default: As defined in ActiveMember360, Settings, Memberships, Redirect on logout. Required: no. |
text | Specifies the text to use for the logout HTML link. Default: Log out Required: no. |
css | Specifies 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
- Example 1
- Example 2
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]
Will return the logout link that will redirect the logged out user to https://yoursite.com: and be displayed as Sign Off.
[mbr_logout_link redirect='https://yoursite.com' text='Sign Off']
API
For direct use in PHP code use this structure:
echo mbr_logout_link( array( 'redirect'=>'https://example.com', 'text'=>'Click here to logout' ) );