<?php

/**
 * Implements hook_preprocess_page().
 */
function fernweh_preprocess_page(&$variables) {
  // You can use preprocess hooks to modify the variables before they are passed
  // to the theme function or template file.
  $hideTitleArray = array(
    'leads', 'accounts', 'cards', 'vendors', 'sources', 'lead-status', 'users'
  );
  if (in_array(arg(0), $hideTitleArray) && arg(1) == null) {
    $variables['title'] = '';
  }
  else if (arg(0) == "order" && is_numeric(arg(1)) && arg(2) == "details") {
    $variables['title'] = '';
  }
  else if (arg(0) == "lead" && is_numeric(arg(1)) && arg(2) == "details") {
    $variables['title'] = '';
  }
  else if (arg(0) == "lead" && is_numeric(arg(1)) && arg(2) == "details") {
    $variables['title'] = '';
  }
  else if (arg(0) == "node" && is_numeric(arg(1))) {
    $variables['title'] = '';
  }///account/%/paymentlist
  else if (arg(0) == "account" && is_numeric(arg(1)) && arg(2) == "paymentlist") {
    $variables['title'] = '';
  }
  else if (arg(0) == "orders") {
    $variables['title'] = '';
  }
  else if (arg(0) == "user" && is_numeric(arg(1)) && arg(2) == null) {
    $variables['title'] = '';
  }
}
