- Add 1rem vertical padding to .ddhh-provider-dashboard for proper spacing - Remove all !important declarations from button styles - Use proper CSS specificity (.ddhh-jobs-table .button) instead - Document CSS best practices in CLAUDE.md (avoid !important) CSS specificity approach is more maintainable and prevents conflicts with Elementor and other theme styles. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
3.5 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
Digital Dabei Job Manager is a WordPress plugin providing a closed job board for "digital dabei Hamburg". External organizations (providers) self-register and manage job listings. Mentors (existing subscribers) view and apply to jobs. All jobs require admin moderation before publication.
Core principle: Every job goes through admin approval before mentors see it. The moderation flow is the trust layer protecting mentors from spam.
Development Environment
- Platform: Local WP (WordPress development environment)
- WordPress: 6.0+, PHP 7.4+
- Required Plugins: ACF Pro, Formidable Forms Pro, Elementor Pro
- Email: WP Mail SMTP on production; disabled in Local WP dev environment
Development Workflow with GSD
IMPORTANT: Use /gsd commands for all code-related work in this repository.
The GSD (Get Stuff Done) workflow provides:
- Structured planning and execution phases
- Automatic verification of changes
- State management across sessions
- Parallel execution when possible
Common commands:
/gsd:progress- Check current state and next steps/gsd:plan-phase- Plan implementation for a phase/gsd:execute-phase- Execute all plans in a phase/gsd:help- View all available GSD commands
Development Workflow
Testing Locally
Since email is disabled in Local WP, test email functionality by:
- Checking Action Scheduler status: WP Admin → Tools → Scheduled Actions
- Monitoring logs:
error_log()calls throughout notification classes - Using a plugin like WP Mail Logging to capture emails during dev
Working with Forms
Formidable forms are managed through the Formidable UI. When referencing forms in code:
- Use form keys (e.g., 'job_submission') not IDs
- Form ID lookup happens via
FrmForm::getOne('form_key') - Field IDs are stored in form configuration, not hardcoded
Modifying Email Templates
Email templates are inline in class-notifications.php:
- Admin emails use
wp_mail()with HTML content - Mentor notification emails use
wp_mail()with plain text - All emails include job title, provider name, and relevant links
- Date formatting: Use
get_field()for ACF dates, format with German locale
Adding New Notifications
- Identify triggering event (form submission, status change, custom action)
- Add notification method to
class-notifications.php - Hook into appropriate action in
setup_hooks() - For batch processing, use
DDHH_JM_Scheduler::schedule_mentor_notification_batch()
CSS Best Practices
NEVER use !important in CSS. This is a bad practice that creates maintenance issues and specificity wars.
Instead, use proper CSS specificity to override styles:
- Bad:
.button { color: #fff !important; } - Good:
.ddhh-jobs-table .button { color: #fff; }
Specificity hierarchy (from weakest to strongest):
- Element selectors:
button { } - Class selectors:
.button { } - Multiple classes:
.ddhh-jobs-table .button { } - ID selectors:
#my-id { }(avoid in most cases) - Inline styles:
style="..."(avoid) !important(NEVER use unless absolutely necessary for overriding external libraries)
Template-specific styles:
- All dashboard template styles are scoped with
.ddhh-provider-dashboardor child selectors - This prevents conflicts with Elementor and other theme styles
- Use parent selector chains like
.ddhh-jobs-table .buttonfor higher specificity