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>
63 lines
1.3 KiB
PHP
63 lines
1.3 KiB
PHP
<?php
|
|
/**
|
|
* Main plugin class
|
|
*
|
|
* @package DDHH_Job_Manager
|
|
*/
|
|
|
|
// Exit if accessed directly.
|
|
defined( 'ABSPATH' ) || exit;
|
|
|
|
/**
|
|
* Main plugin class - Singleton
|
|
*/
|
|
class DDHH_JM_Job_Manager {
|
|
|
|
/**
|
|
* Single instance of the class
|
|
*
|
|
* @var DDHH_JM_Job_Manager
|
|
*/
|
|
private static $instance = null;
|
|
|
|
/**
|
|
* Get singleton instance
|
|
*
|
|
* @return DDHH_JM_Job_Manager
|
|
*/
|
|
public static function get_instance() {
|
|
if ( null === self::$instance ) {
|
|
self::$instance = new self();
|
|
}
|
|
return self::$instance;
|
|
}
|
|
|
|
/**
|
|
* Constructor - Private to enforce singleton
|
|
*/
|
|
private function __construct() {
|
|
$this->init_hooks();
|
|
}
|
|
|
|
/**
|
|
* Initialize hooks
|
|
*/
|
|
private function init_hooks() {
|
|
// Register activation and deactivation hooks
|
|
register_activation_hook( DDHH_JM_PLUGIN_FILE, array( 'DDHH_JM_Activator', 'activate' ) );
|
|
register_deactivation_hook( DDHH_JM_PLUGIN_FILE, array( 'DDHH_JM_Deactivator', 'deactivate' ) );
|
|
|
|
// Initialize post types
|
|
add_action( 'init', array( 'DDHH_JM_Post_Types', 'register' ) );
|
|
|
|
// Initialize ACF fields
|
|
add_action( 'acf/init', array( 'DDHH_JM_ACF_Fields', 'register_fields' ) );
|
|
|
|
// Initialize Formidable Forms integration
|
|
add_action( 'init', array( 'DDHH_JM_Formidable', 'setup_registration_hooks' ) );
|
|
|
|
// Initialize dashboard
|
|
add_action( 'init', array( 'DDHH_JM_Dashboard', 'init' ) );
|
|
}
|
|
}
|