//========== //NO LOGOUT CONFIRMATION /* add_action('check_admin_referer', 'logout_without_confirm', 10, 2); function logout_without_confirm($action, $result) { if ($action…
Logged In Logged out shortcodes
//logged in shortcode
function check_user ($params, $content = null){
//check tha the user is logged in
if ( is_user_logged_in() ){
//user is logged in so show the content
return do_shortcode($content);
}
else{
//user is not logged in so hide the content
return;
}
}
add_shortcode('loggedin', 'check_user' );
//logged in shortcode
function check_user_out ($params, $content = null){
//check tha the user is logged in
if ( !is_user_logged_in() ){
//user is logged in so show the content
return do_shortcode($content);
}
else{
//user is not logged in so hide the content
return;
}
}
add_shortcode('loggedout', 'check_user_out' );
