Advanced Custom Fields: Table Field - Version 1.3.8

Version Description

  • Fixes an issue where the option "use header" was not applied on updating a field with update_field().
  • Fixes an issue where percent characters in a table field content causes an JavaScript error.
Download this release

Release Info

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

Code changes from version 1.3.7 to 1.3.8

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.7',
41
  );
42
 
43
  // PREVENTS SAVING INVALID TABLE FIELD JSON DATA {
@@ -396,6 +396,11 @@
396
  $data = json_decode( $data, true );
397
  }
398
 
 
 
 
 
 
399
  if ( isset( $value['caption'] ) ) {
400
 
401
  $data['p']['ca'] = $value['caption'];
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 {
396
  $data = json_decode( $data, true );
397
  }
398
 
399
+ if ( isset( $value['use_header'] ) ) {
400
+
401
+ $data['p']['o']['uh'] = 1;
402
+ }
403
+
404
  if ( isset( $value['caption'] ) ) {
405
 
406
  $data['p']['ca'] = $value['caption'];
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.7',
25
  'dir_url' => plugins_url( '', __FILE__ ) . '/',
26
  );
27
 
@@ -452,6 +452,11 @@ class acf_field_table extends acf_field {
452
  $data = json_decode( $data, true );
453
  }
454
 
 
 
 
 
 
455
  if ( isset( $value['caption'] ) ) {
456
 
457
  $data['p']['ca'] = $value['caption'];
@@ -475,7 +480,12 @@ class acf_field_table extends acf_field {
475
 
476
  // }
477
 
478
- $value = $this->table_slash( $value );
 
 
 
 
 
479
 
480
  return $value;
481
  }
21
  * settings (array) Array of settings
22
  */
23
  $this->settings = array(
24
+ 'version' => '1.3.8',
25
  'dir_url' => plugins_url( '', __FILE__ ) . '/',
26
  );
27
 
452
  $data = json_decode( $data, true );
453
  }
454
 
455
+ if ( isset( $value['use_header'] ) ) {
456
+
457
+ $data['p']['o']['uh'] = 1;
458
+ }
459
+
460
  if ( isset( $value['caption'] ) ) {
461
 
462
  $data['p']['ca'] = $value['caption'];
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
487
+ $value = $this->table_slash( $value );
488
+ }
489
 
490
  return $value;
491
  }
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.7
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.8
7
  Author: Johann Heyne
8
  Author URI: http://www.johannheyne.de/
9
  License: GPLv2 or later
changelog.txt CHANGED
@@ -1,5 +1,9 @@
1
  == Changelog ==
2
 
 
 
 
 
3
  = 1.3.7 =
4
  * Fixes an issue where the table header was not displayed on a page preview.
5
 
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
+
7
  = 1.3.7 =
8
  * Fixes an issue where the table header was not displayed on a page preview.
9
 
js/input-v4.js CHANGED
@@ -4,7 +4,7 @@
4
 
5
  var t = this;
6
 
7
- t.version = '1.3.7';
8
 
9
  t.param = {};
10
 
4
 
5
  var t = this;
6
 
7
+ t.version = '1.3.8';
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.7';
8
 
9
  t.param = {};
10
 
@@ -317,22 +317,21 @@
317
 
318
  if ( p.field_context === 'block' ) {
319
 
320
- p.data = $.parseJSON( decodeURIComponent( decodeURIComponent( val.replace(/\+/g, '%20') ) ) );
321
  }
322
  }
323
  catch (e) {
324
 
325
  if ( p.field_context === 'box' ) {
326
 
327
- console.log( 'The tablefield value is not a valid JSON string:', decodeURIComponent( val.replace(/\+/g, '%20') ) );
328
  console.log( 'The parsing error:', e );
 
329
  }
330
 
331
  if ( p.field_context === 'block' ) {
332
 
333
- console.log( 'The tablefield value is not a valid JSON string:', decodeURIComponent( decodeURIComponent( val.replace(/\+/g, '%20') ) ) );
334
- console.log( 'The tablefield value is not a valid JSON string:', decodeURIComponent( decodeURIComponent( decodeURIComponent( val.replace(/\+/g, '%20') ) ) ) );
335
  console.log( 'The parsing error:', e );
 
336
  }
337
  }
338
 
4
 
5
  var t = this;
6
 
7
+ t.version = '1.3.8';
8
 
