function feedback_mask_path in Feedback 7.2
Same name and namespace in other branches
- 5.2 feedback.module \feedback_mask_path()
- 6.2 feedback.module \feedback_mask_path()
'Mask' a path, i.e. replace all numeric arguments in a path with '%' placeholders.
Please note that only numeric arguments with a preceding slash will be replaced.
@todo Use the untranslated patch of menu_get_item() instead.
Parameters
$path: An internal Drupal path, f.e. 'user/123/edit'.
Return value
A 'masked' path, for above example 'user/%/edit'.
3 calls to feedback_mask_path()
- feedback_entry_form_submit in ./
feedback.admin.inc - Form submit callback for entry edit form.
- feedback_form in ./
feedback.module - Form constructor for the feedback form.
- feedback_save in ./
feedback.module - Saves changes to a feedback entry or adds a new feedback entry.
File
- ./
feedback.module, line 618 - Allows site visitors and users to report issues about this site.
Code
function feedback_mask_path($path) {
return preg_replace('@/\\d+@', '/%', $path);
}