Skip to content

Instantly share code, notes, and snippets.

@JeffMatson
Last active December 20, 2020 21:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JeffMatson/a8d23e16e333e5116060906c6f091aa7 to your computer and use it in GitHub Desktop.
Save JeffMatson/a8d23e16e333e5116060906c6f091aa7 to your computer and use it in GitHub Desktop.
Gravity Forms GFAddOn->minimum_requirements() usage.
array(
// Require WordPress version 4.6.2 or higher.
'wordpress' => array(
'version' => '4.6.2'
),
// Require PHP version 5.3 or higher.
'php' => array(
'version' => '5.3',
// Require specific PHP extensions.
'extensions' => array(
// Require cURL version 1.0 or higher.
'curl' => array(
'version' => '1.0'
),
// Require any version of mbstring.
'mbstring',
),
// Require specific functions to be available.
'functions' => array(
'openssl_random_pseudo_bytes',
'mcrypt_create_iv'
),
),
// Require other add-ons to be present.
'add-ons' => array(
// Require any version of the Mailchimp add-on.
'gravityformsmailchimp',
// Require the Stripe add-on and ensure the name matches.
'gravityformsstripe' => array(
'name' => 'Gravity Forms Stripe Add-On'
),
// Require the PayPal add-on version 5.0 or higher.
'gravityformspaypal' => array(
'version' => '5.0'
),
),
// Required plugins.
'plugins' => array(
// Require the REST API.
'rest-api/plugin.php',
// Require Jetpack and ensure the name matches.
'jetpack/jetpack.php' => 'Jetpack by WordPress.com',
),
// Any additional custom requirements.
array( $this, 'custom_requirement' ),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment