Created
September 13, 2013 10:01
-
-
Save vladdancer/6548754 to your computer and use it in GitHub Desktop.
Wildcard Example
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 | |
/** | |
* Wildcard loader for '%master_class' | |
* Add additional check after node_load() func. | |
* @param $nid | |
* @return bool|mixed | |
*/ | |
function master_class_load($nid) { | |
$node = node_load($nid); | |
$condition = $node->type == 'master_class' && $node->status == 1; | |
return $condition ? $node : FALSE; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment