function _pathfilter_replace_internal in Path Filter 5.2
Same name and namespace in other branches
- 6.2 pathfilter.module \_pathfilter_replace_internal()
- 7 pathfilter.module \_pathfilter_replace_internal()
Replaces the internal: and files: in elements with the url for it
1 string reference to '_pathfilter_replace_internal'
- pathfilter_nodeapi in ./
pathfilter.module - Modifies submitted node body values. Replaces base_path() in images, hrefs, etc with 'internal:' on save. When editing a node, the body's 'internal:' strings are replaced with 'base_path()'.
File
- ./
pathfilter.module, line 245 - 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($format, &$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($format, FALSE), $text);
//Converts to non-aliased form.
}