wpbp / requirements
Library for handling minimum system requirements in WordPress Plugins
1.0.0
2016-07-01 23:28 UTC
This package is auto-updated.
Last update: 2025-01-20 03:54:04 UTC
README
A small library to easily handle detection of minimum system requirements in WordPress plugins.
Features
- 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.
Getting Started
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' ) ) ) ) );
License
Fork of Mte90, Copyright © 2014 Darshan Sawardekar