I already know how to custom the default Recent Activity widget displayed in Dashboard in order to show the last Custom Post Types published :
add_filter( 'dashboard_recent_posts_query_args', function(array $queryArgs) {
$postTypes = get_post_types([
'public' => true,
'capability_type' => 'post',
]);
if ( is_array( $postTypes ) ) {
$queryArgs['post_type'] = $postTypes;
}
return $queryArgs;
}, 15 );
So, now, the widget is displaying the last post and last custom post published. But what about the pages ?
How to add the pages to this widget ?