Plugin yìí kò tíì ṣe àyẹ̀wò pẹ̀lú àwọn ìtújáde mẹ́ta pàtàkì tó kẹ́yìn ti WordPress. Ó lè jẹ́ pé a kò tọ́jú tàbí ṣe àtìlẹ́yìn fún un mọ́, ó sì lè ní àwọn ọ̀ràn ìbámu nígbà tí a bá lò ó pẹ̀lú àwọn ẹ̀yà WordPress tuntun.

ACF: Fields in Custom Table

Àpèjúwe

This ACF plugin makes it possible to store ACF data in structured database tables instead of WordPress core meta tables.

It uses ACF’s acf/update_field_group hook to create/update the database and then uses acf/save_post hook to store the data.

It was heavily inspired by Austin Ginder’s post https://anchor.host/acf-custom-fields-stored-in-custom-table/.

You can contribute to this plugin by submit PR/Issue in https://github.com/eduardo-marcolino/acf-fields-in-custom-table.

Supported Fields

  • Text
  • Text Area
  • Number
  • Range
  • Email
  • URL
  • Password
  • Image
  • File
  • Wysiwyg Editor
  • oEmbed
  • Select
  • Checkbox
  • Radio Button
  • Button Group
  • True / False
  • Date Picker
  • Date Time Picker
  • Time Picker
  • Color Picker
  • Link
  • Post Object
  • Page Link
  • Relationship
  • Taxonomy
  • User

Relational Fields

This plugin supports the following relational field types: Post Object, Page Link, Relationship, Taxonomy and User.

It can store both single and multiple values based on the multiple option.

  • If it’s a single value field, then the column type will be bigint(20) unsigned
  • If it’s a multiple value field, then the column type will be longtext and the date will be stored in json format.

You can query relational fields with multiple values using using MySQL’s function JSON_CONTAINS.
Here is an example:

Table:

+---------+-------------------+--------+
| post_id |       title       | stores |
+---------+-------------------+--------+
|       1 | Lord of the Flies | [1,2]  |
|       2 | The Island        | [2]    |
|       3 | 1984              | [3]    |
+---------+-------------------+--------+

Query:

SELECT * FROM wp_acf_books WHERE JSON_CONTAINS(stores, 2, '$')

The query above will return “Lord of the Flies” and “The Island”.

ACF Compatibility

This plugin was tested with ACF 5 FREE Version .

Àwọn àwòrán ìbòjú

  • Enabling ACF: Fields in Custom Table

Ìgbéwọlẹ̀

Setting up ACF: Fields in Custom Table is very simple. Follow these easy steps

  1. Upload the plugin to your /wp-content/plugins/ directory;
  2. Activate the plugin in your WordPress admin;
  3. Go to the Custom Fields > Field Groups menu, edit or create a field group and enable ACF: Fields in Custom Table option;

FAQ

This plugin supports custom post types?

Yes. It supports custom post types and built in types of post and page

What happens if I use unsupported field?

The value will be stored in the core meta tables instead of the custom table

Yes. It supports custom post types and built in types of post and page

What are the plugin filters and actions ?

The plugin provides filters to allow developers to customize the plugin behavior.
Please access the documentation to get the list of it.

Àwọn àgbéyẹ̀wò

Ka gbogbo àwọn àgbéyẹ̀wò 2

Àwọn Olùkópa & Olùgbéejáde

“ACF: Fields in Custom Table” jẹ́ ètò ìṣàmúlò orísun ṣíṣí sílẹ̀. Àwọn ènìyàn wọ̀nyí ti ṣe ìkópa sí plugin yìí.

Àwọn Olùkópa

Túmọ̀ “ACF: Fields in Custom Table” sí èdè rẹ.

Ṣe o nífẹ̀ẹ́ sí ìdàgbàsókè?

Ṣàwárí koodu, ṣàyẹ̀wò ibi ìpamọ́ SVN, tàbí ṣe àgbékalẹ̀ sí àkọsílẹ̀ ìdàgbàsókè nípasẹ̀ RSS.

Àkọsílẹ̀ àwọn àyípadà

0.5

  • Added filter acfict_table_prefix to customize table prefix
  • Added setting for allow user to disable table prefix usage
  • Testing on WordPress 5.7

0.4

  • Small performance improvement and testing on WordPress 5.6

0.3

  • Added support for the following field types: Link, Post Object, Page Link, Relationship, Taxonomy and User

0.2

  • Added support for the following field types: Range, Image, File, oEmbed, Checkbox, Radio Button, Date Time Picker, Time Picker
  • Using dbDelta function to modify table

0.1

  • First version of the plugin released