PHP code example of thoughtful-web / activation-requirements-wp
1. Go to this page and download the library: Download thoughtful-web/activation-requirements-wp library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
thoughtful-web / activation-requirements-wp example snippets
new \ThoughtfulWeb\ActivationRequirementsWP\Plugin();
@param array $config The configuration parameters. Either a configuration file name, file path, or array of configuration options.
$config = array(
'plugins' => array(
'relation' => 'OR',
'advanced-custom-fields/acf.php',
'advanced-custom-fields-pro/acf.php',
),
)
new \ThoughtfulWeb\ActivationRequirementsWP\Plugin( $config );
// For security.
if ( ! defined( 'ABSPATH' ) ) {
http_response_code( 404 );
return array(
'plugins' => array(
'relation' => 'AND',
'advanced-custom-fields/acf.php',
'gravityforms/gravityforms.php',
'post-smtp/postman-smtp.php',
),
);
json
{
"plugins": {
"relation": "OR",
"0": "advanced-custom-fields\/acf.php",
"1": "advanced-custom-fields-pro\/acf.php"
}
}