Skip to content

Instantly share code, notes, and snippets.

@batandwa
Last active January 3, 2016 14:09
Show Gist options
  • Select an option

  • Save batandwa/8473941 to your computer and use it in GitHub Desktop.

Select an option

Save batandwa/8473941 to your computer and use it in GitHub Desktop.
Drupal - Prints the details of paths that starts with the specified search string.
<?php
function HOOK_menu_alter(&$items) {
$search = 'node/';
foreach ($items as $path => $options) {
if(strpos($path, $search) === 0) {
drupal_set_message('<strong>' . $path . '</strong><pre>'.var_export($options, TRUE).'</pre>', 'status', FALSE);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment