You are here

function _exclude_node_title_preprocess in Exclude Node Title 7

Remove the title from the variables array.

2 calls to _exclude_node_title_preprocess()
exclude_node_title_preprocess_node in ./exclude_node_title.module
Implements hook_preprocess_node().
exclude_node_title_preprocess_page in ./exclude_node_title.module
Implements hook_preprocess_page().

File

./exclude_node_title.module, line 108
Primarily Drupal hooks and global API functions to exclude node titles.

Code

function _exclude_node_title_preprocess(&$vars, $node, $view_mode) {
  if (_exclude_node_title($node, $view_mode)) {
    $hide_using_css = variable_get('exclude_node_title_hide_using_css', 0);
    if ($hide_using_css) {
      $vars['exclude_node_title_class'] = drupal_html_class('element-hidden');
    }
    else {
      $vars['title'] = '';
    }
    if ($view_mode == 'nodeform') {

      // Prevent access to the title field on nodeform view mode.
      $vars['page']['content']['system_main']['title']['#access'] = FALSE;
    }
  }
}