Search by

jordihales / acf-force-edit-mode

jordihales

Restore ACF Blocks V2 in-canvas edit mode in the WordPress 7.1+ block editor.

Package info

github.com/jordihales/acf-force-edit-mode

Type:wordpress-muplugin

pkg:composer/jordihales/acf-force-edit-mode

Statistics

Installs: 11

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2026-08-26 15:17 UTC

This package is auto-updated.

Last update: 2026-08-26 15:20:56 UTC


README

A WordPress must-use plugin that restores ACF Blocks V2 in-canvas edit mode when WordPress 7.1+ forces the post editor into an iframe.

This is a compatibility workaround for legacy ACF Block V2 editing. Migrating blocks to ACF Blocks V3 remains the recommended long-term approach.

Requirements

  • PHP 7.4 or later
  • WordPress 7.1 or later
  • Advanced Custom Fields Pro with ACF Blocks
  • An MU-plugin autoloader when Composer installs packages into subdirectories

Installation with Composer

Once the package is available on Packagist, install it with:

composer require jordihales/acf-force-edit-mode

The package uses the wordpress-muplugin Composer type and composer/installers. The consuming project controls the final installation path.

For a Roots Bedrock project, configure the installer path if it is not already present:

{
    "extra": {
        "installer-paths": {
            "web/app/mu-plugins/{$name}/": [
                "type:wordpress-muplugin"
            ]
        }
    }
}

Roots Bedrock projects should also install roots/bedrock-autoloader, which loads plugin entry points located in MU-plugin subdirectories.

composer require roots/bedrock-autoloader

Standard WordPress installations

WordPress only loads PHP files located directly inside wp-content/mu-plugins. If Composer installs this package into wp-content/mu-plugins/fx-acf-force-edit-mode/, add a root loader such as wp-content/mu-plugins/fx-acf-force-edit-mode-loader.php:

<?php

defined( 'ABSPATH' ) || exit;

require_once WPMU_PLUGIN_DIR . '/fx-acf-force-edit-mode/fx-acf-force-edit-mode.php';

Manual installation

  1. Copy the repository to wp-content/mu-plugins/fx-acf-force-edit-mode/.
  2. Add the standard WordPress loader shown above.
  3. Hard-refresh the block editor.

What it does

  • Prefers ACF Blocks V2 when no explicit block version is set.
  • Sets non-JSX FX BAM blocks to ACF V2 edit mode.
  • Forces the WordPress editor canvas out of its iframe.
  • Restores mode: edit when ACF changes eligible blocks to preview mode.
  • Keeps JSX and InnerBlocks parents in preview mode.

Compatibility notice

The plugin patches WordPress's shared React JSX runtime to override shouldIframe. This relies on WordPress implementation details and may require changes after WordPress or Gutenberg updates. Test upgrades in a staging environment before deploying them.

References

License

This package is currently marked as proprietary. The copyright holder should choose and add an open-source license before inviting unrestricted public use.