/packages/Output/Smarty/Plugins/modifier.rel.php

https://bitbucket.org/alexamiryan/stingle · PHP · 12 lines · 4 code · 1 blank · 7 comment · 0 complexity · eeae8e453db7b68b085bd1cf21e32575 MD5 · raw file

  1. <?php
  2. /**
  3. * Get relative file path from site absolute link
  4. * For example output from img modifier
  5. *
  6. * @param string $filePath
  7. * @return string
  8. */
  9. function smarty_modifier_rel($filePath){
  10. return preg_replace("/^\//", "", $filePath);
  11. }