Advanced Custom Fields: Table Field - Version 1.3.1-beta3

Version Description

= 1.3.2 = * Adds support for ACF Gutenberg blocks

= 1.3.0 = * Adds support for table caption * Still supports version 4 of ACF

= 1.2.6 = Fixes an PHP error and improves JavaScript code.

Download this release

Release Info

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

Code changes from version 1.3.1-beta2 to 1.3.1-beta3

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.1',
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.2',
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.1',
25
'dir_url' => plugins_url( '', __FILE__ ) . '/',
26
);
27
21
* settings (array) Array of settings
22
*/
23
$this->settings = array(
24
+ 'version' => '1.3.2',
25
'dir_url' => plugins_url( '', __FILE__ ) . '/',
26
);
27
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.1
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.2
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.1 =
4
* Adds support for ACF Gutenberg blocks
5
6
= 1.3.0 =
1
== Changelog ==
2
3
+ = 1.3.2 =
4
* Adds support for ACF Gutenberg blocks
5
6
= 1.3.0 =
js/input-v4.js CHANGED
@@ -4,7 +4,7 @@
4
5
var t = this;
6
7
- t.version = '1.3.1';
8
9
t.param = {};
10
4
5
var t = this;
6
7
+ t.version = '1.3.2';
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.1';
8
9
t.param = {};
10
4
5
var t = this;
6
7
+ t.version = '1.3.2';
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.1) #-#-#-#-#
42
#. Plugin URI of the plugin/theme
43
#. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
44
- #. Fields: Table Field 1.3.1) #-#-#-#-#
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.2) #-#-#-#-#
42
#. Plugin URI of the plugin/theme
43
#. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
44
+ #. Fields: Table Field 1.3.2) #-#-#-#-#
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.1) #-#-#-#-#
42
#. Plugin URI of the plugin/theme
43
#. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
44
- #. Fields: Table Field 1.3.1) #-#-#-#-#
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.2) #-#-#-#-#
42
#. Plugin URI of the plugin/theme
43
#. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
44
+ #. Fields: Table Field 1.3.2) #-#-#-#-#
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.1) #-#-#-#-#
40
#. Plugin URI of the plugin/theme
41
#. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
42
- #. Fields: Table Field 1.3.1) #-#-#-#-#
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.2) #-#-#-#-#
40
#. Plugin URI of the plugin/theme
41
#. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
42
+ #. Fields: Table Field 1.3.2) #-#-#-#-#
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.1) #-#-#-#-#
36
#. Plugin URI of the plugin/theme
37
#. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
38
- #. Fields: Table Field 1.3.1) #-#-#-#-#
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.2) #-#-#-#-#
36
#. Plugin URI of the plugin/theme
37
#. #-#-#-#-# advanced-custom-fields-table-field-code.pot (Advanced Custom
38
+ #. Fields: Table Field 1.3.2) #-#-#-#-#
39
#. Author URI of the plugin/theme
40
msgid "http://www.johannheyne.de/"
41
msgstr ""
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
Contributors: jonua
3
Tags: acf table
4
Requires at least: 5.0.3
5
- Tested up to: 5.0.3
6
Stable tag: 1.2.6
7
Requires PHP: 5.6
8
License: GPLv2 or later
@@ -35,7 +35,7 @@ To render the table fields data as an html table in one of your template files (
35
`
36
$table = get_field( 'your_table_field_name' );
37
38
- if ( $table ) {
39
40
echo '<table border="0">';
41
@@ -44,7 +44,7 @@ if ( $table ) {
44
echo '<caption>' . $table['caption'] . '</caption>';
45
}
46
47
- if ( $table['header'] ) {
48
49
echo '<thead>';
50
@@ -84,6 +84,17 @@ if ( $table ) {
84
}
85
`
86
87
= How to handle line breaks? =
88
89
This is about displaying line breaks in the admin tables and getting line breaks as `<br>` when outputting the tables HTML.
@@ -157,6 +168,11 @@ For now the way to go is using the Elementors shortcode Widget. Before you can u
157
158
$return .= '<table border="0">';
159
160
if ( $table['header'] ) {
161
162
$return .= '<thead>';
@@ -245,7 +261,7 @@ However, only when activated as a plugin will updates be available.
245
246
== Upgrade Notice ==
247
248
- = 1.3.1 =
249
* Adds support for ACF Gutenberg blocks
250
251
= 1.3.0 =
@@ -258,7 +274,7 @@ Fixes an PHP error and improves JavaScript code.
258
259
== Changelog ==
260
261
- = 1.3.1 =
262
* Adds support for ACF Gutenberg blocks
263
264
= 1.3.0 =
2
Contributors: jonua
3
Tags: acf table
4
Requires at least: 5.0.3
5
+ Tested up to: 5.1
6
Stable tag: 1.2.6
7
Requires PHP: 5.6
8
License: GPLv2 or later
35
`
36
$table = get_field( 'your_table_field_name' );
37
38
+ if ( ! empty ( $table ) ) {
39
40
echo '<table border="0">';
41
44
echo '<caption>' . $table['caption'] . '</caption>';
45
}
46
47
+ if ( ! empty( $table['header'] ) ) {
48
49
echo '<thead>';
50
84
}
85
`
86
87
+ = Table field returns no data on get_field()? =
88
+
89
+ If the table has only one empty cell, then `get_field()` returns `FALSE`. `get_field()` returns NULL when a field is not stored in the database. That happens when a page is copied but not their fields content. You can check both with `empty()`…
90
+
91
+ `$table = get_field( 'your_table_field_name' );
92
+
93
+ if ( ! empty( $table ) ) {
94
+ // $table is not FALSE and not NULL.
95
+ // Field exists in database and has content.
96
+ }`
97
+
98
= How to handle line breaks? =
99
100
This is about displaying line breaks in the admin tables and getting line breaks as `<br>` when outputting the tables HTML.
168
169
$return .= '<table border="0">';
170
171
+ if ( ! empty( $table['caption'] ) ) {
172
+
173
+ echo '<caption>' . $table['caption'] . '</caption>';
174
+ }
175
+
176
if ( $table['header'] ) {
177
178
$return .= '<thead>';
261
262
== Upgrade Notice ==
263
264
+ = 1.3.2 =
265
* Adds support for ACF Gutenberg blocks
266
267
= 1.3.0 =
274
275
== Changelog ==
276
277
+ = 1.3.2 =
278
* Adds support for ACF Gutenberg blocks
279
280
= 1.3.0 =