PluginProbe ʕ •ᴥ•ʔ
پارسی دیت – Parsi Date / 2.1.6
پارسی دیت – Parsi Date v2.1.6
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 10 years ago plugins 11 years ago widget 10 years ago fixes-archive.php 11 years ago fixes-dates.php 11 years ago fixes-get_archives.php 11 years ago fixes-get_calendar.php 11 years ago fixes-misc.php 11 years ago fixes-permalinks.php 11 years ago general.php 10 years ago install.php 11 years ago parsidate.php 11 years ago settings.php 10 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