function _custom_breadcrumbs_match_path in Custom Breadcrumbs 7.2
Same name and namespace in other branches
- 6.2 custom_breadcrumbs_common.inc \_custom_breadcrumbs_match_path()
Determines if two paths match, allowing for wildcards and aliases.
Parameters
string $curpath: The current Drupal path.
string $breadcrumb_path: The path that the breadcrumb applies to.
Return value
bool TRUE (1) if the paths match, FALSE (0) otherwise.
6 calls to _custom_breadcrumbs_match_path()
- custom_breadcrumbs_exclude_path in ./
custom_breadcrumbs.module - Determines if the current path is in the excluded list.
- custom_breadcrumbs_paths_cb_node_form_table in custom_breadcrumbs_paths/
custom_breadcrumbs_paths.module - Implements hook_cb_node_form_table().
- custom_breadcrumbs_paths_views_pre_render in custom_breadcrumbs_paths/
custom_breadcrumbs_paths.module - Implements hook_views_pre_render().
- custom_breadcrumbs_taxonomy_views_pre_render in custom_breadcrumbs_taxonomy/
custom_breadcrumbs_taxonomy.module - Implements hook_views_pre_render().
- custom_breadcrumbs_views_views_post_render in custom_breadcrumbs_views/
custom_breadcrumbs_views.module - Implements hook_views_post_render().
File
- ./
custom_breadcrumbs_common.inc, line 19 - Common helper functions used by custom breadcrumbs submodules.
Code
function _custom_breadcrumbs_match_path($curpath, $breadcrumb_path) {
$path = drupal_get_path_alias($curpath);
// Compare with the internal and path alias (if any).
$page_match = drupal_match_path(drupal_strtolower($path), drupal_strtolower($breadcrumb_path));
if ($path != $curpath) {
$page_match = $page_match || drupal_match_path(drupal_strtolower($curpath), drupal_strtolower($breadcrumb_path));
}
return $page_match;
}