diff --git a/src/wp-admin/css/wp-admin.css b/src/wp-admin/css/wp-admin.css index 917516c452..8eeb7ab33b 100644 --- a/src/wp-admin/css/wp-admin.css +++ b/src/wp-admin/css/wp-admin.css @@ -3093,27 +3093,27 @@ form.initial-form.quickpress-open input#title { font-weight: normal; } -#draft-list { +#dashboard_quick_press .drafts ul { margin: 0; } -#draft-list li { +#dashboard_quick_press .drafts li { margin-bottom: 1em; } -#draft-list li time { +#dashboard_quick_press .drafts li time { color: #bbb; } -#draft-list p { +#dashboard_quick_press .drafts p { margin: 0; } -#draft-list .draft-title { +#dashboard_quick_press .draft-title { overflow: hidden; } -#draft-list .draft-title a, -#draft-list .draft-title time { +#dashboard_quick_press .draft-title a, +#dashboard_quick_press .draft-title time { float: left; margin: 0 5px 0 0; } diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php index 90fe304112..1c38c82621 100644 --- a/src/wp-admin/includes/dashboard.php +++ b/src/wp-admin/includes/dashboard.php @@ -337,63 +337,39 @@ function wp_dashboard_quick_press( $error_msg=false ) {

- - 'post', 'post_status' => 'draft', - 'author' => $GLOBALS['current_user']->ID, + 'author' => get_current_user_id(), 'posts_per_page' => 4, 'orderby' => 'modified', 'order' => 'DESC' ); - $query_args = apply_filters( 'dash_recent_quickdrafts_query_args', $query_args ); - $drafts_query = new WP_Query( $query_args ); - $drafts =& $drafts_query->posts; - - - if ( $drafts && is_array( $drafts ) ) { - $list = array(); - $draft_count = 0; - foreach ( $drafts as $draft ) { - if ( 3 == $draft_count ) - break; - - $draft_count++; - - $url = get_edit_post_link( $draft->ID ); - $title = _draft_or_post_title( $draft->ID ); - $item = '
' . esc_html( $title ) . '
'; - if ( $the_content = wp_trim_words( $draft->post_content, 10 ) ) - $item .= '

' . $the_content . '

'; - $list[] = $item; - } - - do_action( 'dashboard_quickdraft_drafts_list', $drafts ); -?> -
- -

- -

- -
-'; + if ( count( $drafts ) > 3 ) { + echo '

' . _x( 'View all', 'drafts' ) . "

\n"; + } + echo '

' . __( 'Drafts' ) . "

\n\n"; } function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {