jordihales / acf-force-edit-mode
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
Requires
- php: >=7.4
- composer/installers: ^2.2
Requires (Dev)
None
Suggests
- roots/bedrock-autoloader: Automatically loads Composer-installed MU plugins from subdirectories.
Provides
None
Conflicts
None
Replaces
None
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
- Copy the repository to
wp-content/mu-plugins/fx-acf-force-edit-mode/. - Add the standard WordPress loader shown above.
- 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: editwhen 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.