WP Manifestindependent plugin directory
manifest / content / acf-wp-objects

ACF WP-Objects WP Registry grade C-. High-severity findings · 1 findingWP RegistryHigh-severity findings · 1 findingOpen the reportC-

Map ACF Fields to WordPress objects

★ 24stars
397release downloads
≈10active sites
24composer installs
0.8.12latest · 3mo ago

Install

Download acf-wp-objects.zip From the 0.8.12 release on GitHub, Jul 20, 2026

Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/mcguffin/acf-wp-objects/releases/download/0.8.12/acf-wp-objects.zip

On Packagist as mcguffin/acf-wp-objects:

composer require mcguffin/acf-wp-objects
Updates itself. It ships its own updater (Update URI header), so new versions appear under Dashboard → Updates.

Filling some gaps between WordPress and ACF.

Features

Integrate WordPress Objects objects into ACF.

  • Edit WP-Post properties with ACF fields:
    • Settings: blogname
    • Settings: blogdescription
    • Post: post_title
    • Post: post_excerpt
    • Post: post_content
    • Post: post_thumbnail
    • Post: attachments
    • Term: term_name
    • Term: term_description
    • Theme-Mod: custom_logo
  • New Field types:
    • Post Type
    • Taxonomy
    • Image Size
    • Includer (include all fields from a different field group)
    • User Role
    • Sweet Spot (use with media)
    • Plugin Template Select (Selector for template file from plugin)
  • New Location Rules:
    • Post Type / Taxonomy is public / builtin / show_ui / show_in_menu / show_in_nav_menus
    • Post type supports
    • Editor is Classic / Block editor
    • WP Options page is General / Writing / Reading / Discussion / Media / Permalinks
    • Plugin Template Settings
    • Everywhere
  • Choice fields: get choices from a repeater, e.g. from an ACF options page
  • Multisite:
    • Add a network admin page with acf_add_options_(sub_)page(). Add "network" => true, to the page args (ACF Pro only – both plugins must be network-enabled)
  • Styling:
    • More compact styles in block editor sidebar
    • Add classes no-head and no-sort to repeaters
    • Add classes seamless and no-label to fields
    • Add class button-group to checkboxes (make them look like button groups)
  • Page Layouts: Generic flexible content field providing a location rule for field groups. Init acf_add_page_layout('foobar'), render with acf_page_layouts('foobar')
  • JSON-Paths: Save Field group JSON in custom places (like plugins)
  • Localization: Localize ACF Field labels through po-files
  • ACF Options Page: Optionally for Reset, Export and Import in the Backend and from WPCLI.
  • Tab Field Open a tab by URL. Just append #Tab Label

Installation

Production (using Github Updater – recommended for Multisite)

  • Head over to releases
  • Download 'acf-wp-objects.zip'
  • Upload and activate it like any other WordPress plugin
  • AutoUpdate will run as long as the plugin is active

Development

  • cd into your plugin directory
  • $ git clone git@github.com:mcguffin/acf-wp-objects.git
  • $ cd acf-wp-objects
  • $ npm install
  • $ npm run dev

JSON-Paths

Consider the follwing Scenario: You are using local json field groups in your theme. You want to override them in a child theme. Or alternatively, you have a plugin with an ACF dependency, incorporating field groups as local json.

This will load and save ACF JSON from the subdirectory path/to/json-files inside the theme and child theme directory but only if the field group key is group_my_fieldgroup_key.

acf_register_local_json(
    'path/to/json-files', // e.g. 'acf-json' in a theme
    function( $field_group ) { 
        // callback 
        // return true, if the field group JSON
        // should be saved at the given location
        return $field_group['key'] === 'group_my_fieldgroup_key';
    },
    [ // parent paths to check
        get_template_directory(),
        get_stylesheet_directory(),
    ]
);

Sweet Spot Field

An easy way to choose the right clipping for images having object-fit: cover.

The easyest way to enable the Sweet Spot feature for all images is the following bit of php code, living in your Theme's functions.php or in a mu-plugin.

add_filter( 'acf_image_sweetspot_enable', '__return_true' );

The plugin will then register a field group for image attachments including a sweet spot field and in the frontend add an inline style rule to the image attributes, e.g. object-position: 12.3% 81.4%;.

Sweet Spot Field UI

JSON I18n

ACF provides support for WPML to localize Field groups. ACF WP Objects offers a different approach through .po files.

acf_localize_field_groups( 
    'my-textdomain', 
    function( $field_group ) { 
        // callback which should return true, if the field group 
        // localization is available under the given textdomain
        return $field_group['key'] === 'group_my_fieldgroup_key';
    });

