| 718 | | if ( current_user_can( 'edit_post', get_the_ID() ) ) { |
| 719 | | /* translators: 1: relative date, 2: time, 3: post edit link, 4: post title */ |
| 720 | | $format = __( '<span>%1$s, %2$s</span> <a href="%3$s">%4$s</a>' ); |
| 721 | | printf( "<li>$format</li>", $relative, get_the_time(), get_edit_post_link(), _draft_or_post_title() ); |
| 722 | | } else { |
| 723 | | /* translators: 1: relative date, 2: time, 3: post title */ |
| 724 | | $format = __( '<span>%1$s, %2$s</span> %3$s' ); |
| 725 | | printf( "<li>$format</li>", $relative, get_the_time(), _draft_or_post_title() ); |
| 726 | | } |
| | 718 | // Use the post edit link for those who can edit, the permalink otherwise. |
| | 719 | $recent_post_link = current_user_can( 'edit_post', get_the_ID() ) ? get_edit_post_link() : get_permalink(); |
| | 720 | |
| | 721 | $format = _x( '<span>%1$s, %2$s</span> <a href="%3$s">%4$s</a>', '1: relative date, 2: time, 3: post edit link or permalink, 4: post title' ); |
| | 722 | printf( "<li>$format</li>", $relative, get_the_time(), $recent_post_link, _draft_or_post_title() ); |