@@ -63,7 +63,7 @@ function wpp_fix_get_the_date($the_date, $d, $post)
63
63
{
64
64
global $ wpp_settings ;
65
65
66
- if (!disable_wpp ())
66
+ if ( !disable_wpp () || parsidate_check_format ( $ d ) )
67
67
return $ the_date ;
68
68
69
69
$ post = get_post ( $ post );
@@ -94,7 +94,7 @@ function wpp_fix_get_the_time($the_time, $d, $post)
94
94
{
95
95
global $ wpp_settings ;
96
96
97
- if (!disable_wpp ())
97
+ if ( !disable_wpp () || parsidate_check_format ( $ d ) )
98
98
return $ the_time ;
99
99
100
100
$ post = get_post ( $ post );
@@ -173,7 +173,7 @@ function wpp_fix_comment_time($time, $format = '')
173
173
if (empty ($ format )) {
174
174
$ format = get_option ('time_format ' );
175
175
}
176
- if (!disable_wpp ())
176
+ if ( !disable_wpp () || parsidate_check_format ( $ format ) )
177
177
return date ($ format , strtotime ($ comment ->comment_date ));
178
178
return parsidate ($ format , $ comment ->comment_date , $ wpp_settings ['conv_dates ' ] == 'disable ' ? 'eng ' : 'per ' );
179
179
}
@@ -197,7 +197,7 @@ function wpp_fix_comment_date($time, $format = '')
197
197
if (empty ($ format )) {
198
198
$ format = get_option ('date_format ' );
199
199
}
200
- if (!disable_wpp ())
200
+ if ( !disable_wpp () || parsidate_check_format ( $ format ) )
201
201
return date ($ format , strtotime ($ comment ->comment_date ));
202
202
return parsidate ($ format , $ comment ->comment_date , $ wpp_settings ['conv_dates ' ] == 'disable ' ? 'eng ' : 'per ' );
203
203
}
@@ -219,8 +219,8 @@ function wpp_fix_i18n($date, $format, $timestamp, $gmt)
219
219
global $ wpp_settings , $ post ;
220
220
$ post_id = !empty ($ post ) ? $ post ->ID : null ;
221
221
222
- if (!disable_wpp ())
223
- return $ format ;
222
+ if ( !disable_wpp () || parsidate_check_format ( $ format ))
223
+ return $ date ;
224
224
225
225
if ($ post_id != null && get_post_type ($ post_id ) == 'shop_order ' && isset ($ _GET ['post ' ])) // TODO: Remove after implement convert date for woocommerce
226
226
return $ date ;
@@ -233,7 +233,7 @@ function wpp_fix_wp_date($date, $format, $timestamp, $timezone)
233
233
global $ wpp_settings ;
234
234
235
235
if (!disable_wpp ())
236
- return $ format ;
236
+ return $ date ;
237
237
238
238
return parsidate ($ format , $ timestamp , $ wpp_settings ['conv_dates ' ] == 'disable ' ? 'eng ' : 'per ' );
239
239
}
0 commit comments