function _pathauto_path_is_callback in Pathauto 6.2
Same name and namespace in other branches
- 5.2 pathauto.inc \_pathauto_path_is_callback()
- 5 pathauto.module \_pathauto_path_is_callback()
- 6 pathauto.inc \_pathauto_path_is_callback()
- 7 pathauto.inc \_pathauto_path_is_callback()
Verify if the given path is a valid menu callback.
Taken from menu_execute_active_handler().
Parameters
$path: A string containing a relative path.
Return value
TRUE if the path already exists.
1 call to _pathauto_path_is_callback()
- _pathauto_set_alias in ./
pathauto.inc - Private function for Pathauto to create an alias.
File
- ./
pathauto.inc, line 567 - Miscellaneous functions for Pathauto.
Code
function _pathauto_path_is_callback($path) {
$menu = menu_get_item($path);
if (isset($menu['path']) && $menu['path'] == $path) {
return TRUE;
}
elseif (is_file('./' . $path) || is_dir('./' . $path)) {
// Do not allow existing files or directories to get assigned an automatic
// alias. Note that we do not need to use is_link() to check for symbolic
// links since this returns TRUE for either is_file() or is_dir() already.
return TRUE;
}
return FALSE;
}