diff --git wp-admin/includes/dashboard.php wp-admin/includes/dashboard.php
index aced544..175f34a 100644
|
|
function wp_dashboard_recent_drafts( $drafts = false ) { |
429 | 429 | function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) { |
430 | 430 | $GLOBALS['comment'] =& $comment; |
431 | 431 | |
432 | | $comment_post_url = get_edit_post_link( $comment->comment_post_ID ); |
433 | 432 | $comment_post_title = strip_tags(get_the_title( $comment->comment_post_ID )); |
434 | | $comment_post_link = "<a href='$comment_post_url'>$comment_post_title</a>"; |
| 433 | |
| 434 | if ( current_user_can( 'edit_post', $comment->comment_post_ID ) ) { |
| 435 | $comment_post_url = get_edit_post_link( $comment->comment_post_ID ); |
| 436 | $comment_post_link = "<a href='$comment_post_url'>$comment_post_title</a>"; |
| 437 | } else { |
| 438 | $comment_post_link = "$comment_post_title"; |
| 439 | } |
| 440 | |
435 | 441 | $comment_link = '<a class="comment-link" href="' . esc_url(get_comment_link()) . '">#</a>'; |
436 | 442 | |
437 | 443 | $actions_string = ''; |
… |
… |
function wp_dashboard_site_activity() { |
576 | 582 | * @return bool False if no posts were found. True otherwise. |
577 | 583 | */ |
578 | 584 | function wp_dashboard_recent_posts( $args ) { |
| 585 | |
579 | 586 | $query_args = array( |
580 | 587 | 'post_type' => 'post', |
581 | 588 | 'post_status' => $args['status'], |
… |
… |
function wp_dashboard_recent_posts( $args ) { |
583 | 590 | 'order' => $args['order'], |
584 | 591 | 'posts_per_page' => intval( $args['max'] ), |
585 | 592 | 'no_found_rows' => true, |
586 | | 'cache_results' => false |
| 593 | 'cache_results' => false, |
| 594 | 'perm' => ( $args['status'] === 'future' ) ? 'editable' : 'readable' |
587 | 595 | ); |
| 596 | |
588 | 597 | $posts = new WP_Query( $query_args ); |
589 | 598 | |
590 | 599 | if ( $posts->have_posts() ) { |
… |
… |
function wp_dashboard_recent_posts( $args ) { |
616 | 625 | $relative = date_i18n( __( 'M jS' ), $time ); |
617 | 626 | } |
618 | 627 | |
619 | | $text = sprintf( |
| 628 | if ( current_user_can( 'edit_post', get_the_id() ) ) { |
| 629 | /* translators: 1: relative date, 2: time, 4: post title */ |
| 630 | $format = __( '<span>%1$s, %2$s</span> <a href="%3$s">%4$s</a>' ); |
| 631 | } else { |
620 | 632 | /* translators: 1: relative date, 2: time, 4: post title */ |
621 | | __( '<span>%1$s, %2$s</span> <a href="%3$s">%4$s</a>' ), |
| 633 | $format = __( '<span>%1$s, %2$s</span> %4$s' ); |
| 634 | } |
| 635 | |
| 636 | $text = sprintf( |
| 637 | $format, |
622 | 638 | $relative, |
623 | 639 | get_the_time(), |
624 | 640 | get_edit_post_link(), |