kmix39 / wp-active-check
A library for WordPress that check if the themes or plugins is active.
Installs: 51
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/kmix39/wp-active-check
Requires
- php: >=7.0
This package is auto-updated.
Last update: 2025-10-20 02:59:46 UTC
README
About
A library for WordPress that check if the theme or plugin is active.
Install
$ composer require kmix39/wp-active-check
How to use
Themes check
True if any of the themes to check is active.
<?php
$active_check = new Kmix39\WP_Active_Check\Bootstrap();
$result = $active_check->is_theme_active( [
'twentynineteen' => [ '1.4', '>=' ],
'twentyseventeen' => [ '2.2', '>=' ],
'twentysixteen' => [ '2.0', '>=' ],
] );
Plugin check
True if any of the plugins to check is active.
<?php
$active_check = new Kmix39\WP_Active_Check\Bootstrap();
$result = $active_check->is_plugin_active( [
'hello-dolly/hello.php' => [ '1.7.2', '>=' ],
] );
Plugins check
True if all the plugins to check are active.
<?php
$active_check = new Kmix39\WP_Active_Check\Bootstrap();
$result = $active_check->is_plugins_active( [
'hello-dolly/hello.php' => [ '1.7.2', '>=' ],
] );