Version Description
- Fixed : Some Minor bugs
Download this release
Release Info
Developer | hannanstd |
Plugin | گرویتی فرم فارسی |
Version | 1.7.5 |
Comparing to | |
See all releases |
Code changes from version 1.7.4 to 1.7.5
- Persian_Gravityforms_By_HANNANStd.php +14 -9
- readme.txt +5 -1
Persian_Gravityforms_By_HANNANStd.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Persian Gravity Forms
|
4 |
Plugin URI: https://wordpress.org/plugins/persian-gravity-forms/
|
5 |
Description: Gravity Forms for Iranian
|
6 |
-
Version: 1.7.
|
7 |
Requires at least: 3.8
|
8 |
Author: HANNAN Ebrahimi Setoode
|
9 |
Author URI: http://www.gravityforms.ir/
|
@@ -52,7 +52,7 @@ class GravityFormsPersian {
|
|
52 |
add_action('gform_field_advanced_settings', array( $this, 'Add_Melli_Cart_Field_Setting_By_HANNANStd'), 10, 2);
|
53 |
add_action('gform_entries_first_column', array($this ,'First_Column_Actions_By_HANNANStd'), 10, 5);
|
54 |
add_action('gform_entry_post_save', array($this ,'Update_Lead_No_Gateway_By_HANNANStd'), 10, 2);
|
55 |
-
add_action(
|
56 |
|
57 |
//filters
|
58 |
add_filter('update_footer', array( $this, 'GravityForms_Footer_Left_By_HANNANStd'), 11);
|
@@ -810,7 +810,7 @@ class GravityFormsPersian {
|
|
810 |
return plugins_url( '', __FILE__ );
|
811 |
}
|
812 |
public function version(){
|
813 |
-
return '1.7.
|
814 |
}
|
815 |
public function Add_HANNANStd_Field_By_HANNANStd( $field_groups ) {
|
816 |
foreach( $field_groups as &$group ){
|
@@ -902,9 +902,10 @@ class GravityFormsPersian {
|
|
902 |
if ( !empty( $input_value ) ) {
|
903 |
if (strlen($input_value) == 8 )
|
904 |
$_POST[ "input_{$field['id']}" ] = '00'.$input_value;
|
905 |
-
|
906 |
-
$_POST[ "input_{$field['id']}" ] = '0'.$input_value;
|
907 |
-
|
|
|
908 |
}
|
909 |
}
|
910 |
}
|
@@ -1275,6 +1276,7 @@ class GravityFormsPersian {
|
|
1275 |
$result["message"] = $pm1;
|
1276 |
else
|
1277 |
$result["message"] = "کد ملی فقط باید به صورت عدد وارد شود . ";
|
|
|
1278 |
}
|
1279 |
if (self::Add_Melli_Cart_PHP_Checker_By_HANNANStd($value,$setting) == 3)
|
1280 |
{
|
@@ -1283,6 +1285,7 @@ class GravityFormsPersian {
|
|
1283 |
$result["message"] = $pm2;
|
1284 |
else
|
1285 |
$result["message"] = 'کد ملی می بایست 10 رقمی باشد . تنها در صورتی مجاز به استفاده از کد های 8 یا 9 رقمی هستید که ارقام سمت چپ 0 باشند . ';
|
|
|
1286 |
}
|
1287 |
if (self::Add_Melli_Cart_PHP_Checker_By_HANNANStd($value,$setting) == 2)
|
1288 |
{
|
@@ -1291,17 +1294,19 @@ class GravityFormsPersian {
|
|
1291 |
$result["message"] = $pm4;
|
1292 |
else
|
1293 |
$result["message"] = 'کد ملی وارد شده مطابق با استانداردهای کشور نمی باشد .';
|
|
|
1294 |
}
|
1295 |
-
if ($field["noDuplicates"] && RGFormsModel::is_duplicate($form["id"], $field, $value))
|
1296 |
{
|
1297 |
$result["is_valid"] = false;
|
1298 |
if ($pm3)
|
1299 |
$result["message"] = $pm3;
|
1300 |
else
|
1301 |
$result["message"] = 'این کد ملی توسط فرد دیگری ثبت شده است .';
|
1302 |
-
|
|
|
1303 |
}
|
1304 |
-
|
1305 |
return $result;
|
1306 |
}
|
1307 |
|
3 |
Plugin Name: Persian Gravity Forms
|
4 |
Plugin URI: https://wordpress.org/plugins/persian-gravity-forms/
|
5 |
Description: Gravity Forms for Iranian
|
6 |
+
Version: 1.7.5
|
7 |
Requires at least: 3.8
|
8 |
Author: HANNAN Ebrahimi Setoode
|
9 |
Author URI: http://www.gravityforms.ir/
|
52 |
add_action('gform_field_advanced_settings', array( $this, 'Add_Melli_Cart_Field_Setting_By_HANNANStd'), 10, 2);
|
53 |
add_action('gform_entries_first_column', array($this ,'First_Column_Actions_By_HANNANStd'), 10, 5);
|
54 |
add_action('gform_entry_post_save', array($this ,'Update_Lead_No_Gateway_By_HANNANStd'), 10, 2);
|
55 |
+
add_action('gform_pre_submission', array( $this, 'Mellicart_Pre_Submission_By_HANNANStd' ) );
|
56 |
|
57 |
//filters
|
58 |
add_filter('update_footer', array( $this, 'GravityForms_Footer_Left_By_HANNANStd'), 11);
|
810 |
return plugins_url( '', __FILE__ );
|
811 |
}
|
812 |
public function version(){
|
813 |
+
return '1.7.5';
|
814 |
}
|
815 |
public function Add_HANNANStd_Field_By_HANNANStd( $field_groups ) {
|
816 |
foreach( $field_groups as &$group ){
|
902 |
if ( !empty( $input_value ) ) {
|
903 |
if (strlen($input_value) == 8 )
|
904 |
$_POST[ "input_{$field['id']}" ] = '00'.$input_value;
|
905 |
+
elseif (strlen($input_value) == 9 )
|
906 |
+
$_POST[ "input_{$field['id']}" ] = '0'.$input_value;
|
907 |
+
else
|
908 |
+
$_POST[ "input_{$field['id']}" ] = $input_value;
|
909 |
}
|
910 |
}
|
911 |
}
|
1276 |
$result["message"] = $pm1;
|
1277 |
else
|
1278 |
$result["message"] = "کد ملی فقط باید به صورت عدد وارد شود . ";
|
1279 |
+
return $result;
|
1280 |
}
|
1281 |
if (self::Add_Melli_Cart_PHP_Checker_By_HANNANStd($value,$setting) == 3)
|
1282 |
{
|
1285 |
$result["message"] = $pm2;
|
1286 |
else
|
1287 |
$result["message"] = 'کد ملی می بایست 10 رقمی باشد . تنها در صورتی مجاز به استفاده از کد های 8 یا 9 رقمی هستید که ارقام سمت چپ 0 باشند . ';
|
1288 |
+
return $result;
|
1289 |
}
|
1290 |
if (self::Add_Melli_Cart_PHP_Checker_By_HANNANStd($value,$setting) == 2)
|
1291 |
{
|
1294 |
$result["message"] = $pm4;
|
1295 |
else
|
1296 |
$result["message"] = 'کد ملی وارد شده مطابق با استانداردهای کشور نمی باشد .';
|
1297 |
+
return $result;
|
1298 |
}
|
1299 |
+
if ($field["noDuplicates"] && ( RGFormsModel::is_duplicate($form["id"], $field, $value) || RGFormsModel::is_duplicate($form["id"], $field, '0'.$value) || RGFormsModel::is_duplicate($form["id"], $field, '00'.$value ) ))
|
1300 |
{
|
1301 |
$result["is_valid"] = false;
|
1302 |
if ($pm3)
|
1303 |
$result["message"] = $pm3;
|
1304 |
else
|
1305 |
$result["message"] = 'این کد ملی توسط فرد دیگری ثبت شده است .';
|
1306 |
+
return $result;
|
1307 |
+
}
|
1308 |
}
|
1309 |
+
|
1310 |
return $result;
|
1311 |
}
|
1312 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: gravityforms,gravity forms,persian gravity forms,persian gravityforms,grav
|
|
4 |
Donate link: http://www.webforest.ir
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.2
|
7 |
-
Stable tag: 1.7.
|
8 |
License: GPL 2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
This WordPress plugin extends the Gravity Forms plugin and its addons with the Persian language .
|
@@ -84,6 +84,8 @@ You can read complete documentations on the [GravityForms.ir](http://www.Gravity
|
|
84 |
19. Iranian National Code field Advanced setting
|
85 |
|
86 |
== Changelog ==
|
|
|
|
|
87 |
= 1.7.4 =
|
88 |
* Fixed : Some Minor bugs
|
89 |
= 1.7.3 =
|
@@ -156,6 +158,8 @@ You can read complete documentations on the [GravityForms.ir](http://www.Gravity
|
|
156 |
* First version
|
157 |
|
158 |
== Upgrade Notice ==
|
|
|
|
|
159 |
= 1.7.4 =
|
160 |
* Fixed : Some Minor bugs
|
161 |
= 1.7.3 =
|
4 |
Donate link: http://www.webforest.ir
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.2
|
7 |
+
Stable tag: 1.7.5
|
8 |
License: GPL 2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
This WordPress plugin extends the Gravity Forms plugin and its addons with the Persian language .
|
84 |
19. Iranian National Code field Advanced setting
|
85 |
|
86 |
== Changelog ==
|
87 |
+
= 1.7.5 =
|
88 |
+
* Fixed : Some Minor bugs
|
89 |
= 1.7.4 =
|
90 |
* Fixed : Some Minor bugs
|
91 |
= 1.7.3 =
|
158 |
* First version
|
159 |
|
160 |
== Upgrade Notice ==
|
161 |
+
= 1.7.5 =
|
162 |
+
* Fixed : Some Minor bugs
|
163 |
= 1.7.4 =
|
164 |
* Fixed : Some Minor bugs
|
165 |
= 1.7.3 =
|