WordPress plugin intelligence profile

Antwork Field Code for ACF & SCF

PHP code generator for ACF and SCF: escaped, ready-to-paste snippets that display the fields of a field group in your theme.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 7.1
Current version1.1.0
WordPress coverageTested up to WordPress 7.1
Minimum stackWP 6.3 · PHP 7.4
Directory statusactive
Last directory update1 Nov 202616h ago
Active installationsNewAdoption metric — not a quality score
WordPress.org ratingNo WordPress.org ratings yet
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Antwork Field Code for ACF & SCF version 1.1.0 as active, updated 16h ago and tested up to WordPress 7.1.

Overview

About this plugin

Antwork Field Code is a code generator for Advanced Custom Fields and Secure Custom Fields. It adds a “Field Code” box under the settings of each field group, with the snippets that display the fields of the saved group in a theme template: the code of each covered field, chosen in the list of fields, coloured by WordPress’s own code editor, with a Copy button.

The code follows the documentation of Advanced Custom Fields: get_field() returns values that are not escaped, so every value is escaped for where it is printed ( esc_html(), esc_url(), esc_attr(), wp_kses_post(), wp_get_attachment_image() for images), and nothing is printed when a field is empty. 4, and names its variables after your fields.

It works with Advanced Custom Fields (free or Pro, version 6) and with Secure Custom Fields.

Features

  • Code for each covered field: choose a field in the list, in the order of the field group, to see its code, read only. It reads your field group as it is saved, with the settings that change the code: return format (value, label or array; object or ID; URL…), one or several values, appearance of taxonomy fields, new lines of text areas, tabs of icon pickers.
  • Copy: a Copy button for each field and “Copy all” for the whole group. Copying is announced to screen readers and works with the keyboard.
  • Field list: pick a field, or All fields for the whole template; the arrow keys move between fields.
  • Group fields: the sub-fields of a Group field are read from the group’s value, at any depth.
  • Readable code: one variable per field, a guard on empty values, comments where a value needs explaining (formatted dates, post objects or IDs).
  • Help menu: links to the support forum and to the reviews on WordPress.org, and a button that copies your WordPress, PHP, ACF or SCF and plugin versions to the clipboard (shown to users who can see Site Health). Nothing is sent from your site.
  • For developers: filters let another plugin cover a field type, add a location (such as an options page), and add code before or after each snippet.

Covered field types

  • Basic: Text, Text Area, Number, Range, Email, URL, Password (read, never printed).
  • Content: Image (Array, URL, ID), File (Array, URL, ID), Wysiwyg Editor, oEmbed.
  • Choice: Select (one or several values; Value, Label or Array), Checkbox, Radio Button and Button Group (Value, Label or Array), True / False.
  • Relational: Link (Array or URL), Post Object (one or several; Post Object or Post ID), Page Link (one or several), Relationship (Post Object or Post ID), Taxonomy (Checkbox, Multi Select, Radio Buttons or Select; Term Object or Term ID), User (one or several; User Array, User Object or User ID).
  • Advanced: Google Map, Date Picker, Date Time Picker, Time Picker, Color Picker (Hex string, RGBA string or RGBA array), Icon Picker (String or Array).
  • Layout: Group, with its sub-fields. Message, Tab, Accordion and Separator hold no value and get no code.

”

Where the code works

The code reads the fields of the current post, inside the Loop of a template for posts, pages or custom post types. A field group shown elsewhere (an options page, a taxonomy, a user, ACF Blocks…) still gets its code, with a line that names the location that is not covered yet.

Antwork Field Code Pro

fr. It adds the code of Repeater, Flexible Content, Gallery and Clone fields, and of field groups shown on options pages, taxonomy terms, users, comments, attachments and widgets. Where it would apply, the Field Code box says so in one sentence that you can dismiss.

Ideas and bugs

Have an idea for the plugin? Suggest it in the support forum, where bugs are reported too.

Privacy

Privacy: this plugin makes no external request. It collects no data, adds no tracking and stores no option in the database, so there is nothing to clean up when you delete it.

Antwork Field Code is an independent plugin. It is not affiliated with or endorsed by Advanced Custom Fields or Secure Custom Fields.

org helps other developers find it.

Switching from another code generator

The code appears under the settings of each field group.

  • Deactivate the other code generator, if any.
  • Install and activate Antwork Field Code.
  • Edit a field group: the “Field Code” box shows the code of its fields.

There is nothing to set up and nothing to migrate: the plugin stores no settings.

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • code generator
  • theme development
  • acf
  • php
  • snippets
Compatibility & maintenance

Compatibility & maintenance

Tested with WP 7.1

Marked as tested with the current WordPress 7.1 release.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to7.1
Minimum requirementsWordPress 6.3 · PHP 7.4
Update activity1 Nov 202616h ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

Version1.0.01.1.0
Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.