Copy/Paste FlexContent Blocks for ACF

Опис

This plugin allows you to clone flexible content blocks (layouts) to another page or site.
The entire contents of block will be transferred, including repeater items and its contents.

It uses a regular clipboard to store content, so you can paste it to notepad application and use it later to populating other pages.

Usage

Simply install and activate the plugin. No settings available.

The plugin will add a new icon to the header of each layout with “Copy layout” tooltip, and new menu at the bottom of the flexible container.

Click on “Copy layout” icon will copy the content of the block to the clipboard.
In the bottom menu on target page use “Paste layouts” option and new blocks will appear.
Nothing is saved unless you click the regular “Update” button.

Bottom menu contains “Copy all layouts” to copy the entire flexible container to the clipboard.

As a feature, this plugin will try to recognize the URLs in the pasted content and replace the source domain with the target one.
This is often required when moving blocks from a staging to a live environment to keep links local.

Limitations

This will not transfer media or posts.
Coping fields that use ID-s to refer to a content (such as: media images, links, relationship…) to another location may link the wrong resource to the field because posts/media on another site may have different ID-s.
In this case you must manually rewire such fields and connect appropriate posts.

Only built-in field types are supported and tested.
Additional (extended) field types are likely to be copied as well, but without guarantees.

Credits

This plugin contains code form other GPLv2 projects, credits go to:
– https://www.acf-extended.com
– https://wordpress.org/plugins/acf-flexible-layouts-manager
– https://github.com/magicstickuk/Flexible-Content-Duplication

“ACF-extended” has similar feature, but it didn’t work on any of 20 sites I tested, probably because of the way how the flexible container is integrated into the project.
So I created a solution that works for me and shared publicly with everyone with the same problem.

Contact

Please, send bug reports and feature requests to office@tekod.com

Відгуки

10.12.2024
I’ve been looking for a plugin that does something like this for a long time. Thank you for developing it and sharing it in the directory. I’m using it on a WordPress multisite network and it works like a dream.
Прочитати всі 1 відгук

Учасники та розробники

“Copy/Paste FlexContent Blocks for ACF” — проект з відкритим вихідним кодом. В розвиток плагіну внесли свій вклад наступні учасники:

Учасники

Перекладіть “Copy/Paste FlexContent Blocks for ACF” на вашу мову.

Цікавитесь розробкою?

Перегляньте код, перегляньте сховище SVN або підпишіться на журнал розробки за допомогою RSS.