function get_term_id_suffixes

4.x misc.inc get_term_id_suffixes()
5.x misc.inc get_term_id_suffixes()

This looks at the global termIDStructure setting and returns back an array of only term suffixes (like 40, 60, mm, etc).

File

includes/misc.inc, line 1506
This file contains misc functions for FlightPath

Code

function get_term_id_suffixes() {

  $rtn = array();

  $temp = $GLOBALS ["fp_system_settings"]["term_id_structure"];
  $structures = explode("\n", $temp);

  foreach ($structures as $structure) {
    $tokens = explode(",", $structure);
    $term_def = trim($tokens [0]);

    // Get rid of the replacement pattern.
    // Looks like:  [Y4]40.  We want the 40.
    // Simply explode on "]"
    $temp = explode("]", $term_def);
    $rtn [] = trim($temp [1]);

  }

  return $rtn;

}