Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/Helpers/DateTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function to_string() {
}

public function to_date_time_string() {
return $this->format( formgent_date_time_format() );
return $this->format( directorist_date_time_format() );
}

public function create_from_format( string $format, string $datetime, ?DateTimeZone $timezone = null ) {
Expand All @@ -84,7 +84,7 @@ public function add_timestamp( int $time ) {
}

public function wp_date_time_string( string $date_time ) {
$this->create_from_format( formgent_date_time_format(), $date_time );
$this->create_from_format( directorist_date_time_format(), $date_time );
$format = get_option( 'date_format' ) . ' \a\t ' . get_option( 'time_format' );
return $this->format( $format );
}
Expand Down
4 changes: 4 additions & 0 deletions app/Helpers/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,8 @@ function directorist_set_listing_status( int $listing_id, string $status ): bool
function directorist_get_directory_by_slug( string $slug ) {
$directory = get_term_by( 'slug', $slug, 'atbdp_listing_types' );
return $directory ? $directory : null;
}

function directorist_date_time_format() {
return apply_filters( 'directorist_date_time_format', 'Y-m-d H:i:s' );
}
Loading