Advanced Custom Fields: Table Field - Version 1.3.5

Version Description

Fixes an issue that removes table header content using update_field() while option "use header" is set to "no". * Fixes an issue with the update_post_metadata filter

Download this release

Release Info

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

Code changes from version 1.3.4 to 1.3.5

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.4',
41
);
42
43
// PREVENTS SAVING INVALID TABLE FIELD JSON DATA {
@@ -66,6 +66,8 @@
66
}
67
}
68
69
}, 10, 5 );
70
}
71
@@ -300,7 +302,7 @@
300
// IF BODY DATA
301
302
if (
303
- null !== $a['b'] &&
304
count( $a['b'] ) > 0
305
) {
306
@@ -383,12 +385,26 @@
383
384
$data = get_post_meta( $post_id, $field['name'], true );
385
386
if ( is_string( $data ) ) {
387
388
$data = json_decode( $data, true );
389
}
390
391
- if ( isset( $value['header'] ) ) {
392
393
$data['h'] = $value['header'];
394
}
37
// settings
38
$this->settings = array(
39
'dir_url' => plugins_url( '', __FILE__ ) . '/',
40
+ 'version' => '1.3.5',
41
);
42
43
// PREVENTS SAVING INVALID TABLE FIELD JSON DATA {
66
}
67
}
68
69
+ return $x;
70
+
71
}, 10, 5 );
72
}
73
302
// IF BODY DATA
303
304
if (
305
+ ! empty( $a['b'] ) AND
306
count( $a['b'] ) > 0
307
) {
308
385
386
$data = get_post_meta( $post_id, $field['name'], true );
387
388
+ // prevents updating a field, thats data are not defined yet
389
+ if ( empty( $data ) ) {
390
+
391
+ return false;
392
+ }
393
+
394
if ( is_string( $data ) ) {
395
396
$data = json_decode( $data, true );
397
}
398
399
+ if ( isset( $value['caption'] ) ) {
400
+
401
+ $data['p']['ca'] = $value['caption'];
402
+ }
403
+
404
+ if (
405
+ isset( $value['header'] ) AND
406
+ $value['header'] !== false
407
+ ) {
408
409
$data['h'] = $value['header'];
410
}
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.4',
25
'dir_url' => plugins_url( '', __FILE__ ) . '/',
26
);
27
@@ -89,6 +89,8 @@ class acf_field_table extends acf_field {
89
}
90
}
91
92
}, 10, 5 );
93
}
94
@@ -439,12 +441,26 @@ class acf_field_table extends acf_field {
439
440
$data = get_post_meta( $post_id, $field['name'], true );
441
442
if ( is_string( $data ) ) {
443
444
$data = json_decode( $data, true );
445
}
446
447
- if ( isset( $value['header'] ) ) {
448
449
$data['h'] = $value['header'];
450
}
@@ -503,7 +519,7 @@ class acf_field_table extends acf_field {
503
// IF BODY DATA
504
505
if (
506
- null !== $a['b'] &&
507
count( $a['b'] ) > 0
508
) {
509
21
* settings (array) Array of settings
22
*/
23
$this->settings = array(
24
+ 'version' => '1.3.5',
25
'dir_url' => plugins_url( '', __FILE__ ) . '/',
26
);
27
89
}
90
}
91
92
+ return $x;
93
+
94
}, 10, 5 );
95
}
96
441
442
$data = get_post_meta( $post_id, $field['name'], true );
443
444
+ // prevents updating a field, thats data are not defined yet
445
+ if ( empty( $data ) ) {
446
+
447
+ return false;
448
+ }
449
+
450
if ( is_string( $data ) ) {
451
452
$data = json_decode( $data, true );
453
}
454
455
+ if ( isset( $value['caption'] ) ) {
456
+
457
+ $data['p']['ca'] = $value['caption'];
458
+ }
459
+
460
+ if (
461
+ isset( $value['header'] ) AND
462
+ $value['header'] !== false
463
+ ) {
464
465
$data['h'] = $value['header'];
466
}
519
// IF BODY DATA
520
521
if (
522
+ ! empty( $a['b'] ) AND
523
count( $a['b'] ) > 0
524
) {
525
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.4
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.5
7
Author: Johann Heyne
8
Author URI: http://www.johannheyne.de/
9
License: GPLv2 or later
changelog.txt CHANGED
@@ -1,16 +1,20 @@
1
== Changelog ==
2
3
= 1.3.4 =
4
* Fixes an issue that prevents the removal of table contents
5
6
= 1.3.3 =
7
* Fixes returning empty table after saving content containing a single quote
8
9
- = 1.3.4 =
10
* Fixes returning empty table after saving content containing quotes
11
* Fixes an issue using update_field() on a table field
12
13
- = 1.3.4 =
14
* Changes table data storing format from JSON string to serialized array. This is due to an issue caused by third party plugins using update_post_meta() without providing wp_slash() to the value before. Existing table data values in JSON string format in the database will still exists and be compatible. When a field is saved again, the storage format changes from JSON to serialized array.
15
* Fixes an PHP error of table caption
16
1
== Changelog ==
2
3
+ = 1.3.5 =
4
+ * Fixes an issue that removes table header content using update_field() while option "use header" is set to "no".
5
+ * Fixes an issue with the update_post_metadata filter
6
+
7
= 1.3.4 =
8
* Fixes an issue that prevents the removal of table contents
9
10
= 1.3.3 =
11
* Fixes returning empty table after saving content containing a single quote
12
13
+ = 1.3.5 =
14
* Fixes returning empty table after saving content containing quotes
15
* Fixes an issue using update_field() on a table field
16
17
+ = 1.3.5 =
18
* Changes table data storing format from JSON string to serialized array. This is due to an issue caused by third party plugins using update_post_meta() without providing wp_slash() to the value before. Existing table data values in JSON string format in the database will still exists and be compatible. When a field is saved again, the storage format changes from JSON to serialized array.
19
* Fixes an PHP error of table caption
20
js/input-v4.js CHANGED
@@ -4,7 +4,7 @@
4
5
var t = this;
6
7
- t.version = '1.3.4';
8
9
t.param = {};
10
4
5
var t = this;
6
7
+ t.version = '1.3.5';
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.4';
8
9
t.param = {};
10
4
5
var t = this;
6
7
+ t.version = '1.3.5';
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.4) #-#-#-#-#
42
#. Plugin URI of the plugin/theme
43
#. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
44
- #. Fields: Table Field 1.3.4) #-#-#-#-#
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.5) #-#-#-#-#
42
#. Plugin URI of the plugin/theme
43
#. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
44
+ #. Fields: Table Field 1.3.5) #-#-#-#-#
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.4) #-#-#-#-#
42
#. Plugin URI of the plugin/theme
43
#. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
44
- #. Fields: Table Field 1.3.4) #-#-#-#-#
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.5) #-#-#-#-#
42
#. Plugin URI of the plugin/theme
43
#. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
44
+ #. Fields: Table Field 1.3.5) #-#-#-#-#
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.4) #-#-#-#-#
40
#. Plugin URI of the plugin/theme
41
#. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
42
- #. Fields: Table Field 1.3.4) #-#-#-#-#
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.5) #-#-#-#-#
40
#. Plugin URI of the plugin/theme
41
#. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
42
+ #. Fields: Table Field 1.3.5) #-#-#-#-#
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.4) #-#-#-#-#
36
#. Plugin URI of the plugin/theme
37
#. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
38
- #. Fields: Table Field 1.3.4) #-#-#-#-#
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.5) #-#-#-#-#
36
#. Plugin URI of the plugin/theme
37
#. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
38
+ #. Fields: Table Field 1.3.5) #-#-#-#-#
39
#. Author URI of the plugin/theme
40
msgid "http://www.johannheyne.de/"
41
msgstr ""
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: jonua
3
Tags: acf table
4
Requires at least: 5.0.3
5
Tested up to: 5.1
6
- Stable tag: 1.3.4
7
Requires PHP: 5.6
8
License: GPLv2 or later
9
@@ -171,7 +171,7 @@ For now the way to go is using the Elementors shortcode Widget. Before you can u
171
172
if ( $table ) {
173
174
- $return .= '<table class="' . $table['table-class'] . '" border="0">';
175
176
if ( ! empty( $table['caption'] ) ) {
177
@@ -310,11 +310,19 @@ However, only when activated as a plugin will updates be available.
310
311
== Upgrade Notice ==
312
313
= 1.3.4 =
314
Fixes an issue that prevents the removal of table contents.
315
316
== Changelog ==
317
318
= 1.3.4 =
319
* Fixes an issue that prevents the removal of table contents
320
3
Tags: acf table
4
Requires at least: 5.0.3
5
Tested up to: 5.1
6
+ Stable tag: 1.3.5
7
Requires PHP: 5.6
8
License: GPLv2 or later
9
171
172
if ( $table ) {
173
174
+ $return .= '<table class="' . $a['table-class'] . '" border="0">';
175
176
if ( ! empty( $table['caption'] ) ) {
177
310
311
== Upgrade Notice ==
312
313
+ = 1.3.5 =
314
+ Fixes an issue that removes table header content using update_field() while option "use header" is set to "no".
315
+ * Fixes an issue with the update_post_metadata filter
316
+
317
= 1.3.4 =
318
Fixes an issue that prevents the removal of table contents.
319
320
== Changelog ==
321
322
+ = 1.3.5 =
323
+ * Fixes an issue that removes table header content using update_field() while option "use header" is set to "no".
324
+ * Fixes an issue with the update_post_metadata filter
325
+
326
= 1.3.4 =
327
* Fixes an issue that prevents the removal of table contents
328