Version: 5
CAUTION
️Version 5 of Gravity PDF does not have full support for Gravity Forms 2.5 and you should consider upgrading to version 6. If you cannot, version 5 will still function but have a degraded admin experience. Support and bug/security fixes will be provided until 27 April 2023.Gravity PDF API – get_plugin_settings()
Description
When called this method returns the existing global PDF plugins settings.
Version
This method was introduced in Gravity PDF 4.0.
Return
array
- Returns an array of the global PDF plugin settings
Usage
This following snippet retrieves the global PDF settings and read the default_pdf_size
option:
add_action( 'init', function() {
if ( class_exists( 'GPDFAPI' ) ) {
$settings = GPDFAPI::get_plugin_settings();
$default_pdf_size = ( isset( $settings['default_pdf_size'] ) ) ? $settings['default_pdf_size'] : '';
}
} );
Source Code
This method is located in api.php
.