10,
'post_type' => array ( 'post', 'page' ),
'orderby' => 'modified')
);
/**
* @todo Icons for post formats
* @todo Add option to configure how many posts should be shown
* @todo Add option to show only posts or pages
*/
if ( $posts ) {
$date_format = get_option( 'date_format' );
echo '
';
foreach ( $posts as $post ) {
printf( __( '- %3$s %4$s', 'admin-dashboard-last-edits' ), esc_html( get_edit_post_link( $post->ID ) ), esc_html( get_permalink( $post->ID ) ), esc_html( $post->post_title ), esc_html( get_post_modified_time( $date_format, false, $post->ID, true )) );
}
echo '
';
}
else {
printf( __( 'No edits found. Write a new post.', 'admin-dashboard-last-edits' ), esc_url( admin_url( 'post-new.php' ) ) );
}
}
?>