You are here

function commerce_invoice_receipt_css_path in Commerce Invoice Receipt 7

2 calls to commerce_invoice_receipt_css_path()
commerce_invoice_receipt_mail in ./commerce_invoice_receipt.module
Implements hook_mail().
commerce_invoice_receipt_view_print in ./commerce_invoice_receipt.module

File

./commerce_invoice_receipt.module, line 114
Provides a printable invoice receipt along with HTML mailing rules.

Code

function commerce_invoice_receipt_css_path() {

  // Get current default theme
  $default_theme_path = drupal_get_path('theme', variable_get('theme_default', NULL));
  $default_template_css = drupal_get_path('module', 'commerce_invoice_receipt') . '/theme/commerce_invoice_receipt.css';

  // Check if the default theme wants to override the invoice stylesheet.
  $files = file_scan_directory($default_theme_path, '/commerce_invoice_receipt.css$/');
  if (count($files)) {
    $default_template_css = key($files);
  }
  return $default_template_css;
}