An open API service indexing awesome lists of open source software.

https://github.com/themeplate/compatibility


https://github.com/themeplate/compatibility

Last synced: 4 months ago
JSON representation

Awesome Lists containing this project

README

          

# ThemePlate Compatibility

## Usage

```php
use ThemePlate\Compatibility;

( new Compatibility( '6.0', '8.0' ) )->setup( 'My Project' );
```

### Custom messages

```php
use ThemePlate\Compatibility;

$compatibility = new Compatibility( '5.0', '5.6' );

/* translators: %s package name */
$compatibility->message_header( 'Sorry! %s is not compatible.' );
/* translators: 1. required version, 2. installed version */
$compatibility->message_wp( __( 'Requires WP %1$s or higher but currently running at %2$s', 'custom_domain' ) );
/* translators: 1. required version, 2. installed version */
$compatibility->message_php( __( 'Requires PHP %1$s or higher but currently running at %2$s', 'custom_domain' ) );
```