Advanced Custom Fields: Table Field - Version 1.3.9

Version Description

  • Fixes broken ACF select field styles in WordPress 5.3.
  • Fixes an issue when adding or removing columns using update_field().
Download this release

Release Info

Developer Jonua
Plugin Icon 128x128 Advanced Custom Fields: Table Field
Version 1.3.9
Comparing to
See all releases

Code changes from version 1.3.8 to 1.3.9

acf-table-v4.php CHANGED
@@ -37,7 +37,7 @@
37
  // settings
38
  $this->settings = array(
39
  'dir_url' => plugins_url( '', __FILE__ ) . '/',
40
- 'version' => '1.3.8',
41
  );
42
 
43
  // PREVENTS SAVING INVALID TABLE FIELD JSON DATA {
37
  // settings
38
  $this->settings = array(
39
  'dir_url' => plugins_url( '', __FILE__ ) . '/',
40
+ 'version' => '1.3.9',
41
  );
42
 
43
  // PREVENTS SAVING INVALID TABLE FIELD JSON DATA {
acf-table-v5.php CHANGED
@@ -21,7 +21,7 @@ class acf_field_table extends acf_field {
21
  * settings (array) Array of settings
22
  */
23
  $this->settings = array(
24
- 'version' => '1.3.8',
25
  'dir_url' => plugins_url( '', __FILE__ ) . '/',
26
  );
27
 
@@ -475,12 +475,37 @@ class acf_field_table extends acf_field {
475
  $data['b'] = $value['body'];
476
  }
477
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
478
  $value = $data;
479
  }
480
 
481
  // }
482
 
483
- // $post_id is integer when post is saved, $post_id is string when block is saved
484
  if ( gettype( $post_id ) === 'integer' ) {
485
 
486
  // only saving a post needs addslashes
21
  * settings (array) Array of settings
22
  */
23
  $this->settings = array(
24
+ 'version' => '1.3.9',
25
  'dir_url' => plugins_url( '', __FILE__ ) . '/',
26
  );
27
 
475
  $data['b'] = $value['body'];
476
  }
477
 
478
+ // SYNCHRONICE TOP ROW DATA WITH CHANGED AMOUNT OF BODY COLUMNS {
479
+
480
+ $new_amount_of_body_cols = count( $value['body'][0] );
481
+ $db_amount_of_top_cols = count( $data['c'] );
482
+
483
+ if ( $new_amount_of_body_cols > $db_amount_of_top_cols ) {
484
+
485
+ for ( $i = $db_amount_of_top_cols; $i < $new_amount_of_body_cols; $i++ ) {
486
+
487
+ // adds a column entry in top row data
488
+ array_push( $data['c'], array( 'p' => '' ) );
489
+ }
490
+ }
491
+
492
+ if ( $new_amount_of_body_cols < $db_amount_of_top_cols ) {
493
+
494
+ for ( $i = $new_amount_of_body_cols; $i < $db_amount_of_top_cols; $i++ ) {
495
+
496
+ // removes a column entry in top row data
497
+ array_shift( $data['c'] );
498
+ }
499
+ }
500
+
501
+ // }
502
+
503
  $value = $data;
504
  }
505
 
506
  // }
507
 
508
+ // $post_id is integer when post is saved, $post_id is string when block is saved
509
  if ( gettype( $post_id ) === 'integer' ) {
510
 
511
  // only saving a post needs addslashes
acf-table.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Advanced Custom Fields: Table Field
4
  Plugin URI: http://www.johannheyne.de/
5
  Description: This free Add-on adds a table field type for the Advanced Custom Fields plugin.
6
- Version: 1.3.8
7
  Author: Johann Heyne
8
  Author URI: http://www.johannheyne.de/
9
  License: GPLv2 or later
3
  Plugin Name: Advanced Custom Fields: Table Field
4
  Plugin URI: http://www.johannheyne.de/
5
  Description: This free Add-on adds a table field type for the Advanced Custom Fields plugin.
6
+ Version: 1.3.9
7
  Author: Johann Heyne
8
  Author URI: http://www.johannheyne.de/
9
  License: GPLv2 or later
changelog.txt CHANGED
@@ -1,6 +1,6 @@
1
  == Changelog ==
2
 
3
- = 1.3.8 =
4
  * Fixes an issue where option "use header" was not applied on updating a field with update_field().
5
  * Fixes an issue where percent characters in a table field content causes an JavaScript error.
6
 
1
  == Changelog ==
2
 
3
+ = 1.3.9 =
4
  * Fixes an issue where option "use header" was not applied on updating a field with update_field().
5
  * Fixes an issue where percent characters in a table field content causes an JavaScript error.
6
 
css/input.css CHANGED
@@ -46,7 +46,7 @@
46
  display: table-cell;
47
  padding: 4px 8px;
48
  border: 1px solid #e1e1e1;
49
- background-color: #eee;
50
  cursor: move;
51
  min-width: 68px;
52
  }
