A small library to easily handle detection of minimum system requirements in WordPress plugins.
- Detects PHP versions incompatible with your Plugin.
- Detects WordPress versions incompatible with your Plugin.
- Detects WordPress plugins.
- Detects absence of PHP extensions.
- Displays errors to users without activating your Plugin.
new Plugin_Requirements( self::$plugin_name, self::$plugin_slug, array(
'PHP' => new PHP_Requirement( '5.9.0' ),
'WP' => new WordPress_Requirement( '3.9.0' ),
'Extension' => new PHP_Extension_Requirement( array('mysql', 'mysqli', 'session', 'pcre','json', 'gd', 'mbstring', 'zlib' ),
'Plugin' => new Plugin_Requirement( array(
array( 'Plugin not installed', 'slug/slug.php' ) ,
array( 'Plugin not installed 2', 'slug/slug2.php' )
) )
) );
Fork of Mte90, Copyright © 2014 Darshan Sawardekar