1 update.inc update_get_update_count()

Returns a count of all the pending site updates.

Return value

int: The number of updates pending (not yet run).

File

core/includes/update.inc, line 806
Backdrop site update API.

Code

function update_get_update_count() {
  $updates = update_get_update_list();
  $count = 0;
  foreach ($updates as $update) {
    if (isset($update['pending'])) {
      $count = $count + count($update['pending']);
    }
  }
  return $count;
}