@@ -193,7 +193,7 @@
193
  line-height: 0 !important;
194
  width: 16px !important;
195
  padding: 0 !important;
196
- //border: 0 !important;
197
  background: none !important;
198
  border-left: none;
199
  }
@@ -209,8 +209,8 @@
209
  font-size: 0 !important;
210
  line-height: 0 !important;
211
  height: 16px !important;
212
- //padding: 0 !important;
213
- //border: 0 !important;
214
  background: none !important;
215
  border-top: none;
216
  }
@@ -327,8 +327,9 @@
327
  padding-top: 10px;
328
  }
329
 
330
- .acf-table-fc-opt-use-header{
331
  width: auto !important;
 
332
  }
333
 
334
  .acf-table-fc-opt-caption {
46
  display: table-cell;
47
  padding: 4px 8px;
48
  border: 1px solid #e1e1e1;
49
+ background-color: #eee;
50
  cursor: move;
51
  min-width: 68px;
52
  }
193
  line-height: 0 !important;
194
  width: 16px !important;
195
  padding: 0 !important;
196
+ /*border: 0 !important;*/
197
  background: none !important;
198
  border-left: none;
199
  }
209
  font-size: 0 !important;
210
  line-height: 0 !important;
211
  height: 16px !important;
212
+ /*padding: 0 !important;
213
+ border: 0 !important;*/
214
  background: none !important;
215
  border-top: none;
216
  }
327
  padding-top: 10px;
328
  }
329
 
330
+ .acf-table-fc-opt-use-header {
331
  width: auto !important;
332
+ padding: 3px 24px 3px 8px !important; /* fixes ACF padding 2px for select fields */
333
  }
334
 
