wp-jalali - Version 4.5.3

Version Description

Download this release

Release Info

Developer mani_monaj
Plugin Icon 128x128 wp-jalali
Version 4.5.3
Comparing to
See all releases

Code changes from version 4.5.2 to 4.5.3

inc/editjalali-core.php CHANGED
@@ -80,6 +80,12 @@ function jalali_touch_time( $edit = 1, $for_post = 1 ) {
80
  }
81
 
82
  function jalali_timestamp_admin() {
83
- if ( current_user_can('edit_posts') ) jalali_touch_time(($action == 'edit'));
 
 
 
 
 
84
  }
85
- ?>
 
80
  }
81
 
82
  function jalali_timestamp_admin() {
83
+ if(isset($_GET['action']) AND $_GET['action']=='edit') {
84
+ $Edit = 1;
85
+ } else {
86
+ $Edit = 0;
87
+ }
88
+ if ( current_user_can('edit_posts') ) jalali_touch_time($Edit);
89
  }
90
+
91
+ ?>
inc/jalali-core.php CHANGED
@@ -426,7 +426,8 @@ function jdate($type,$maket="now",$forcelatinnums=false)
426
  function jmaketime($hour,$minute,$second,$jmonth,$jday,$jyear)
427
  {
428
  list( $year, $month, $day ) = jalali_to_gregorian($jyear, $jmonth, $jday);
429
- $i=mktime((int) $hour,(int) $minute,(int) $second, (int) $month, (int) $day, (int) $year, 0);
 
430
  return $i;
431
  }
432
 
426
  function jmaketime($hour,$minute,$second,$jmonth,$jday,$jyear)
427
  {
428
  list( $year, $month, $day ) = jalali_to_gregorian($jyear, $jmonth, $jday);
429
+ //$i=mktime((int) $hour,(int) $minute,(int) $second, (int) $month, (int) $day, (int) $year, 0);
430
+ $i=mktime((int) $hour,(int) $minute,(int) $second, (int) $month, (int) $day, (int) $year);
431
  return $i;
432
  }
433
 
inc/tables-date.php CHANGED
@@ -8,7 +8,8 @@
8
  */
9
  add_filter('post_date_column_time', 'wp_fa_date_columns');
