Skip to content

Instantly share code, notes, and snippets.

@tkjune
tkjune / wordpress-advanced-custom-fields-extend-api.php
Last active December 11, 2015 22:59
Extend WordPress plugin ADVANCED CUSTOM FIELDS api.
/**
* Display WordPress plugin ADVANCED CUSTOM FIELDS repeater field in table form. Based on field type, the layout varies.
* text, textarea: as plain text
* WYSIWYG: as HTML
* checkbox: as UL, display all choices and the chosen items are marked with "selected" class.
* select: as plain text for single choice. as UL for multiple choice, but only display chosen items
* gallery: as UL
* image: as IMG (for url or object) or as INT (for image_id).
* When return an image object, the title, alt, caption can be displayed.
* @required: Plugin: Advanced Custom Fields 3.5.8.1 above