web/app/plugins/sitepress-multilingual-cms/inc/translation-management/translation-management.class.php
// hide_empty - if current user doesn't have access to the link don't show at all
if current user doesn't have access to the link don't show at all
if current user doesn ' t have access to the link don ' t show at all
public static function tm_post_link($post_id, $anchor = false, $hide_empty = false){
        global $current_user;
        get_currentuserinfo();
        $parts = explode('_', $post_id);
        if ($parts[0] == 'external') {
            $link = '';
            return apply_filters('WPML_get_link', $link, $post_id, $anchor, $hide_empty);
        }
        if(false === $anchor){
            $anchor = get_the_title($post_id);    
        }
        $opost = get_post($post_id);
        if(($opost->post_status == 'draft' || $opost->post_status == 'private') && $opost->post_author != $current_user->data->ID){
            if($hide_empty){
                $elink = '';                
            }else{
                $elink = sprintf('<i>%s</i>', $anchor);
            }
        }else{
            $elink = sprintf('<a href="%s">%s</a>', get_permalink($post_id), $anchor);    
        }
        return $elink;
    }
public static function tm_post_link ( $ post_id , $ anchor = false , $ hide_empty = false ) { global $ current_user ; get_currentuserinfo ( ) ; $ parts = explode ( '_' , $ post_id ) ; if ( $ parts [ 0 ] == 'external' ) { $ link = '' ; return apply_filters ( 'WPML_get_link' , $ link , $ post_id , $ anchor , $ hide_empty ) ; } if ( false === $ anchor ) { $ anchor = get_the_title ( $ post_id ) ; } $ opost = get_post ( $ post_id ) ; if ( ( $ opost -> post_status == 'draft' || $ opost -> post_status == 'private' ) && $ opost -> post_author != $ current_user -> data -> ID ) { if ( $ hide_empty ) { $ elink = '' ; } else { $ elink = sprintf ( '<i>%s</i>' , $ anchor ) ; } } else { $ elink = sprintf ( '<a href="%s">%s</a>' , get_permalink ( $ post_id ) , $ anchor ) ; } return $ elink ; }
hide_empty - if current user doesn't have access to the link don't show at all
hide_empty - if current user doesn ' t have access to the link don ' t show at all