function ckeditor_link_path_strip_language

cis7 ckeditor_link.module ckeditor_link_path_strip_language($path, &$langcode)
cle7 ckeditor_link.module ckeditor_link_path_strip_language($path, &$langcode)
elmsmedia7 ckeditor_link.module ckeditor_link_path_strip_language($path, &$langcode)
icor7 ckeditor_link.module ckeditor_link_path_strip_language($path, &$langcode)
meedjum_blog7 ckeditor_link.module ckeditor_link_path_strip_language($path, &$langcode)
mooc7 ckeditor_link.module ckeditor_link_path_strip_language($path, &$langcode)
2 calls to ckeditor_link_path_strip_language()
ckeditor_link_revert in sites/all/modules/ulmus/ckeditor_link/ckeditor_link.module
_ckeditor_link_filter_process in sites/all/modules/ulmus/ckeditor_link/ckeditor_link.module

File

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

Code

function ckeditor_link_path_strip_language($path, &$langcode) {
  $languages = ckeditor_link_get_languages();
  if ($languages) {
    $args = explode('/', $path);
    $prefix = array_shift($args);
    foreach ($languages as $language) {
      if (!empty($language->prefix) && ($language->prefix == $prefix)) {
        $langcode = $language->language;
        $path = implode('/', $args);
        break;
      }
    }
  }

  return $path;
}