9
  t.param = {};
10
 
317
 
318
  if ( p.field_context === 'block' ) {
319
 
320
+ p.data = $.parseJSON( decodeURIComponent( val.replace(/\+/g, '%20') ) );
321
  }
322
  }
323
  catch (e) {
324
 
325
  if ( p.field_context === 'box' ) {
326
 
 
327
  console.log( 'The parsing error:', e );
328
+ console.log( 'The tablefield value is not a valid JSON string:', decodeURIComponent( val.replace(/\+/g, '%20') ) );
329
  }
330
 
331
  if ( p.field_context === 'block' ) {
332
 
 
 
333
  console.log( 'The parsing error:', e );
334
+ console.log( 'The tablefield value is not a valid JSON string:', decodeURIComponent( val.replace(/\+/g, '%20') ) );
335
  }
336
  }
337
 
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.7) #-#-#-#-#
42
  #. Plugin URI of the plugin/theme
43
  #. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
44
- #. Fields: Table Field 1.3.7) #-#-#-#-#
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.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/"
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.7) #-#-#-#-#
42
  #. Plugin URI of the plugin/theme
43
  #. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
44
- #. Fields: Table Field 1.3.7) #-#-#-#-#
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.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/"
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.7) #-#-#-#-#
40
  #. Plugin URI of the plugin/theme
41
  #. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
42
- #. Fields: Table Field 1.3.7) #-#-#-#-#
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.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 ""
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.7) #-#-#-#-#
36
  #. Plugin URI of the plugin/theme
37
  #. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
38
- #. Fields: Table Field 1.3.7) #-#-#-#-#
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.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 ""
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: jonua
3
  Tags: acf table
4
  Requires at least: 5.2.0
5
- Tested up to: 5.2.2
6
- Stable tag: 1.3.7
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
 
@@ -15,7 +15,7 @@ The Table Field Plugin enhances the functionality of the ["Advanced Custom Field
15
 
16
  This plugin requires the ["Advanced Custom Fields" plugin](https://de.wordpress.org/plugins/advanced-custom-fields/) or the [Pro version](https://www.advancedcustomfields.com/pro/)!
17
 
18
- The table field works also with the repeater and flexible field types.
19
 
20
  = Features =
21
  * Table Header (Option)
@@ -26,10 +26,6 @@ The table field works also with the repeater and flexible field types.
26
  * To move to the next cells editor press key: tab
27
  * To move to the previous cells editor press key: shift + tab
28
 
29
- = ACF Pro 5.8 will introduce Blocks for Gutenberg =
30
-
31
- The Table Field will support the new [ACF Blocks for Gutenberg](https://www.advancedcustomfields.com/blog/acf-5-8-introducing-acf-blocks-for-gutenberg/). You can test it now. Download and install the latest ACF Pro 4.8 Beta available on your ACF account. Click the ***See all versions*** link alongside your license.
32
-
33
  == Frequently Asked Questions ==
34
 
35
  = How to output the table html? =
@@ -310,11 +306,13 @@ However, only when activated as a plugin will updates be available.
310
 
311
  == Upgrade Notice ==
312
 
313
- = 1.3.7 =
314
- * Fixes an issue where the table header was not displayed on a page preview.
315
 
316
  == Changelog ==
317
 
 
 
 
 
318
  = 1.3.7 =
319
  * Fixes an issue where the table header was not displayed on a page preview.
320
 
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
 
15
 
16
  This plugin requires the ["Advanced Custom Fields" plugin](https://de.wordpress.org/plugins/advanced-custom-fields/) or the [Pro version](https://www.advancedcustomfields.com/pro/)!
17
 
18
+ The table field works also with the repeater and flexible field types and supports the [ACF Blocks for Gutenberg](https://www.advancedcustomfields.com/blog/acf-5-8-introducing-acf-blocks-for-gutenberg/)
19
 
20
  = Features =
21
  * Table Header (Option)
26
  * To move to the next cells editor press key: tab
27
  * To move to the previous cells editor press key: shift + tab
28
 
 
 
 
 
29
  == Frequently Asked Questions ==
30
 
31
  = How to output the table html? =
306
 
307
  == Upgrade Notice ==
308
 
 
 
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.
315
+
316
  = 1.3.7 =
317
  * Fixes an issue where the table header was not displayed on a page preview.
318