themeplate/compatibility

Simple compatibility helper class

Installs: 7

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/themeplate/compatibility

v0.4.0 2025-03-29 15:24 UTC

This package is auto-updated.

Last update: 2025-09-30 11:17:18 UTC


README

Usage

use ThemePlate\Compatibility;

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

Custom messages

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' ) );