Created
February 12, 2015 15:45
-
-
Save mrded/5f62cb52e60f1173cdb5 to your computer and use it in GitHub Desktop.
Drupal: Get wildcard (node/%node/edit) of the path (node/5/edit).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Get menu wildcard from path. | |
* | |
* @param $path | |
* The path, for example node/5/edit. | |
* | |
* @return | |
* Returns wildcard node/%node/edit. | |
*/ | |
function _get_menu_wildcard($path) { | |
$item = menu_get_item($path); | |
return $item['path']; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment