Code to Display ‘Last Modified’ Date in WordPress Admin All Posts List

By default WordPress shows only the Published Date of all Posts and Pages in the list. It sometimes becomes necessary to know the last modified date of some posts. So, add the below code to your theme functions in order to add a new ‘Last Modified’ column in All Posts List. This code also makes the column sortable making our job easy.

/* Add Last Modified Date in WordPress Admin All Posts List */
function wpflt_register_last_modified_column( $columns ) {
    $columns['modified_list'] = __( 'Last Modified', 'wpfilters' );
    return $columns;
}
function wpflt_show_last_modified_column( $column_name, $post_id ) {
    if ( 'modified_list' != $column_name )
        return;
    echo the_modified_date();
}
function wpflt_sortable_last_modified_column( $columns ) {
    $columns['modified_list'] = 'modified_list'; 
    return $columns;
}
add_filter( 'manage_edit-post_sortable_columns', 'wpflt_sortable_last_modified_column' );
add_action( 'manage_posts_custom_column', 'wpflt_show_last_modified_column', 10, 2 );
add_filter( 'manage_edit-post_columns', 'wpflt_register_last_modified_column' );