GFPDF_Core

Add backwards compatibility support for our main core class.

Defined (1)

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

/src/deprecated.php  
  1. class GFPDF_Core extends GFPDF_Deprecated_Abstract { 
  2.  
  3. /** 
  4. * Setup our v3 template location constants 
  5. * @since 4.0 
  6. */ 
  7. public function setup_constants() { 
  8.  
  9. $data = GPDFAPI::get_data_class(); 
  10. $templates = GPDFAPI::get_templates_class(); 
  11.  
  12. if ( ! defined( 'PDF_SAVE_LOCATION' ) ) { 
  13. define( 'PDF_SAVE_LOCATION', $data->template_tmp_location ); 
  14.  
  15. if ( ! defined( 'PDF_FONT_LOCATION' ) ) { 
  16. define( 'PDF_FONT_LOCATION', $data->template_font_location ); 
  17.  
  18. if ( ! defined( 'PDF_TEMPLATE_LOCATION' ) ) { 
  19. define( 'PDF_TEMPLATE_LOCATION', $templates->get_template_path() ); 
  20.  
  21. if ( ! defined( 'PDF_TEMPLATE_URL_LOCATION' ) ) { 
  22. define( 'PDF_TEMPLATE_URL_LOCATION', $templates->get_template_url() ); 
  23.  
  24. /** 
  25. * Create aliases of our template path and URLs to match v3 
  26. * @since 4.0 
  27. */ 
  28. public function setup_deprecated_paths() { 
  29. global $gfpdfe_data; 
  30.  
  31. $templates = GPDFAPI::get_templates_class(); 
  32.  
  33. $gfpdfe_data = GPDFAPI::get_data_class(); 
  34. $gfpdfe_data->template_site_location = $templates->get_template_url(); 
  35. $gfpdfe_data->template_save_location = $gfpdfe_data->template_tmp_location;