Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * In wizard content type we have ability for inherit content from parent node.
- * If added parent node this function return it, otherwise this function return regular node.
- *
- * @param object $node
- * @return object
- */
- function gm_wizard_content_resolver($node) {
- if ($node->type === 'wizard' && !empty($node->field_parent_content)) {
- $node_wrapper = entity_metadata_wrapper('node', $node);
- $node = $node_wrapper->field_parent_content->value();
- }
- return $node;
- }
Add Comment
Please, Sign In to add comment