You are here

function node_embed_preprocess_node in Node Embed 7

Implements template_preproccess_node().

File

./node_embed.module, line 294
This module defines an input filter for taking an embed code syntax ([[nid: ###]]) and removing the embed code and replacing with a rendered node view at that position in the text field.

Code

function node_embed_preprocess_node(&$variables) {
  if ($variables['view_mode'] == 'node_embed') {
    $node = $variables['node'];
    $variables['theme_hook_suggestions'][] = 'node__node_embed';
    $variables['theme_hook_suggestions'][] = 'node__' . $node->type . '__node_embed';
  }
}