PluginProbe ʕ •ᴥ•ʔ
پارسی دیت – Parsi Date / 2.2.2
پارسی دیت – Parsi Date v2.2.2
6.1 5.1.6 5.1.7 5.1.8 5.1.8.2 6.0 trunk 1.0 1.1 1.2 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 2.0.0-alpha 2.1 2.1.1 2.1.2 2.1.3 2.1.5 2.1.6 2.1.7 2.2.0 2.2.1 2.2.2 2.2.3 2.3.0.1 2.3.0.2 2.3.1 2.3.2 2.3.3 2.3.4 3.0.1 3.0.2 3.0.3 4.0.0 4.0.1 4.0.2 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5
wp-parsidate / includes / fixes-archive.php
wp-parsidate / includes Last commit date
admin 9 years ago plugins 9 years ago widget 9 years ago fixes-archive.php 9 years ago fixes-archives.php 9 years ago fixes-calendar.php 9 years ago fixes-dates.php 9 years ago fixes-misc.php 9 years ago fixes-permalinks.php 9 years ago general.php 9 years ago install.php 9 years ago parsidate.php 9 years ago settings.php 9 years ago
fixes-archive.php
39 lines
1 <?php
2 /**
3 * Fixes archives and make them compatible with Shamsi date
4 *
5 * @package WP-Parsidate
6 * @subpackage Fixes/Archives
7 * @author Mobin Ghasempoor
8 */
9
10 add_filter('wp_title','wpp_fix_title');
11
12 /**
13 * Fixes titles for archives
14 *
15 * @param string $title Archive title
16 * @param string $sep Seperator
17 * @param string $seplocation Seperator location
18 * @return string New archive title
19 */
20 function wpp_fix_title( $title, $sep = '»', $seplocation = 'right' ) {
21 global $persian_month_names, $wp_query, $wpp_settings;
22 $query = $wp_query->query;
23
24 if ( ! is_archive() || ( is_archive() && ! isset( $query['monthnum'] )) || ( $wpp_settings['persian_date'] == 'disable' ) )
25 return $title;
26
27 if ( $seplocation == 'right' )
28 $query = array_reverse( $query );
29
30 $query['monthnum'] = $persian_month_names[intval( $query['monthnum'] )];
31
32 $title = implode( " $sep ", $query ) . " $sep ";
33
34 if ( $wpp_settings['conv_page_title'] != 'disable' )
35 $title = fixnumber($title);
36
37 return $title;
38 }
39