gfpdf_legacy_templates

If class still empty it's either a legacy template or doesn't have a config.

Description

apply_filters( 'gfpdf_legacy_templates', (unknown) $default_template, (string) $default_template_two_rows, (string) $default_template_no_style, (unknown) $var ); 

Check for legacy templates which support certain fields

Parameters (4)

0. $default_template (unknown) => [ 'default-template'
The default template.
1. $default_template_two_rows (string) => 'default-template-two-rows'
The default template two rows.
2. $default_template_no_style (string) => 'default-template-no-style'
The default template no style.
3. $var (unknown) => ]
The var.

Usage

To run the hook, copy the example below.
  1. $default_template = apply_filters( 'gfpdf_legacy_templates', $default_template, $default_template_two_rows, $default_template_no_style, $var ); 
  2.  
  3. if ( !empty( $default_template ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the gfpdf_legacy_templates callback 
  2. function filter_gfpdf_legacy_templates( $default_template, $default_template_two_rows, $default_template_no_style, $var ) { 
  3. // make filter magic happen here... 
  4. return $default_template
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'gfpdf_legacy_templates', 'filter_gfpdf_legacy_templates', 10, 4 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'gfpdf_legacy_templates', 'filter_gfpdf_legacy_templates', 10, 4 ); 

Defined (1)

The filter is defined in the following location(s).

/src/helper/Helper_Templates.php  
  1. $legacy_templates = apply_filters( 'gfpdf_legacy_templates', [