Selaa lähdekoodia

Add tripal_version, returns version string

Ferrisx4 4 vuotta sitten
vanhempi
commit
6d68f06053
1 muutettua tiedostoa jossa 11 lisäystä ja 0 poistoa
  1. 11 0
      tripal/tripal.module

+ 11 - 0
tripal/tripal.module

@@ -1621,3 +1621,14 @@ function tripal_field_group_table_rows_alter(&$element, &$children) {
     }
   }
 }
+
+/**
+ * Returns the current version of Tripal, according to the tripal.info file
+ * 
+ * @return string
+ *   The version string of Tripal. Ex. 7.x-3.1
+ */
+function tripal_version() {
+  $version = system_get_info('module', 'tripal');
+  return $version['version'];
+}