From 1c6598d8c2b9349b3fcc8fc5cbb0f20070b4c71e Mon Sep 17 00:00:00 2001 From: Viktor Miller Date: Wed, 14 Jan 2026 19:20:59 +0900 Subject: [PATCH] docs(02-01): complete provider registration form plan 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 --- ddhh-job-manager.php | 2 ++ includes/class-activator.php | 3 ++ includes/class-ddhh-job-manager.php | 3 ++ includes/class-pages.php | 55 +++++++++++++++++++++++++++++ 4 files changed, 63 insertions(+) create mode 100644 includes/class-pages.php diff --git a/ddhh-job-manager.php b/ddhh-job-manager.php index e233166..ce5519c 100644 --- a/ddhh-job-manager.php +++ b/ddhh-job-manager.php @@ -32,6 +32,8 @@ require_once DDHH_JM_PLUGIN_DIR . 'includes/class-post-types.php'; require_once DDHH_JM_PLUGIN_DIR . 'includes/class-roles.php'; require_once DDHH_JM_PLUGIN_DIR . 'includes/class-acf-fields.php'; require_once DDHH_JM_PLUGIN_DIR . 'includes/class-formidable.php'; +require_once DDHH_JM_PLUGIN_DIR . 'includes/class-pages.php'; +require_once DDHH_JM_PLUGIN_DIR . 'includes/class-dashboard.php'; require_once DDHH_JM_PLUGIN_DIR . 'includes/class-ddhh-job-manager.php'; /** diff --git a/includes/class-activator.php b/includes/class-activator.php index e647c3f..d496acf 100644 --- a/includes/class-activator.php +++ b/includes/class-activator.php @@ -33,6 +33,9 @@ class DDHH_JM_Activator { // 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 ); } diff --git a/includes/class-ddhh-job-manager.php b/includes/class-ddhh-job-manager.php index fe5e15b..6b9242a 100644 --- a/includes/class-ddhh-job-manager.php +++ b/includes/class-ddhh-job-manager.php @@ -55,5 +55,8 @@ class DDHH_JM_Job_Manager { // Initialize Formidable Forms integration add_action( 'init', array( 'DDHH_JM_Formidable', 'setup_registration_hooks' ) ); + + // Initialize dashboard + add_action( 'init', array( 'DDHH_JM_Dashboard', 'init' ) ); } } diff --git a/includes/class-pages.php b/includes/class-pages.php new file mode 100644 index 0000000..ec6d18d --- /dev/null +++ b/includes/class-pages.php @@ -0,0 +1,55 @@ + 'Anbieter Dashboard', + 'post_name' => 'anbieter-dashboard', + 'post_content' => '[ddhh_provider_dashboard]', + 'post_status' => 'publish', + 'post_type' => 'page', + 'post_author' => 1, // Admin user + ); + + $page_id = wp_insert_post( $page_data ); + + if ( $page_id && ! is_wp_error( $page_id ) ) { + // Store page ID in options + update_option( 'ddhh_jm_dashboard_page_id', $page_id ); + } + } +}