'. __('You have activated Age Gate: User Registration but Age Gate is not installed', 'age-gate-user-registration') .'
';
}
function age_gate_user_registration_unmet_dependency() {
echo ''. sprintf(__('Age Gate: User Registration requires Age Gate %s or higher', 'age-gate-user-registration'), AGE_GATE_USER_REGISTRATION_PEER) .'
';
}
/**
* Begins execution of the plugin.
*
* Since everything within the plugin is registered via hooks,
* then kicking off the plugin from this point in the file does
* not affect the page life cycle.
*
* @since 1.0.0
*/
function run_age_gate_user_registration() {
if(!function_exists('is_plugin_active')){
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
}
if(!is_plugin_active('age-gate/age-gate.php')){
add_action( 'admin_notices', 'age_gate_user_registration_missing_parent' );
} elseif(version_compare(get_option('wp_age_gate_version', false), AGE_GATE_USER_REGISTRATION_PEER, '<')) {
add_action( 'admin_notices', 'age_gate_user_registration_unmet_dependency' );
} else {
$plugin = new Age_Gate_User_Registration();
$plugin->run();
}
}
run_age_gate_user_registration();