feat(07-01): add deadline and contact email to all notification emails

All three job notification emails (new submission, edit, deactivation) now include:
- Bewerbungsfrist (deadline) - formatted as DD.MM.YYYY
- Kontakt-E-Mail (contact email)

This provides administrators with complete information about each job posting.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-17 21:36:43 +09:00
parent 0c9ebb9e89
commit 18ddcd5e0a

View File

@@ -64,6 +64,14 @@ class DDHH_JM_Notifications {
// Get post meta fields // Get post meta fields
$job_location = get_post_meta( $post->ID, 'job_location', true ); $job_location = get_post_meta( $post->ID, 'job_location', true );
$job_type = get_post_meta( $post->ID, 'job_type', true ); $job_type = get_post_meta( $post->ID, 'job_type', true );
$job_deadline = get_post_meta( $post->ID, 'job_deadline', true );
$job_contact_email = get_post_meta( $post->ID, 'job_contact_email', true );
// Format deadline if present
$deadline_formatted = 'Nicht angegeben';
if ( ! empty( $job_deadline ) ) {
$deadline_formatted = date( 'd.m.Y', strtotime( $job_deadline ) );
}
// Get submission date // Get submission date
$submission_date = get_the_date( 'd.m.Y H:i', $post->ID ); $submission_date = get_the_date( 'd.m.Y H:i', $post->ID );
@@ -81,6 +89,8 @@ class DDHH_JM_Notifications {
"Anbieter: %s (%s)\n" . "Anbieter: %s (%s)\n" .
"Standort: %s\n" . "Standort: %s\n" .
"Art: %s\n" . "Art: %s\n" .
"Bewerbungsfrist: %s\n" .
"Kontakt-E-Mail: %s\n" .
"Eingereicht am: %s\n\n" . "Eingereicht am: %s\n\n" .
"Prüfen Sie das Stellenangebot hier:\n%s\n\n" . "Prüfen Sie das Stellenangebot hier:\n%s\n\n" .
"---\n" . "---\n" .
@@ -90,6 +100,8 @@ class DDHH_JM_Notifications {
$author_org, $author_org,
$job_location ? $job_location : 'Nicht angegeben', $job_location ? $job_location : 'Nicht angegeben',
$job_type ? $job_type : 'Nicht angegeben', $job_type ? $job_type : 'Nicht angegeben',
$deadline_formatted,
$job_contact_email ? $job_contact_email : 'Nicht angegeben',
$submission_date, $submission_date,
$edit_link $edit_link
); );
@@ -146,6 +158,14 @@ class DDHH_JM_Notifications {
// Get post meta fields // Get post meta fields
$job_location = get_post_meta( $post->ID, 'job_location', true ); $job_location = get_post_meta( $post->ID, 'job_location', true );
$job_type = get_post_meta( $post->ID, 'job_type', true ); $job_type = get_post_meta( $post->ID, 'job_type', true );
$job_deadline = get_post_meta( $post->ID, 'job_deadline', true );
$job_contact_email = get_post_meta( $post->ID, 'job_contact_email', true );
// Format deadline if present
$deadline_formatted = 'Nicht angegeben';
if ( ! empty( $job_deadline ) ) {
$deadline_formatted = date( 'd.m.Y', strtotime( $job_deadline ) );
}
// Get submission date // Get submission date
$submission_date = current_time( 'd.m.Y H:i' ); $submission_date = current_time( 'd.m.Y H:i' );
@@ -163,6 +183,8 @@ class DDHH_JM_Notifications {
"Anbieter: %s (%s)\n" . "Anbieter: %s (%s)\n" .
"Standort: %s\n" . "Standort: %s\n" .
"Art: %s\n" . "Art: %s\n" .
"Bewerbungsfrist: %s\n" .
"Kontakt-E-Mail: %s\n" .
"Bearbeitet am: %s\n\n" . "Bearbeitet am: %s\n\n" .
"Prüfen Sie das Stellenangebot hier:\n%s\n\n" . "Prüfen Sie das Stellenangebot hier:\n%s\n\n" .
"---\n" . "---\n" .
@@ -172,6 +194,8 @@ class DDHH_JM_Notifications {
$author_org, $author_org,
$job_location ? $job_location : 'Nicht angegeben', $job_location ? $job_location : 'Nicht angegeben',
$job_type ? $job_type : 'Nicht angegeben', $job_type ? $job_type : 'Nicht angegeben',
$deadline_formatted,
$job_contact_email ? $job_contact_email : 'Nicht angegeben',
$submission_date, $submission_date,
$edit_link $edit_link
); );
@@ -235,6 +259,14 @@ class DDHH_JM_Notifications {
// Get post meta fields // Get post meta fields
$job_location = get_post_meta( $post->ID, 'job_location', true ); $job_location = get_post_meta( $post->ID, 'job_location', true );
$job_type = get_post_meta( $post->ID, 'job_type', true ); $job_type = get_post_meta( $post->ID, 'job_type', true );
$job_deadline = get_post_meta( $post->ID, 'job_deadline', true );
$job_contact_email = get_post_meta( $post->ID, 'job_contact_email', true );
// Format deadline if present
$deadline_formatted = 'Nicht angegeben';
if ( ! empty( $job_deadline ) ) {
$deadline_formatted = date( 'd.m.Y', strtotime( $job_deadline ) );
}
// Get deactivation reason from post meta // Get deactivation reason from post meta
$deactivation_reason = get_post_meta( $post->ID, 'job_deactivation_reason', true ); $deactivation_reason = get_post_meta( $post->ID, 'job_deactivation_reason', true );
@@ -258,6 +290,8 @@ class DDHH_JM_Notifications {
"Anbieter: %s (%s)\n" . "Anbieter: %s (%s)\n" .
"Standort: %s\n" . "Standort: %s\n" .
"Art: %s\n" . "Art: %s\n" .
"Bewerbungsfrist: %s\n" .
"Kontakt-E-Mail: %s\n" .
"Deaktiviert am: %s\n\n" . "Deaktiviert am: %s\n\n" .
"Grund für Deaktivierung:\n%s\n\n" . "Grund für Deaktivierung:\n%s\n\n" .
"Stelle ansehen:\n%s\n\n" . "Stelle ansehen:\n%s\n\n" .
@@ -268,6 +302,8 @@ class DDHH_JM_Notifications {
$author_org, $author_org,
$job_location ? $job_location : 'Nicht angegeben', $job_location ? $job_location : 'Nicht angegeben',
$job_type ? $job_type : 'Nicht angegeben', $job_type ? $job_type : 'Nicht angegeben',
$deadline_formatted,
$job_contact_email ? $job_contact_email : 'Nicht angegeben',
$deactivation_date, $deactivation_date,
$deactivation_reason ? $deactivation_reason : 'Nicht angegeben', $deactivation_reason ? $deactivation_reason : 'Nicht angegeben',
$edit_link $edit_link