If you are using local json, here is a node script allowing you to extract the strings src/run/json-i18n.js and add them to a pot file:

Install WP CLI.

Place src/run/json-i18n.js and src/run/lib/json-extract.js in your package directory.

Extract strings from json files and add them to a PHP file:

node ./src/run/json-i18n.js 'my-texdomain' ./path/to/json ./php-output.php

Generate pot with WP CLI:

wp i18n make-pot . languages/my-textdomain.pot --domain=my-textdomain

Template Files (ACF Pro only)

  1. Filter template types

    add_filter('acf_wp_objects_template_types', function( $types ) {
     $slug = 'foo-plugin';
     $key = 'Items Template';
     $theme_location = 'foo-plugin';
         // will point to wp-content/themes/<current-theme>/foo-plugin/
         // default: $slug
     $plugin_location = 'templates';
         // will point to wp-content/plugins/foo-plugin/templates/
         // null: use default, false: no plugin location, string: custom location inside plugin
    
     $types[ $slug ] = [
         'header_key' => $key,
         'theme_location' => $theme_location,
         'plugin_location' => $plugin_location,
     ];
     return $types;
    });

WP Objects will scan for template files having a header key in theme and plugin locations.

  1. Create a Template select field with name my_fabulous_template. Use it like this: get_template_part( get_field('my_fabulous_template') );
  2. Place some template files in location
    /*
    Items Template: List
    */
    $settings = get_field('my_fabulous_template_settings');

Page layouts (ACF Pro only)

Generate a flexible content field and turn field groups to Layouts. Ideal if you need an extendible Set of Layouts to choose from.

  1. Add a layout section:
    acf_add_page_layout([
     'title' => 'My Layout',
     'name'  => 'my-layout',
    ]);
  2. Create field groups. Set "Page Layouts" "equals" "My Layout" as a location, and enter a row layout slug at the very bottom.
  3. Create template files in your theme corresponding to the slugs chosen above. Filenames should match acf/layout-<row_layout_slug>.php. Don't forget to use get_sub_field(), you are inside a flexible content field!
  4. In your page.php template file call this inside the loop:
    acf_page_layouts( 'my-layouts' );

Repeater Choices with repeater row return

ACF doesn't load the field groups in the frontend by default. To retrieve the value of a Repeater Choice in the frontend, ACF has to know about this.

You can achieve this by adding do_action( 'acf_wpo_load_fields' );

ACF Options Page

Some new options for acf_add_options_page() and acf_add_options_sub_page().

acf_add_options_page([
    'import' => false,
    'import_message' => __( 'Options Imported', 'acf-wp-objects' ),
    'import_error_message' => __( 'Invalid Import Data', 'acf-wp-objects' ),
    'import_button' => __( 'Import', 'acf-wp-objects' ),
    'import_select_file' => __( 'Select File…', 'acf-wp-objects' ),

    'export' => false,
    'export_references' => false,
    'export_button' => __( 'Export Settings', 'acf-wp-objects' ),

    'reset' => false,
    'reset_button' => __( 'Restore defaults', 'acf-wp-objects' ),
    'reset_message' => __( 'Options Reset to Defaults', 'acf-wp-objects' ),
]);

Args

  • import Boolean Enable Import feature
  • import_message String Message after sucessful import
  • import_error_message String Message after failed import
  • import_button String Import button label
  • import_select_file String Import file input label
  • export Boolean|Array Enable export feature. true will simply export values from the current options page. Passing an array of options page IDs will export from multiple options pages at once
  • export_references Boolean Whether to export referenced content like posts, images or terms
  • export_button String Export button label
  • reset Boolen|String Enable reset feature. Passing the path to a valid import file will import it.
  • reset_message String Message after a sucessful reset
  • reset_button String Reset button label

Examples

Enable import and export.

acf_add_options_page([
    'page_title' => 'Configure Foobar Options',
    'menu_title' => 'Foobar Options',
    'post_id' => 'foobar_options',
    'parent_slug' => 'themes.php',
    'menu_slug' => 'foobar-options',
    'import' => true,
    'export' => true,
]);

Enable reset too.

acf_add_options_page([
    'page_title' => 'Configure Foobar Options',
    'menu_title' => 'Foobar Options',
    'post_id' => 'foobar_options',
    'parent_slug' => 'themes.php',
    'menu_slug' => 'foobar-options',
    'import' => true,
    'export' => true,
    'reset' => true,
]);

Enable reset and get values from an export file.