335
  .acf-table-fc-opt-caption {
js/input-v4.js CHANGED
@@ -4,7 +4,7 @@
4
 
5
  var t = this;
6
 
7
- t.version = '1.3.8';
8
 
9
  t.param = {};
10
 
4
 
5
  var t = this;
6
 
7
+ t.version = '1.3.9';
8
 
9
  t.param = {};
10
 
js/input-v5.js CHANGED
@@ -4,7 +4,7 @@
4
 
5
  var t = this;
6
 
7
- t.version = '1.3.8';
8
 
9
  t.param = {};
10
 
4
 
5
  var t = this;
6
 
7
+ t.version = '1.3.9';
8
 
9
  t.param = {};
10
 
lang/acf-table-da_DK.po CHANGED
@@ -38,10 +38,10 @@ msgid ""
38
  msgstr ""
39
 
40
  #. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
41
- #. Fields: Table Field 1.3.8) #-#-#-#-#
42
  #. Plugin URI of the plugin/theme
43
  #. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
44
- #. Fields: Table Field 1.3.8) #-#-#-#-#
45
  #. Author URI of the plugin/theme
46
  msgid "http://www.johannheyne.de/"
47
  msgstr "http://www.johannheyne.de/"
38
  msgstr ""
39
 
40
  #. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
41
+ #. Fields: Table Field 1.3.9) #-#-#-#-#
42
  #. Plugin URI of the plugin/theme
43
  #. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
44
+ #. Fields: Table Field 1.3.9) #-#-#-#-#
45
  #. Author URI of the plugin/theme
46
  msgid "http://www.johannheyne.de/"
47
  msgstr "http://www.johannheyne.de/"
lang/acf-table-de_DE.po CHANGED
@@ -38,10 +38,10 @@ msgstr ""
38
  "Tabellen Feldtype hinzu."
39
 
40
  #. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
41
- #. Fields: Table Field 1.3.8) #-#-#-#-#
42
  #. Plugin URI of the plugin/theme
43
  #. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
44
- #. Fields: Table Field 1.3.8) #-#-#-#-#
45
  #. Author URI of the plugin/theme
46
  msgid "http://www.johannheyne.de/"
47
  msgstr "http://www.johannheyne.de/"
38
  "Tabellen Feldtype hinzu."
39
 
40
  #. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
41
+ #. Fields: Table Field 1.3.9) #-#-#-#-#
42
  #. Plugin URI of the plugin/theme
43
  #. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
44
+ #. Fields: Table Field 1.3.9) #-#-#-#-#
45
  #. Author URI of the plugin/theme
46
  msgid "http://www.johannheyne.de/"
47
  msgstr "http://www.johannheyne.de/"
lang/acf-table-pl_PL.po CHANGED
@@ -36,10 +36,10 @@ msgid ""
36
  msgstr ""
37
 
38
  #. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
39
- #. Fields: Table Field 1.3.8) #-#-#-#-#
40
  #. Plugin URI of the plugin/theme
41
  #. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
42
- #. Fields: Table Field 1.3.8) #-#-#-#-#
43
  #. Author URI of the plugin/theme
44
  msgid "http://www.johannheyne.de/"
45
  msgstr ""
36
  msgstr ""
37
 
38
  #. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
39
+ #. Fields: Table Field 1.3.9) #-#-#-#-#
40
  #. Plugin URI of the plugin/theme
41
  #. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
42
+ #. Fields: Table Field 1.3.9) #-#-#-#-#
43
  #. Author URI of the plugin/theme
44
  msgid "http://www.johannheyne.de/"
45
  msgstr ""
lang/acf-table.pot CHANGED
@@ -32,10 +32,10 @@ msgid "This free Add-on adds a table field type for the Advanced Custom Fields p
32
  msgstr ""
33
 
34
  #. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
35
- #. Fields: Table Field 1.3.8) #-#-#-#-#
36
  #. Plugin URI of the plugin/theme
37
  #. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
38
- #. Fields: Table Field 1.3.8) #-#-#-#-#
39
  #. Author URI of the plugin/theme
40
  msgid "http://www.johannheyne.de/"
41
  msgstr ""
32
  msgstr ""
33
 
34
  #. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
35
+ #. Fields: Table Field 1.3.9) #-#-#-#-#
36
  #. Plugin URI of the plugin/theme
37
  #. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
38
+ #. Fields: Table Field 1.3.9) #-#-#-#-#
39
  #. Author URI of the plugin/theme
40
  msgid "http://www.johannheyne.de/"
41
  msgstr ""
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Advanced Custom Fields: Table Field ===
2
  Contributors: jonua
3
  Tags: acf table
4
- Requires at least: 5.2.0
5
- Tested up to: 5.2.3
6
- Stable tag: 1.3.8
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
 
@@ -309,6 +309,10 @@ However, only when activated as a plugin will updates be available.
309
 
310
  == Changelog ==
311
 
 
 
 
 
312
  = 1.3.8 =
313
  * Fixes an issue where the option "use header" was not applied on updating a field with update_field().
314
  * Fixes an issue where percent characters in a table field content causes an JavaScript error.
1
  === Advanced Custom Fields: Table Field ===
2
  Contributors: jonua
3
  Tags: acf table
4
+ Requires at least: 5.3
5
+ Tested up to: 5.3
6
+ Stable tag: 1.3.9
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
 
309
 
310
  == Changelog ==
311
 
312
+ = 1.3.9 =
313
+ * Fixes broken ACF select field styles in WordPress 5.3.
314
+ * Fixes an issue when adding or removing columns using update_field().
315
+
316
  = 1.3.8 =
317
  * Fixes an issue where the option "use header" was not applied on updating a field with update_field().
318
  * Fixes an issue where percent characters in a table field content causes an JavaScript error.