Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Plugin API/Filter Reference/widget posts args

Use this example in your child themes functions file with any of the WP_Query parameters to modify the default output of the native Recent Posts Widget:

add_filter('widget_posts_args', 'filter_recent_posts_widget_parameters'); 
function filter_recent_posts_widget_parameters($params) {
   $params['orderby'] = 'date';
   return $params;