Version: 4
🔥 Gravity PDF v4 end of life was 2019-10-04 and this version is no longer supported. This legacy documentation is kept for reference only.
Gravity PDF API – get_plugin_settings()
Jump To Section
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
.