1 views_ui.admin.inc views_ui_add_microweights(&$build)

Recursively adds microweights to a render array, similar to what form_builder() does for forms.

@todo Submit a core patch to fix backdrop_render() to do this, so that all render arrays automatically preserve array insertion order, as forms do.


core/modules/views_ui/views_ui.admin.inc, line 2386
Admin page callbacks for the Views UI module.


function views_ui_add_microweights(&$build) {
  $count = 0;
  foreach (element_children($build) as $key) {
    if (!isset($build[$key]['#weight'])) {
      $build[$key]['#weight'] = $count / 1000;