Add admin UI class to main plugin bootstrap and initialize hooks in admin context only:
- Require class-admin-ui.php in main plugin file
- Initialize Admin_UI::setup_hooks() only when is_admin() is true
- Performance optimization: admin hooks don't load on frontend
Admin moderation interface now provides efficient job listing with custom columns and status filters.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Create DDHH_JM_Admin_UI class with custom columns for job_offer admin listing:
- Anbieter (provider org name + contact person from user meta)
- Standort (location from ACF field)
- Art (job type from ACF field)
- Eingereicht am (submission date)
Removed default author/date columns to reduce clutter. Made columns sortable for efficient moderation workflow.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Added require statement for class-notifications.php in main plugin file
- Initialized notification hooks via init action in main class
- Pattern consistent with existing class initializations (Access_Control, Dashboard, etc.)
- Notifications will trigger on transition_post_status after WordPress fully loads
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add create_job_edit_form() method to programmatically create edit form
- Form uses 'job_edit' key and matches submission form fields exactly
- Configure Update Post action to update existing job_offer posts
- Add validate_job_ownership() method with frm_validate_entry hook
- Security: Validates job_id parameter, post_type, and post_author match
- Prevents URL parameter tampering by malicious providers
- Add get_job_edit_form_id() helper method
- Form pre-populates from post ID via URL parameter
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Created DDHH_JM_Notifications class with email notification system
- Hook into transition_post_status to detect new pending job submissions
- Send German email to admin with job details and edit link
- Email includes: title, author, org, location, type, date, edit link
- Only trigger on new → pending transition to avoid spam on updates
- Log errors if wp_mail() fails (common in Local WP)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add create_job_submission_form() method to DDHH_JM_Formidable class
- Create Formidable form with key 'job_submission'
- Add 7 fields with German labels: title, description, location, type, deadline, email, logo
- Configure Create Post action: post_type='job_offer', status='pending'
- Map form fields to ACF fields: job_location, job_type, job_deadline, job_contact_email, job_logo
- Add get_job_submission_form_id() helper method
- Hook form creation into init action
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Create DDHH_JM_Access_Control class with redirect logic
- Redirect providers from WP-Admin to dashboard page
- Preserve access to profile.php for password/email changes
- Preserve access to admin-ajax.php for AJAX requests
- Integrate access control hooks in main plugin class
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add create_login_page() method to DDHH_JM_Pages class
- Combined view with registration form (Formidable shortcode) and login form (wp_login_form)
- German headings: "Neu registrieren" and "Bereits registriert?"
- Responsive two-column layout (desktop) with flexbox
- Stacked layout on mobile (< 768px)
- Inline CSS styling for visual separation and consistency
- Background colors and borders for section distinction
- Page accessible at /anbieter-login/
- Duplicate prevention: checks for existing page by slug
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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>
- Created templates/provider-dashboard.php with:
- User role check (ddhh_provider)
- WP_Query for current user's job_offer posts
- Table display with German column headings
- Status badges (Veröffentlicht/Ausstehend/Entwurf)
- Edit and View action links
- Empty state message
- Responsive CSS styling
- Created includes/class-dashboard.php with:
- Template loader method
- Shortcode registration [ddhh_provider_dashboard]
- Output buffering for shortcode content
Dashboard queries only current user's posts with proper capability checking.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Added class-formidable.php to autoload in main plugin file
- Hooked setup_registration_hooks() to init action
- Added missing class-roles.php and class-acf-fields.php to autoload
- Ensures Formidable integration runs after Formidable Forms loads
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Created DDHH_JM_Formidable class with registration form setup
- Programmatic form creation with 5 German-labeled fields
- Email uniqueness validation enforced
- Auto-login after successful registration
- ddhh_provider role assignment on user creation
- Organization name stored as user meta (ddhh_org_name)
- Duplicate submission prevention via email_exists() check
- Password validation (min 8 chars, confirmation match)
- Username generation from email prefix with uniqueness check
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add DDHH_JM_ACF_Fields class with register_fields() method
- Field group 'Job Details' for post_type job_offer
- 6 fields: job_location (text, required), job_type (select, required),
job_deadline (date_picker), job_contact_email (email, required),
job_logo (image), job_deactivation_reason (textarea, conditional)
- German labels: Standort, Art, Bewerbungsfrist, Kontakt-E-Mail, Logo
- Logo returns ID for media library integration
- Deactivation reason field shows only when status != publish
- Hooked to 'acf/init' action
- Add DDHH_JM_Roles class with add_roles() and remove_roles() methods
- Role 'ddhh_provider' (Anbieter) can edit/delete own job_offers only
- Jobs go to pending status (publish_job_offers: false)
- No access to regular posts/pages (edit_posts/edit_pages: false)
- Can upload files for logos
- Integrated with Activator and Deactivator hooks
- Create main singleton class
- Create activator with version checks
- Create deactivator with rewrite flush
- Update main file to include core classes
This is a blocking fix (Rule 3) - Plan 01-01 was not completed but
these files are required for Plan 01-02 to execute.
- Add main singleton class DDHH_JM_Job_Manager
- Implement activation handler with WP/PHP version checks
- Implement deactivation handler with rewrite flush
- Use transient-based rewrite flush to avoid multiple flushes
- Add comprehensive security checks and documentation
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>