2017 © Pedro Peláez
 

library check-wp-requirements

A class to allow WordPress plugins to check certain runtime requirements before activation.

image

mundschenk-at/check-wp-requirements

A class to allow WordPress plugins to check certain runtime requirements before activation.

  • Sunday, April 22, 2018
  • by Der Mundschenk & Compagnie
  • Repository
  • 1 Watchers
  • 0 Stars
  • 762 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 12 % Grown

The README.md

check-wp-requirements

Build Status Latest Stable Version Scrutinizer Code Quality Code Coverage License, (*1)

A helper class for WordPress plugins to check PHP version and other requirements., (*2)

Requirements

  • PHP 5.6.0 or above
  • WordPress 5.2 or higher.

Installation

The best way to use this package is through Composer:, (*3)

$ 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.
// 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'       => '5.6.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 file for details., (*4)

The Versions

22/04 2018

dev-master

9999999-dev

A class to allow WordPress plugins to check certain runtime requirements before activation.

  Sources   Download

GPL 2.0+ GPL-2.0-or-later

The Requires

  • php >=5.2.0

 

The Development Requires

22/04 2018

v1.0.0

1.0.0.0

A class to allow WordPress plugins to check certain runtime requirements before activation.

  Sources   Download

GPL-2.0-or-later

The Requires

  • php >=5.2.0

 

The Development Requires

17/03 2018

v0.4.0

0.4.0.0

A class to allow WordPress plugins to check certain runtime requirements before activation.

  Sources   Download

GPL-2.0-or-later

The Requires

  • php >=5.2.0

 

The Development Requires

26/02 2018

v0.3.1

0.3.1.0

A class to allow WordPress plugins to check certain runtime requirements before activation.

  Sources   Download

GPL-2.0-or-later

The Requires

  • php >=5.2.0

 

The Development Requires

20/02 2018

v0.3.0

0.3.0.0

A class to allow WordPress plugins to check certain runtime requirements before activation.

  Sources   Download

GPL-2.0-or-later

The Requires

  • php >=5.2.0

 

The Development Requires

04/02 2018

v0.2.0

0.2.0.0

A class to allow WordPress plugins to check certain runtime requirements before activation.

  Sources   Download

GPL-2.0-or-later

The Requires

  • php >=5.2.0

 

The Development Requires

04/02 2018

v0.1.0

0.1.0.0

A class to allow WordPress plugins to check certain runtime requirements before activation.

  Sources   Download

GPL-2.0-or-later

The Requires

  • php >=5.2.0

 

The Development Requires