Skip to content

Commit

Permalink
include wp compat 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidsector9 committed Oct 25, 2023
1 parent 668f17e commit 1a19ad4
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 33 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"platform-check": false
},
"require": {
"10up/wp-compat-validation-tool": "dev-develop",
"10up/wp-compat-validation-tool": "dev-trunk",
"mlocati/ip-lib": "dev-master",
"php": ">=7.4"
},
Expand Down
45 changes: 22 additions & 23 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 17 additions & 9 deletions restricted_site_access.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,26 @@
*/

// Try and include our autoloader.
if ( ! is_readable( __DIR__ . '/10up-lib/wp-compat-validation-tool/src/Validator.php' ) ) {
return;
}

require_once '10up-lib/wp-compat-validation-tool/src/Validator.php';

$compat_checker = new \RSA_Validator\Validator();
$compat_checker
->set_plugin_name( 'Restricted Site Access' )
->set_php_min_required_version( '7.4' );

if ( ! $compat_checker->is_plugin_compatible() ) {
return;
}

if ( is_readable( __DIR__ . '/vendor/autoload.php' ) ) {
require_once __DIR__ . '/vendor/autoload.php';
}

$compat_checker = new \RSA_Validator\Validator();
$compat_checker
->set_plugin_name( 'Restricted Site Access' )
->set_php_min_required_version( '7.4' );

if ( ! $compat_checker->is_plugin_compatible() ) {
return;
}
} elseif ( ! class_exists( 'IPLib\\Factory' ) ) {
if ( ! class_exists( 'IPLib\\Factory' ) ) {
add_action(
'admin_notices',
function() {
Expand Down

0 comments on commit 1a19ad4

Please sign in to comment.