wpbp / requirements
处理 WordPress 插件最低系统要求的库
1.0.0
2016-07-01 23:28 UTC
This package is auto-updated.
Last update: 2024-09-20 03:13:06 UTC
README
一个小型库,可以轻松处理 WordPress 插件中最低系统要求的检测。
特性
- 检测与您的插件不兼容的 PHP 版本。
- 检测与您的插件不兼容的 WordPress 版本。
- 检测 WordPress 插件。
- 检测 PHP 扩展的缺失。
- 在不激活您的插件的情况下向用户显示错误。
入门
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, 版权所有 © 2014 Darshan Sawardekar