AI GuardWall' ) ),
esc_html__( 'The free plugin is needed', 'ai-guardwall' ),
array( 'back_link' => true )
);
}
);
add_action(
'admin_notices',
function () {
if ( current_user_can( 'activate_plugins' ) ) {
echo '
' . wp_kses_post( sprintf( /* translators: %s: link to the free plugin. */ __( 'AI GuardWall Pro is paused: it works on top of the free %s plugin, which is not active. Activate the free plugin and Pro protects the site again with all your settings.', 'ai-guardwall' ), 'AI GuardWall' ) ) . '
';
}
}
);
unset( $softvolt_ai_bodyguard_edition, $softvolt_ai_bodyguard_other );
return;
}
/**
* Current plugin version.
* Start at version 1.0.0 and use SemVer - https://semver.org
*/
define( 'SOFTVOLT_AI_BODYGUARD_VERSION', '1.5.4' );
define( 'SOFTVOLT_AI_BODYGUARD_DB_VERSION', '1.1.0' );
define( 'SOFTVOLT_AI_BODYGUARD_EDITION', $softvolt_ai_bodyguard_edition );
define( 'SOFTVOLT_AI_BODYGUARD_FILE', __FILE__ );
define( 'SOFTVOLT_AI_BODYGUARD_PATH', plugin_dir_path( __FILE__ ) );
define( 'SOFTVOLT_AI_BODYGUARD_URL', plugin_dir_url( __FILE__ ) );
/**
* The core plugin class that is used to define admin-specific hooks,
* public-facing site hooks and the hooks both sides share.
*/
require SOFTVOLT_AI_BODYGUARD_PATH . 'includes/class-softvolt-ai-bodyguard.php';
/*
* Activation and deactivation (documented in includes/class-softvolt-ai-bodyguard-activator.php and
* -deactivator.php). Closures, not named functions: both copies' main files may be loaded together.
* Switching Pro off while the free plugin stays active keeps the scheduled jobs,
* because the free copy carries on with the same data.
*/
register_activation_hook(
__FILE__,
function () {
Softvolt_Ai_Bodyguard::require_all();
Softvolt_Ai_Bodyguard_Activator::activate();
}
);
register_deactivation_hook(
__FILE__,
function () use ( $softvolt_ai_bodyguard_other ) {
Softvolt_Ai_Bodyguard::require_all();
if ( ! $softvolt_ai_bodyguard_other ) {
Softvolt_Ai_Bodyguard_Deactivator::deactivate();
}
}
);
unset( $softvolt_ai_bodyguard_edition, $softvolt_ai_bodyguard_other );
/*
* Begins execution of the plugin. Everything is registered via hooks, so starting here does not
* affect the page life cycle.
*/
( new Softvolt_Ai_Bodyguard() )->run();