From 18ed71e2d48eb8fbf09b98887bb211a965e1ff05 Mon Sep 17 00:00:00 2001 From: Ivan Fefilov Date: Fri, 24 Jan 2025 10:26:17 +0400 Subject: [PATCH 1/2] fix the_time hook --- includes/fixes-dates.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/fixes-dates.php b/includes/fixes-dates.php index 725f23c..2123223 100644 --- a/includes/fixes-dates.php +++ b/includes/fixes-dates.php @@ -13,7 +13,7 @@ global $wpp_settings; if ( get_locale() === 'fa_IR' && wpp_is_active( 'persian_date' ) ) { - add_filter( 'the_time', 'wpp_fix_the_time', 10, 2 ); + add_filter( 'the_time', 'wpp_fix_get_time', 10, 2 ); add_filter( 'the_date', 'wpp_fix_post_date', 10, 3 ); add_filter( 'get_the_time', 'wpp_fix_get_the_time', 10, 3 ); add_filter( 'get_the_date', 'wpp_fix_post_date', 100, 3 ); From 4f7fe078e2da6d26c415996dac052d30a06b916b Mon Sep 17 00:00:00 2001 From: Ivan Fefilov Date: Fri, 24 Jan 2025 10:29:25 +0400 Subject: [PATCH 2/2] fix the_time hook --- includes/fixes-dates.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/fixes-dates.php b/includes/fixes-dates.php index 2123223..d8fa6e2 100644 --- a/includes/fixes-dates.php +++ b/includes/fixes-dates.php @@ -13,7 +13,7 @@ global $wpp_settings; if ( get_locale() === 'fa_IR' && wpp_is_active( 'persian_date' ) ) { - add_filter( 'the_time', 'wpp_fix_get_time', 10, 2 ); + add_filter( 'the_time', 'wpp_fix_the_time', 10, 2 ); add_filter( 'the_date', 'wpp_fix_post_date', 10, 3 ); add_filter( 'get_the_time', 'wpp_fix_get_the_time', 10, 3 ); add_filter( 'get_the_date', 'wpp_fix_post_date', 100, 3 ); @@ -94,7 +94,7 @@ function wpp_fix_post_modified_time( $time, $format, $gmt ) { * * @return string Formatted date */ -function wpp_fix_get_time( $time, $format = '' ) { +function wpp_fix_the_time( $time, $format = '' ) { if ( empty( $time ) ) { return $time; }