acf_add_options_page([
    'page_title' => 'Configure Foobar Options',
    'menu_title' => 'Foobar Options',
    'post_id' => 'foobar_options',
    'parent_slug' => 'themes.php',
    'menu_slug' => 'foobar-options',
    'import' => true,
    'export' => true,
    // pass file path to reset
    'reset' => get_template_directory().'/foobar-defaults.json',
]);

WP-CLI

Create an export file

wp acf-options-page export foobar-options --pretty > wp-content/themes/my-theme/foobar-defaults.json

Import options from file

wp acf-options-page import wp-content/themes/my-theme/foobar-defaults.json

Reset options page.
Regardless of the configuration passed to acf_add_options_page() this will not import the values from a file. Use wp acf-options-page import to do so.

wp acf-options-page reset foobar-options

Releases

Newest 25 of 60 recorded releases. Each count is every asset in that release; expand a row for the breakdown.

Tag
Published
Assets
Downloads
0.8.12 latest
Jul 20, 2026 3mo ago
acf-wp-objects.zip
6
Jun 19, 2026 4mo ago
acf-wp-objects.zip
4
Feb 10, 2026 8mo ago
acf-wp-objects.zip
7
Dec 9, 2025 10mo ago
acf-wp-objects.zip
11
Nov 12, 2025 11mo ago
acf-wp-objects.zip
9
Oct 28, 2025 11mo ago
acf-wp-objects.zip
7
Oct 28, 2025 11mo ago
acf-wp-objects.zip
6
Oct 21, 2025 1 year ago
acf-wp-objects.zip
6
Oct 2, 2025 1 year ago
acf-wp-objects.zip
5
Sep 24, 2025 1 year ago
acf-wp-objects.zip
5
Sep 24, 2025 1 year ago
acf-wp-objects.zip
3
Sep 22, 2025 1 year ago
acf-wp-objects.zip
3
Sep 16, 2025 1 year ago
acf-wp-objects.zip
3
Jan 17, 2025 1 year ago
acf-wp-objects.zip
8
Nov 27, 2024 1 year ago
acf-wp-objects.zip
7
Nov 20, 2024 1 year ago
acf-wp-objects.zip
4
Oct 8, 2024 2 years ago
acf-wp-objects.zip
6
Jun 15, 2024 2 years ago
acf-wp-objects.zip
11
Feb 28, 2024 2 years ago
acf-wp-objects.zip
14
Jan 17, 2024 2 years ago
acf-wp-objects.zip
17
Jul 28, 2023 3 years ago
acf-wp-objects.zip
11
Jul 18, 2023 3 years ago
acf-wp-objects.zip
7
Jun 14, 2023 3 years ago
acf-wp-objects.zip
6
Jun 7, 2023 3 years ago
acf-wp-objects.zip
5
May 29, 2023 3 years ago
acf-wp-objects.zip
12
All releases on GitHub →

Active-site estimate ≈10 comes from the median of recent superseded releases. Method.

C- grade

Security

ACF WP-Objects 0.8.12 · audited by WP Registry

High-severity findings.

1 high
Audited release
0.8.12
Findings
1
Worst severity
high
Content hash
b79db1113f1614234ff09c10…

Findings

  • high Missing capability check on ACF options-page import/export/reset

    missing_capability

    OptionsPage hooks save_post() to acf/save_post at priority 1. ACF fires that action after verifying _acf_nonce on any ACF-enabled save (post.php, profile.php, term forms, frontend acf_form) — it is not limited to options pages. The method only tests isset($_POST['options_page_action']) and isset($_POST['options_page_slug']); it never calls current_user_can, never compares $post_id to the options page, never checks $page['capability'] / $page['import'] / $page['export'] / $page['reset'], and never uses $page_hook. A Contributor (or any role that can load a screen that prints acf_form_data) can add those extra POST fields to a normal ACF save. action_import() then Helper\ImportExportOptionsPage::import()s attacker JSON: references create posts (wp_insert_post with attacker post_status/post_type/post_content plus add_post_meta for every meta key), terms, and sideloaded attachments; values are acf_update_values()'d onto the JSON-specified options page (so mapped WPObjects fields can rewrite blogname, page_on_front, custom_logo, etc.). Export always dumps references (file bytes + full post_meta). Reset deletes every ACF value on the page. The same actions are intended for administrators on acf/options_page submitbox UI; the bug is that the handler runs on every ACF save.

    include/ACFWPObjects/Compat/ACF/OptionsPage.php:116-187

    Recommendation

    Before import/export/reset, require current_user_can on the target options page's capability (default manage_options), require that $post_id matches that page's post_id, and require the page actually has import/export/reset enabled. Ignore options_page_action on unrelated acf/save_post calls. Re-check capability inside Helper\ImportExportOptionsPage::import() because it is also a public API.

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.