class Loader implements Helper_Interface_Filters, Helper_Interface_Actions

Detects when the Toolkit header is included, bypasses the PDF sandbox and injects our Toolkit helper classes automatically.

Methods

void
init()

Initialise class

void
add_filters()

Add WordPress filters

void
add_actions()

Add WordPress actions

bool
maybeSkipPdfHtmlRender(bool $skip, array $args)

Determine if the current template has the "Toolkit" header and skip the standard Mpdf HTML sandbox

void
handleToolkitTemplate(array $args, Helper_PDF $pdfHelper)

Loads the current PDF template and injects our Toolkit helper classes

Details

at line 59
void init()

Initialise class

Return Value

void

at line 71
void add_filters()

Add WordPress filters

Return Value

void

at line 82
void add_actions()

Add WordPress actions

Return Value

void

at line 98
bool maybeSkipPdfHtmlRender(bool $skip, array $args)

Determine if the current template has the "Toolkit" header and skip the standard Mpdf HTML sandbox

Triggered via the gfpdf_skip_pdf_html_render filter.

Parameters

bool $skip Whether we should skip the HTML sandbox
array $args

Return Value

bool

at line 119
void handleToolkitTemplate(array $args, Helper_PDF $pdfHelper)

Loads the current PDF template and injects our Toolkit helper classes

Triggered via the gfpdf_skipped_html_render action.

Parameters

array $args The variables to inject into the PDF template
Helper_PDF $pdfHelper The PDF generation helper class

Return Value

void