Project

General

Profile

« Previous | Next » 

Revision 6f5c7f2a

Added by Andreas Kohlbecker over 9 years ago

fixing #1933 (DescriptionElementBases do not show annotation footnotes in flora malesiana portal)

View differences:

7.x/modules/cdm_dataportal/cdm_dataportal.module
1015 1015
}
1016 1016

  
1017 1017
/**
1018
 * Wrapps the given $html string into a reder array suitable for drupal_render()
1018
 * Wraps the given $html string into a render array suitable for drupal_render()
1019 1019
 *
1020 1020
 * @param string $html
1021 1021
 *   the html string, see
......
1028 1028
 *   A render array
1029 1029
 *
1030 1030
 */
1031
function markup_to_render_array($html, $weight = 0) {
1032
  return array(
1033
          '#markup' => $html,
1034
          '#weight' => $weight,
1035
      );
1031
function markup_to_render_array($html, $weight = FALSE) {
1032
  $render_array = array(
1033
    '#markup' => $html
1034
  );
1035
  if (is_numeric($weight)) {
1036
    $render_array['#weight'] = $weight;
1037
  }
1038
  return $render_array;
1036 1039
}
1037 1040

  
1038 1041
/**

Also available in: Unified diff