Last active
August 28, 2018 12:10
-
-
Save farhadsakhaei/ba44ea12b0a992a9dac3f8c441931fc9 to your computer and use it in GitHub Desktop.
در صورتی که از افزونه دبلیو پی پارسی استفاده می کنید و مایل نیستید برای برخی از توابع، شمسی سازی استفاده شود می توانید از چنین کدی استفاده نمایید
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( in_array( 'wp-parsidate/wp-parsidate.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) { | |
global $wpp_settings; | |
if(isset($wpp_settings) && $wpp_settings['persian_date'] == 'enable'){ | |
$time_string = sprintf( $time_string, | |
gregdate(DATE_W3C, eng_number(get_the_date( DATE_W3C ))), | |
get_the_date() | |
); | |
} | |
}else{ | |
$time_string = sprintf( $time_string, | |
get_the_date( DATE_W3C ), | |
get_the_date() | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you use wordpress wp-parsi plugin and you don't like to convert some of dates to Jalali, You can use this snippets