admin
4 years ago
plugins
4 years ago
widget
4 years ago
fixes-archive.php
4 years ago
fixes-archives.php
4 years ago
fixes-calendar.php
4 years ago
fixes-dates.php
4 years ago
fixes-misc.php
4 years ago
fixes-permalinks.php
4 years ago
general.php
4 years ago
install.php
4 years ago
parsidate.php
4 years ago
settings.php
4 years ago
fixes-misc.php
53 lines
| 1 | <?php |
| 2 | |
| 3 | defined( 'ABSPATH' ) or exit( 'No direct script access allowed' ); |
| 4 | |
| 5 | /** |
| 6 | * Fixes numbers in selected options |
| 7 | * |
| 8 | * @author Mobin Ghasempoor |
| 9 | * @author Ehsaan |
| 10 | * @package WP-Parsidate |
| 11 | * @subpackage Fixes/NumbersAndArabic |
| 12 | */ |
| 13 | |
| 14 | if ( get_locale() == 'fa_IR' ) { |
| 15 | global $wpp_settings; |
| 16 | |
| 17 | if ( wpp_is_active( 'conv_page_title' ) ) { |
| 18 | add_filter( 'wp_title', 'fix_number', 1000 ); |
| 19 | } |
| 20 | |
| 21 | if ( wpp_is_active( 'conv_title' ) ) { |
| 22 | add_filter( 'the_title', 'fix_number', 1000 ); |
| 23 | } |
| 24 | |
| 25 | if ( wpp_is_active( 'conv_contents' ) ) { |
| 26 | add_filter( 'the_content', 'fix_number', 1000 ); |
| 27 | } |
| 28 | |
| 29 | if ( wpp_is_active( 'conv_excerpt' ) ) { |
| 30 | add_filter( 'the_excerpt', 'fix_number', 1000 ); |
| 31 | } |
| 32 | |
| 33 | if ( wpp_is_active( 'conv_comments' ) ) { |
| 34 | add_filter( 'comment_text', 'fix_number', 1000 ); |
| 35 | } |
| 36 | |
| 37 | if ( wpp_is_active( 'conv_comment_count' ) ) { |
| 38 | add_filter( 'comments_number', 'fix_number', 1000 ); |
| 39 | } |
| 40 | |
| 41 | if ( wpp_is_active( 'conv_cats' ) ) { |
| 42 | add_filter( 'wp_list_categories', 'fix_number', 1000 ); |
| 43 | } |
| 44 | |
| 45 | if ( wpp_is_active( 'conv_arabic' ) ) { |
| 46 | add_filter( 'the_content', 'fix_arabic', 1000 ); |
| 47 | add_filter( 'the_title', 'fix_arabic', 1000 ); |
| 48 | add_filter( 'comment_text', 'fix_arabic', 1000 ); |
| 49 | add_filter( 'wp_list_categories', 'fix_arabic', 1000 ); |
| 50 | add_filter( 'the_excerpt', 'fix_arabic', 1000 ); |
| 51 | add_filter( 'wp_title', 'fix_arabic', 1000 ); |
| 52 | } |
| 53 | } |