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 – delete_plugin_option()
Jump To Section
Description
This method allows you to deleted a global Gravity PDF setting. This is permanent and cannot be undone.
Version
This method was introduced in Gravity PDF 4.0.
Parameters
$key | string : The global PDF setting ID.
Return
boolean : True on success, false if database failed to update .
Usage
The following snippet shows you how to remove a PDF global option and correctly handle any errors:
add_action( 'init', function() {
if ( class_exists( 'GPDFAPI' ) ) {
if( GPDFAPI::delete_plugin_option( 'prefix_option_name' ) ) {
// Option Deleted
} else {
// There was a problem removing the option from the database
}
}
} );
Source Code
This method is located in api.php
.