Phase 2 Plan 1 execution summary: - Created Formidable registration form with 5 German-labeled fields - Implemented auto-login and ddhh_provider role assignment - Email uniqueness and password validation enforced - Organization name stored as user meta - All tasks completed successfully with 2 commits Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
43 lines
961 B
PHP
43 lines
961 B
PHP
<?php
|
|
/**
|
|
* Plugin activation handler
|
|
*
|
|
* @package DDHH_Job_Manager
|
|
*/
|
|
|
|
// Exit if accessed directly.
|
|
defined( 'ABSPATH' ) || exit;
|
|
|
|
/**
|
|
* Handles plugin activation
|
|
*/
|
|
class DDHH_JM_Activator {
|
|
|
|
/**
|
|
* Activation logic
|
|
*/
|
|
public static function activate() {
|
|
// Check WordPress version
|
|
if ( version_compare( get_bloginfo( 'version' ), '6.0', '<' ) ) {
|
|
wp_die( esc_html__( 'This plugin requires WordPress 6.0 or higher.', 'ddhh-job-manager' ) );
|
|
}
|
|
|
|
// Check PHP version
|
|
if ( version_compare( PHP_VERSION, '7.4', '<' ) ) {
|
|
wp_die( esc_html__( 'This plugin requires PHP 7.4 or higher.', 'ddhh-job-manager' ) );
|
|
}
|
|
|
|
// Store plugin version
|
|
update_option( 'ddhh_jm_version', DDHH_JM_VERSION );
|
|
|
|
// Register custom roles
|
|
DDHH_JM_Roles::add_roles();
|
|
|
|
// Create provider pages
|
|
DDHH_JM_Pages::create_provider_pages();
|
|
|
|
// Set flag to flush rewrite rules on next init
|
|
set_transient( 'ddhh_jm_flush_rewrite_rules', 1, 60 );
|
|
}
|
|
}
|