wp-jalali - Version 4.2

Version Description

Download this release

Release Info

Developer Gonahkar
Plugin Icon 128x128 wp-jalali
Version 4.2
Comparing to
See all releases

Code changes from version 4.1 to 4.2

images/wp-fa-logo.png CHANGED
Binary file
inc/editjalali-core.php CHANGED
@@ -19,7 +19,7 @@ function jalali_touch_time( $edit = 1, $for_post = 1 ) {
19
  $jm = $jalali_time[1];
20
  $jd = $jalali_time[2];
21
 
22
- echo "\n<script type=\"text/javascript\" src=\"" . get_option('siteurl') ."/wp-content/plugins/wp-jalali/inc/editjalali.js\"></script>\n";
23
  ?>
24
  <style>
25
  #jmonths {
@@ -48,16 +48,16 @@ function jalali_timestamp_func() {
48
  function inject_jalali_div() { // injecting jalali input boxes and month list under the default georgian date place
49
  jQuery("#timestampdiv *").hide();
50
  jQuery("#timestampdiv").append('<div id="jalalitimestamp"></div>');
51
- jQuery("#jalalitimestamp").append('<select onchange="jalali_timestamp_func()" name="jm" id="jm_select"></select> ');
52
  <?php
53
  for ( $i = 1; $i < 13; $i = $i +1 ) {
54
  echo "\tjQuery(\"#jm_select\").append('<option value=\"$i\" id=\"jm_$i\">$j_month_name[$i]</option>');\n";
55
  }
56
  ?>
57
- jQuery("#jalalitimestamp").append('<input type="text" id="jd" name="jd" value="<?php echo $jd; ?>" size="2" maxlength="2" onchange="jalali_timestamp_func()"/> ');
58
- jQuery("#jalalitimestamp").append('<input type="text" id="jy" name="jy" value="<?php echo $jy ?>" size="4" maxlength="5" onchange="jalali_timestamp_func()" />');
59
  jQuery("#jalalitimestamp").append('<input type="hidden" id="ss" name="ss" value="<?php echo $ss ?>" size="2" maxlength="2" onchange="jalali_timestamp_func()" />');
60
- jQuery("#jalalitimestamp").append('<br />ساعت: <input type="text" id="hh" name="hh" value="<?php echo $hh ?>" size="2" maxlength="2" onchange="jalali_timestamp_func()" /> : <input type="text" id="mn" name="mn" value="<?php echo $mn ?>" size="2" maxlength="2" onchange="jalali_timestamp_func()" /> دقیقه');
61
  jQuery("select#jm_select > option[@value=<?php echo $jm; ?>]").attr('selected','selected');
62
  jQuery("select#mm, input#jj, input#aa").attr("onchange","georgian_timestamp_func()");
63
  <?php
19
  $jm = $jalali_time[1];
20
  $jd = $jalali_time[2];
21
 
22
+ echo "\n<script type=\"text/javascript\" src=\"" . get_option('siteurl') ."/wp-content/plugins/wp-jalali/inc/js/editjalali.js\"></script>\n";
23
  ?>
24
  <style>
25
  #jmonths {
48
  function inject_jalali_div() { // injecting jalali input boxes and month list under the default georgian date place
49
  jQuery("#timestampdiv *").hide();
50
  jQuery("#timestampdiv").append('<div id="jalalitimestamp"></div>');
51
+ jQuery("#jalalitimestamp").append('<select tabindex="501" onchange="jalali_timestamp_func()" name="jm" id="jm_select"></select> ');
52
  <?php
53
  for ( $i = 1; $i < 13; $i = $i +1 ) {
54
  echo "\tjQuery(\"#jm_select\").append('<option value=\"$i\" id=\"jm_$i\">$j_month_name[$i]</option>');\n";
55
  }
56
  ?>
57
+ jQuery("#jalalitimestamp").append('<input tabindex="502" type="text" id="jd" name="jd" value="<?php echo $jd; ?>" size="2" maxlength="2" onchange="jalali_timestamp_func()"/> ');
58
+ jQuery("#jalalitimestamp").append('<input tabindex="500" type="text" id="jy" name="jy" value="<?php echo $jy ?>" size="4" maxlength="5" onchange="jalali_timestamp_func()" />');
59
  jQuery("#jalalitimestamp").append('<input type="hidden" id="ss" name="ss" value="<?php echo $ss ?>" size="2" maxlength="2" onchange="jalali_timestamp_func()" />');
60
+ jQuery("#jalalitimestamp").append('<br />ساعت: <input tabindex="503" type="text" id="hh" name="hh" value="<?php echo $hh ?>" size="2" maxlength="2" onchange="jalali_timestamp_func()" /> : <input tabindex="504" type="text" id="mn" name="mn" value="<?php echo $mn ?>" size="2" maxlength="2" onchange="jalali_timestamp_func()" /> دقیقه');
61
  jQuery("select#jm_select > option[@value=<?php echo $jm; ?>]").attr('selected','selected');
62
  jQuery("select#mm, input#jj, input#aa").attr("onchange","georgian_timestamp_func()");
63
  <?php
inc/{editjalali.js → js/editjalali.js} RENAMED
File without changes
inc/{farsitype.js → js/farsitype.js} RENAMED
File without changes
inc/tags.js DELETED
File without changes
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === wp-jalali ===
2
  Contributors: mani_monaj, Gonahkar
3
  Donate link: http://www.wishlistr.com/mani_monaj/
4
- Tags: Persian, Farsi, Jalali, Date, Calendar, i18n, l10n
5
  Requires at least: 2.1
6
- Tested up to: 2.7-bleeding
7
- Stable tag: 4.1
8
 
9
  Turn you Wordpress into a full featured Persian (Iranian) Blogging Platform.
10
 
1
  === wp-jalali ===
2
  Contributors: mani_monaj, Gonahkar
3
  Donate link: http://www.wishlistr.com/mani_monaj/
4
+ Tags: Persian, Farsi, Jalali, Date, Calendar, i18n, l10n, Iran, Iranian
5
  Requires at least: 2.1
6
+ Tested up to: 2.8-bleeding
7
+ Stable tag: 4.2
8
 
9
  Turn you Wordpress into a full featured Persian (Iranian) Blogging Platform.
10
 
screenshot-1.png CHANGED
Binary file
wp-jalali.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: wp-jalali
4
  Plugin URI: http://wp-persian.com/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.1
7
  Author: Vali Allah(Mani) Monajjemi
8
  Author URI: http://www.manionline.org/
9
  */
@@ -50,7 +50,7 @@ require_once(MPS_JD_DIR.'/inc/farsinum-core.php');
50
  require_once(MPS_JD_DIR.'/inc/dashboard-core.php');
51
  require_once(MPS_JD_DIR.'/inc/widgets-core.php');
52
  require_once(MPS_JD_DIR.'/inc/editjalali-core.php');
53
-
54
 
55
  /* Menu Init */
56
 
@@ -167,10 +167,10 @@ function mps_jd_optionpage(){
167
  <?php
168
  $logo_uri = MPS_JD_URI.'/images/wp-fa-logo.png';
169
  ?>
170
- <div id="wpbody" style="direction:rtl; text-align: right">
171
  <div class="wrap" style="direction:rtl; text-align: right">
172
  <p style="text-align:center">
173
- <a href="http://wp-persian.com" style="border:none" title="وردپرس فارسی"><img src="<?=$logo_uri?>" alt="Persian Wordpress Logo" width="300" height="70" border="0"/></a>
174
  </p>
175
  <form method="post">
176
  <input type="hidden" name="action" value="update" />
@@ -374,7 +374,7 @@ endfor;
374
 
375
 
376
  <p class="submit">
377
- <input type="submit" name="Submit" value="به روز رسانی &raquo;" />
378
  </p>
379
  </form>
380
 
@@ -1237,8 +1237,8 @@ function mps_mce_set_direction( $input ) {
1237
 
1238
  function mps_farsikeyboard() {
1239
  /* Simple API for adding farsitype.js to themes */
1240
- if (!file_exists(MPS_JD_DIR . '/inc/farsitype.js') ) return;
1241
- $script_uri = MPS_JD_URI.'/farsitype.js';
1242
  echo "<script language=\"javascript\" src=\"$script_uri\" type=\"text/javascript\"></script>";
1243
 
1244
  }
@@ -1269,11 +1269,23 @@ if (version_compare($_wp_version, '2', '<')) {
1269
  }
1270
  }
1271
 
 
 
 
 
 
 
 
 
 
 
 
 
1272
  /* Tags */
1273
 
1274
  /*
1275
  function mps_loadjs() {
1276
- //wp_enqueue_script( 'jalalitags', MPS_JD_URI . '/inc/tags.js', array('jquery'), '1.1');
1277
  }
1278
  */
1279
 
@@ -1299,6 +1311,8 @@ $mps_jd_editjalali = $mps_jd_optionsDB['mps_jd_editjalali'];
1299
  if ($mps_jd_autodate) {
1300
  add_filter("the_date","mps_the_jdate",10,4);
1301
  add_filter("the_time","mps_the_jtime",10,4);
 
 
1302
  add_filter("get_comment_date","mps_comment_jdate",10,2); //works only in wp > 1.5.1
1303
  add_filter("get_comment_time","mps_comment_jtime",10,2); //works only in wp > 1.5.1
1304
  add_filter("the_weekday","mps_the_jweekday");
@@ -1357,6 +1371,12 @@ if (!version_compare($_wp_version, '2.4', '<')) { //Wordpress 2.5+ Only
1357
 
1358
  }
1359
 
 
 
 
 
 
 
1360
  /* Theme Widgets */
1361
 
1362
  add_action('widgets_init', 'widget_jarchive_init');
3
  Plugin Name: wp-jalali
4
  Plugin URI: http://wp-persian.com/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.2
7
  Author: Vali Allah(Mani) Monajjemi
8
  Author URI: http://www.manionline.org/
9
  */
50
  require_once(MPS_JD_DIR.'/inc/dashboard-core.php');
51
  require_once(MPS_JD_DIR.'/inc/widgets-core.php');
52
  require_once(MPS_JD_DIR.'/inc/editjalali-core.php');
53
+ //require_once(MPS_JD_DIR.'/inc/tinymce-button.php');
54
 
55
  /* Menu Init */
56
 
167
  <?php
168
  $logo_uri = MPS_JD_URI.'/images/wp-fa-logo.png';
169
  ?>
170
+ <div id="wpbody-content" style="direction:rtl; text-align: right">
171
  <div class="wrap" style="direction:rtl; text-align: right">
172
  <p style="text-align:center">
173
+ <a href="http://wp-persian.com" style="border:none" title="وردپرس فارسی"><img src="<?=$logo_uri?>" alt="Persian Wordpress Logo" border="0"/></a>
174
  </p>
175
  <form method="post">
176
  <input type="hidden" name="action" value="update" />
374
 
375
 
376
  <p class="submit">
377
+ <input class="button-primary" type="submit" name="Submit" value="به روز رسانی &raquo;" />
378
  </p>
379
  </form>
380
 
1237
 
1238
  function mps_farsikeyboard() {
1239
  /* Simple API for adding farsitype.js to themes */
1240
+ if (!file_exists(MPS_JD_DIR . '/inc/js/farsitype.js') ) return;
1241
+ $script_uri = MPS_JD_URI.'/inc/js/farsitype.js';
1242
  echo "<script language=\"javascript\" src=\"$script_uri\" type=\"text/javascript\"></script>";
1243
 
1244
  }
1269
  }
1270
  }
1271
 
1272
+ /* Login Form Functions */
1273
+ function login_url() {
1274
+ return 'http://wp-persian.com';
1275
+ }
1276
+ function login_text() {
1277
+ return 'با نیروی وردپرس فارسی';
1278
+ }
1279
+
1280
+ function login_img() {
1281
+ echo '<style>#login h1 a {background: transparent url(wp-content/plugins/wp-jalali/images/wp-fa-logo.png) no-repeat scroll center top}</style>';
1282
+ }
1283
+
1284
  /* Tags */
1285
 
1286
  /*
1287
  function mps_loadjs() {
1288
+ //wp_enqueue_script( 'jalalitags', MPS_JD_URI . '/inc/js/tags.js', array('jquery'), '1.1');
1289
  }
1290
  */
1291
 
1311
  if ($mps_jd_autodate) {
1312
  add_filter("the_date","mps_the_jdate",10,4);
1313
  add_filter("the_time","mps_the_jtime",10,4);
1314
+ //add_filter("get_the_date","mps_the_jdate",10,4);
1315
+ //add_filter("get_the_time","mps_the_jtime",10,4);
1316
  add_filter("get_comment_date","mps_comment_jdate",10,2); //works only in wp > 1.5.1
1317
  add_filter("get_comment_time","mps_comment_jtime",10,2); //works only in wp > 1.5.1
1318
  add_filter("the_weekday","mps_the_jweekday");
1371
 
1372
  }
1373
 
1374
+ /* Login Form */
1375
+
1376
+ add_filter('login_headerurl', 'login_url');
1377
+ add_filter('login_headertitle', 'login_text');
1378
+ add_action('login_head', 'login_img');
1379
+
1380
  /* Theme Widgets */
1381
 
1382
  add_action('widgets_init', 'widget_jarchive_init');