function ckeditor_link_ckeditor_link_taxonomy_url

cis7 ckeditor_link.taxonomy.inc ckeditor_link_ckeditor_link_taxonomy_url($path, $langcode)
cle7 ckeditor_link.taxonomy.inc ckeditor_link_ckeditor_link_taxonomy_url($path, $langcode)
elmsmedia7 ckeditor_link.taxonomy.inc ckeditor_link_ckeditor_link_taxonomy_url($path, $langcode)
icor7 ckeditor_link.taxonomy.inc ckeditor_link_ckeditor_link_taxonomy_url($path, $langcode)
meedjum_blog7 ckeditor_link.taxonomy.inc ckeditor_link_ckeditor_link_taxonomy_url($path, $langcode)
mooc7 ckeditor_link.taxonomy.inc ckeditor_link_ckeditor_link_taxonomy_url($path, $langcode)

Implementation of hook_ckeditor_link_TYPE_url().

File

sites/all/modules/ulmus/ckeditor_link/includes/ckeditor_link.taxonomy.inc, line 56
Written by Henri MEDOT <henri.medot[AT]absyx[DOT]fr> http://www.absyx.fr

Code

function ckeditor_link_ckeditor_link_taxonomy_url($path, $langcode) {
  if (!preg_match('`^taxonomy/term/(\d+)$`', $path, $matches)) {
    return;
  }

  $tid = $matches[1];

  $languages = ckeditor_link_get_languages();
  if ($languages) {
    $term = taxonomy_term_load($tid);
    if ($term && ($language = @$term->language) && ($language != LANGUAGE_NONE) && isset($languages[$language])) {
      $langcode = $language;
    }
  }

  return ckeditor_link_url("taxonomy/term/$tid", $langcode);
}