Change record status: 
Project: 
Introduced in branch: 
8.x
Introduced in version: 
8.x
Description: 

theme('item_list') (or the theme_item_list() function, as it is currently implemented) has a new feature: You can pass in variable 'empty' with a string or render array value, and if there are no list items, this value will be output. This is similar to the 'empty' variable in theme('table').

Example of using this from a render array:

$build['foo'] = array(
  '#theme' => 'item_list',
  // This is the list of items to output.
  '#items' => $results,
  // This can be a string or a render array.
  '#empty' => array(
      '#markup' => t('There were no results. Try a less restrictive filter'),
  ),
  '#title' => t('Search Results'),
  '#list_type' => 'ol',
);
Impacts: 
Module developers
Themers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done