01/25/2017 at 10:40 am
#408310
Keymaster
@ Scott
Yes, this is possible. Install the Code Snippets plugin. Add a new snippet with the following code:
add_filter( 'cn_list_action_options', 'cn_list_action_logout_register' );
function cn_list_action_logout_register( $items ) {
$items['logout'] = 'Show the "Log out" link if the user is logged in.';
return $items;
}
add_action( 'cn_list_action-logout', 'cn_list_action_logout_render' );
function cn_list_action_logout_render( $atts ) {
if ( is_user_logged_in() ) {
wp_loginout( $_SERVER['REQUEST_URI'] );
}
}
Save and Activate the snippet.
Navigate to the Connections : Settings admin page and click the Display tab.
Scroll to the List actions sections, enable the log out link option, drag and drop is the list items in the desired order.
Save the changes.
You should now see the “Log out” link.
Hope that helps!
