Skip to content

Commit 88fd533

Browse files
authored
Fix hardcoded expiration date format (#2891)
Co-authored-by: Andrew Ozz <743931+azaozz@users.noreply.github.com> Use the `date_format` option instead.
1 parent 3fac4cf commit 88fd533

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

includes/class-job-dashboard-shortcode.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,14 +594,15 @@ public static function the_job_title( $job ) {
594594
}
595595

596596
/**
597-
* Show job title.
597+
* Show the job date
598598
*
599599
* @param \WP_Post $job
600600
*
601601
* @output string
602602
*/
603603
public static function the_date( $job ) {
604-
echo '<div>' . esc_html( wp_date( apply_filters( 'job_manager_get_dashboard_date_format', 'M d, Y' ), get_post_datetime( $job )->getTimestamp() ) ) . '</div>';
604+
$date_format = get_option( 'date_format' ) ?: 'M d, Y';
605+
echo '<div>' . esc_html( wp_date( apply_filters( 'job_manager_get_dashboard_date_format', $date_format ), get_post_datetime( $job )->getTimestamp() ) ) . '</div>';
605606
}
606607

607608
/**

0 commit comments

Comments
 (0)