You are here

function _pathfilter_replace_internal in Path Filter 7

Same name and namespace in other branches
  1. 5.2 pathfilter.module \_pathfilter_replace_internal()
  2. 6.2 pathfilter.module \_pathfilter_replace_internal()

Replaces the internal: and files: in elements with the url for it

File

./pathfilter.module, line 181
This filter takes internal Drupal paths in double quotes, written as e.g. "internal:node/99", and replaces them with the appropriate absolute http URL using Drupal's url() function [1]. E.g. for a site located at http://example.com/mysite

Code

function _pathfilter_replace_internal($settings, &$text) {
  global $_pathfilter_replacement_patterns;

  // use the 'currying' technique to allow us to pass the format into
  // the callback function.
  $callback = _pathfilter_curry(_pathfilter_process, 3);
  $text = preg_replace_callback($_pathfilter_replacement_patterns, $callback($settings, FALSE), $text);

  //Converts to non-aliased form.
}