function _print_ui_page_match in Printer, email and PDF versions 7.2
Check if the provided page is enabled according to the visibility settings.
Parameters
int $visibility: Current visibility settings: 0 for show on every page except the listed pages 1 for show on only the listed pages.
string $path: Current path.
string $pages: List of pages.
Return value
bool TRUE if it is enabled, FALSE otherwise
1 call to _print_ui_page_match()
- print_ui_link_allowed in print_ui/
print_ui.module - Check if the link to the PF version is allowed depending on the settings.
File
- print_ui/
print_ui.module, line 756 - Printer-friendly pages User Interface module.
Code
function _print_ui_page_match($visibility, $path, $pages) {
if ($pages) {
if ($visibility == 2) {
if (module_exists('php')) {
return php_eval($pages);
}
else {
return FALSE;
}
}
$alias = drupal_get_path_alias($path);
$page_match = drupal_match_path($path, $pages);
if ($alias != $path) {
$page_match = $page_match || drupal_match_path($alias, $pages);
}
return !($visibility xor $page_match);
}
else {
return !$visibility;
}
}