at path:
ROOT
/
wp-content
/
themes
/
upaper
/
inc
/
urdu-date.php
run:
R
W
Run
plugins
DIR
2025-05-31 09:02:55
R
W
Run
.DS_Store
6 KB
2025-05-31 09:02:51
R
W
Run
Delete
Rename
class-tgm-plugin-activation.php
98.18 KB
2025-05-31 09:02:55
R
W
Run
Delete
Rename
color-scheme.php
1.74 KB
2025-05-31 09:02:51
R
W
Run
Delete
Rename
custom-header.php
2.03 KB
2025-05-31 09:02:51
R
W
Run
Delete
Rename
customizer.php
942 By
2025-05-31 09:02:55
R
W
Run
Delete
Rename
extras.php
2.69 KB
2025-05-31 09:02:51
R
W
Run
Delete
Rename
jetpack.php
951 By
2025-05-31 09:02:51
R
W
Run
Delete
Rename
load-more.php
1.93 KB
2025-05-31 09:02:51
R
W
Run
Delete
Rename
menu-icons.php
5.73 KB
2025-05-31 09:02:51
R
W
Run
Delete
Rename
one-click-demo-import.php
5.76 KB
2025-05-31 09:02:51
R
W
Run
Delete
Rename
post-rating.php
1010 By
2025-05-31 09:02:51
R
W
Run
Delete
Rename
register-scripts.php
2.84 KB
2025-05-31 09:02:55
R
W
Run
Delete
Rename
template-tags.php
8.32 KB
2025-05-31 09:02:51
R
W
Run
Delete
Rename
urdu-date.php
2.42 KB
2025-05-31 09:02:51
R
W
Run
Delete
Rename
urdu-keyboard.php
5.74 KB
2025-05-31 09:02:55
R
W
Run
Delete
Rename
views-counter.php
1.89 KB
2025-05-31 09:02:51
R
W
Run
Delete
Rename
widget-catposts.php
5.36 KB
2025-05-31 09:02:51
R
W
Run
Delete
Rename
widget-featured-pots.php
3.32 KB
2025-05-31 09:02:55
R
W
Run
Delete
Rename
widgets.php
53 By
2025-05-31 09:02:55
R
W
Run
Delete
Rename
error_log
up
📄
urdu-date.php
Save
<?php class WP_UrduDate { public function __construct() { add_filter( 'the_time', array( $this, 'translate' ) ); add_filter( 'the_date', array( $this, 'translate' ) ); add_filter( 'get_the_date', array( $this, 'translate' ) ); add_filter( 'get_the_time', array( $this, 'translate' ) ); add_filter( 'date_i18n', array( $this, 'translate' ) ); add_filter( 'comments_number', array( $this, 'translate' ) ); add_filter( 'get_comment_date', array( $this, 'translate' ) ); add_filter( 'get_comment_time', array( $this, 'translate' ) ); add_filter( 'number_format_i18n', array( $this, 'translate' ) ); } /** * Main function that handles the string * * @param string $str * @return string */ function translate( $str ) { if ( !$str ) { return; } $str = $this->translate_number( $str ); $str = $this->translate_day( $str ); $str = $this->translate_am( $str ); return $str; } /** * Translate numbers only * * @param string $str * @return string */ function translate_number( $str ) { $en = array( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ); $bn = array( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9); $str = str_replace( $en, $bn, $str ); return $str; } /** * Translate months only * * @param string $str * @return string */ function translate_day( $str ) { $en = array( 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ); $en_short = array( 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'June', 'July', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ); $bn = array( "جنوری "," فروری "," مارچ "," اپریل "," مئ "," جون "," جولائ "," اگست "," ستمبر "," اکتوبر "," نومبر "," دسمبر " ); $str = str_replace( $en, $bn, $str ); $str = str_replace( $en_short, $bn, $str ); return $str; } /** * Translate AM and PM * * @param string $str * @return string */ function translate_am( $str ) { $en = array( 'am', 'pm' ); $bn = array( 'am', 'pm' ); $str = str_replace( $en, $bn, $str ); return $str; } } $bn = new WP_UrduDate();