You are here

function _pathauto_path_is_callback in Pathauto 5.2

Same name and namespace in other branches
  1. 5 pathauto.module \_pathauto_path_is_callback()
  2. 6.2 pathauto.inc \_pathauto_path_is_callback()
  3. 6 pathauto.inc \_pathauto_path_is_callback()
  4. 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 345
Miscellaneous functions for Pathauto.

Code

function _pathauto_path_is_callback($path) {
  static $menu = NULL;
  if (is_null($menu)) {
    $menu = menu_get_menu();
  }

  // Determine the menu item containing the callback.
  return isset($menu['callbacks'][$path]);
}