function _commerce_invoice_pdf_ensure_default_theme in Commerce Invoice 7.2
Switch to the default theme, in order to render the invoice properly if the admin theme was other than the default one.
4 calls to _commerce_invoice_pdf_ensure_default_theme()
- commerce_invoice_pdf_action_create in modules/
pdf/ commerce_invoice_pdf.rules.inc - Rules action: Create a PDF file for a given invoice entity.
- commerce_invoice_pdf_create_worker in modules/
pdf/ commerce_invoice_pdf.module - commerce_invoice_pdf_download_invoices in modules/
pdf/ commerce_invoice_pdf.module - Action callback to generate a PDF.
- commerce_invoice_pdf_recreate_pdfs in modules/
pdf/ commerce_invoice_pdf.module - Action callback to generate a PDF.
File
- modules/
pdf/ commerce_invoice_pdf.module, line 451 - The Commerce Invoice PDF module.
Code
function _commerce_invoice_pdf_ensure_default_theme() {
global $theme;
$theme = NULL;
$custom_theme =& drupal_static('menu_get_custom_theme');
$custom_theme = variable_get('theme_default', 'bartik');
drupal_theme_initialize();
}