Index: /trunk/src/wp-admin/includes/class-wp-media-list-table.php =================================================================== --- /trunk/src/wp-admin/includes/class-wp-media-list-table.php (revision 32753) +++ /trunk/src/wp-admin/includes/class-wp-media-list-table.php (revision 32754) @@ -312,4 +312,222 @@ /** + * @since 4.3.0 + * + * @param WP_Post $post + */ + public function column_cb( $post ) { + if ( current_user_can( 'edit_post', $post->ID ) ) { ?> + + + post_mime_type ); + + $user_can_edit = current_user_can( 'edit_post', $post->ID ); + $att_title = _draft_or_post_title(); + ?> +
+ + %s', + esc_url( add_query_arg( array( 'author' => get_the_author_meta('ID') ), 'upload.php' ) ), + get_the_author() + ); + } + + /** + * @since 4.3.0 + * + * @param WP_Post $post + */ + public function column_desc( $post ) { + echo has_excerpt() ? $post->post_excerpt : ''; + } + + /** + * @since 4.3.0 + * + * @param WP_Post $post + */ + public function column_date( $post ) { + if ( '0000-00-00 00:00:00' == $post->post_date ) { + $h_time = __( 'Unpublished' ); + } else { + $m_time = $post->post_date; + $time = get_post_time( 'G', true, $post, false ); + if ( ( abs( $t_diff = time() - $time ) ) < DAY_IN_SECONDS ) { + if ( $t_diff < 0 ) { + $h_time = sprintf( __( '%s from now' ), human_time_diff( $time ) ); + } else { + $h_time = sprintf( __( '%s ago' ), human_time_diff( $time ) ); + } + } else { + $h_time = mysql2date( __( 'Y/m/d' ), $m_time ); + } + } + + echo $h_time; + } + + /** + * @since 4.3.0 + * + * @param WP_Post $post + */ + public function column_parent( $post ) { + $user_can_edit = current_user_can( 'edit_post', $post->ID ); + + if ( $post->post_parent > 0 ) { + $parent = get_post( $post->post_parent ); + } else { + $parent = false; + } + + if ( $parent ) { + $title = _draft_or_post_title( $post->post_parent ); + $parent_type = get_post_type_object( $parent->post_type ); +?> + + show_ui && current_user_can( 'edit_post', $post->post_parent ) ) { ?> + + , +