10
  function wp_fa_date_columns($time) {
11
- $arrtime = split('/', $time);
 
12
  if(count($arrtime) == 1)
13
  return farsi_num($time);
14
  $gmt = mktime(0,0,0,$arrtime[1],$arrtime[2],$arrtime[0]);
8
  */
9
  add_filter('post_date_column_time', 'wp_fa_date_columns');
10
  function wp_fa_date_columns($time) {
11
+ //$arrtime = split('/', $time);
12
+ $arrtime = explode('/', $time);
13
  if(count($arrtime) == 1)
14
  return farsi_num($time);
15
  $gmt = mktime(0,0,0,$arrtime[1],$arrtime[2],$arrtime[0]);
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === wp-jalali ===
2
- Contributors: mani_monaj, Gonahkar
3
  Donate link: http://www.wp-persian.com/donate/
4
  Tags: Persian, Farsi, Jalali, Date, Calendar, i18n, l10n, Iran, Iranian
5
  Requires at least: 2.1
6
- Tested up to: 3.8
7
- Stable tag: 4.5.2
8
 
9
  Turn you Wordpress into a full featured Persian (Iranian) Blogging Platform.
10
 
@@ -47,4 +47,4 @@ Please check out [this page](http://wp-persian.com/en/about/).
47
 
48
  == Screenshots ==
49
 
50
- 1. Persian Wordpress Admin Page
1
  === wp-jalali ===
2
+ Contributors: mani_monaj, Gonahkar, moallemi, zakrot
3
  Donate link: http://www.wp-persian.com/donate/
4
  Tags: Persian, Farsi, Jalali, Date, Calendar, i18n, l10n, Iran, Iranian
5
  Requires at least: 2.1
6
+ Tested up to: 3.9
7
+ Stable tag: 4.5.3
8
 
9
  Turn you Wordpress into a full featured Persian (Iranian) Blogging Platform.
10
 
47
 
48
  == Screenshots ==
49
 
50
+ 1. Persian Wordpress Admin Page
wp-jalali.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: wp-jalali
4
  Plugin URI: http://wp-persian.com/plugins/wp-jalali/
5
  Description: Full Jalali Date and Persian(Farsi) Support Package for wordpress, Full posts' and comments' dates convertion , Jalali Archive , Magic(Jalali/Gregorian) Calendar and Jalali/Gregorian Compaitables Permalinks, TinyMCE RTL/LTR activation, TinyMCE Persian Improvement, Cross browser Perisan keyboard support, Jalali Archive/Calendar widgets and Persian numbers, Great tool for Persian(Iranian) Users of WordPress, part of <a href="http://wp-persian.com" title="پروژه وردپرس فارسی">Persian Wordpress Project</a>.
6
- Version: 4.5.2
7
  Author: Mani Monajjemi
8
  Author URI: http://www.manionline.org/
9
  */
@@ -64,7 +64,8 @@ function mps_jd_menu(){
64
  */
65
  if(function_exists('add_options_page')) {
66
  //add_options_page("تنظیمات وردپرس فارسی", "وردپرس فارسی", 10, __FILE__,'mps_jd_optionpage');
67
- add_menu_page("تنظیمات وردپرس فارسی", "وردپرس فارسی", 10, 'wp-jalali','mps_jd_optionpage', plugins_url('wp-jalali/images/logo.png'));
 
68
  }
69
 
70
  $mps_jd_optionsDB = get_option(MPS_JD_OPTIONS_NAME);
@@ -535,14 +536,22 @@ function mps_jalali_query($where) {
535
  global $wp_query, $wpdb;
536
  global $j_days_in_month;
537
 
538
- $m = $wp_query->query_vars['m'];
539
- $hour = $wp_query->query_vars['hour'];
540
- $minute = $wp_query->query_vars['minute'];
541
- $second = $wp_query->query_vars['second'];
542
- $year = $wp_query->query_vars['year'];
543
- $monthnum = $wp_query->query_vars['monthnum'];
544
- $day = $wp_query->query_vars['day'];
545
-
 
 
 
 
 
 
 
 
546
  $j_monthnum = 1;
547
  $j_day = 1;
548
  $j_hour = 0;
@@ -1431,4 +1440,4 @@ add_action('widgets_init', 'widget_jarchive_init');
1431
  add_action('widgets_init', 'widget_mps_calendar_init');
1432
 
1433
  // add_action('wp_print_scripts', 'mps_loadjs');
1434
- ?>
3
  Plugin Name: wp-jalali
4
  Plugin URI: http://wp-persian.com/plugins/wp-jalali/
5
  Description: Full Jalali Date and Persian(Farsi) Support Package for wordpress, Full posts' and comments' dates convertion , Jalali Archive , Magic(Jalali/Gregorian) Calendar and Jalali/Gregorian Compaitables Permalinks, TinyMCE RTL/LTR activation, TinyMCE Persian Improvement, Cross browser Perisan keyboard support, Jalali Archive/Calendar widgets and Persian numbers, Great tool for Persian(Iranian) Users of WordPress, part of <a href="http://wp-persian.com" title="پروژه وردپرس فارسی">Persian Wordpress Project</a>.
6
+ Version: 4.5.3
7
  Author: Mani Monajjemi
8
  Author URI: http://www.manionline.org/
9
  */
64
  */
65
  if(function_exists('add_options_page')) {
66
  //add_options_page("تنظیمات وردپرس فارسی", "وردپرس فارسی", 10, __FILE__,'mps_jd_optionpage');
67
+ //add_menu_page("تنظیمات وردپرس فارسی", "وردپرس فارسی", 10, 'wp-jalali','mps_jd_optionpage', plugins_url('wp-jalali/images/logo.png'));
68
+ add_menu_page("تنظیمات وردپرس فارسی", "وردپرس فارسی", 'manage_options','wp-jalali','mps_jd_optionpage', plugins_url('wp-jalali/images/logo.png'));
69
  }
70
 
71
  $mps_jd_optionsDB = get_option(MPS_JD_OPTIONS_NAME);
536
  global $wp_query, $wpdb;
537
  global $j_days_in_month;
538
 
539
+ // $m = $wp_query->query_vars['m'];
540
+ // $hour = $wp_query->query_vars['hour'];
541
+ // $minute = $wp_query->query_vars['minute'];
542
+ // $second = $wp_query->query_vars['second'];
543
+ // $year = $wp_query->query_vars['year'];
544
+ // $monthnum = $wp_query->query_vars['monthnum'];
545
+ // $day = $wp_query->query_vars['day'];
546
+
547
+ $m = (isset($wp_query->query_vars['m'])) ? $wp_query->query_vars['m'] : '';
548
+ $hour = (isset($wp_query->query_vars['hour'])) ? $wp_query->query_vars['hour'] : '';
549
+ $minute = (isset($wp_query->query_vars['minute'])) ? $wp_query->query_vars['minute'] : '';
550
+ $second = (isset($wp_query->query_vars['second'])) ? $wp_query->query_vars['second'] : '';
551
+ $year = (isset($wp_query->query_vars['year'])) ? $wp_query->query_vars['year'] : '';
552
+ $monthnum = (isset($wp_query->query_vars['monthnum'])) ? $wp_query->query_vars['monthnum'] : '';
553
+ $day = (isset($wp_query->query_vars['day'])) ? $wp_query->query_vars['day'] : '';
554
+
555
  $j_monthnum = 1;
556
  $j_day = 1;
557
  $j_hour = 0;
1440
  add_action('widgets_init', 'widget_mps_calendar_init');
1441
 
1442
  // add_action('wp_print_scripts', 'mps_loadjs');
1443
+ ?>