Display a stylised centered button to add layouts, instead of the native ACF button.
This setting allow developers to hide the default message “Click the ‘Add Row’ button below to start creating your layout”. This setting is automatically turned ON when the “Stylised Button” setting is enabled.
Customize the default empty message with the one of your choice.
Display a block placeholder with an “Edit” icon when a layout is collapsed. This setting will give more height to the collapsed layouts to make the edit action easier.
Display thumbnails for each layouts in the “Add Row” dropdown/modal. This setting is useful to show the user what the layout will look like on the front-end.
/*
* @int/string $thumbnail Thumbnail ID/URL
* @array $field Field settings
* @array $layout Layout settings
*/
filter('acfe/flexible/thumbnail', $thumbnail, $field, $layout);
filter('acfe/flexible/thumbnail/name=my_flexible', $thumbnail, $field, $layout);
filter('acfe/flexible/thumbnail/key=field_5ff71ef3542c2', $thumbnail, $field, $layout);
filter('acfe/flexible/thumbnail/layout=my_layout', $thumbnail, $field, $layout);
filter('acfe/flexible/thumbnail/name=my_flexible&layout=my_layout', $thumbnail, $field, $layout);
filter('acfe/flexible/thumbnail/key=field_5ff71ef3542c2&layout=my_layout', $thumbnail, $field, $layout);
add_filter('acfe/flexible/thumbnail/layout=my_layout', 'my_acf_layout_thumbnail', 10, 3);
function my_acf_layout_thumbnail($thumbnail, $field, $layout){
// must return an url or attachment id
return 'https://www.example.com/my-image.jpg';
}
By default, ACF will load all layouts and all their sub fields in a hidden container. This container is later used by the system when a user add layout. This logic can burden the initial page load, especially when using a complex Flexible Content with dozens of layouts and sub fields.
To enhance the admin page load, the Asynchronous Layout will remove that logic and load the layout on the fly, when a user actually add a new layout using an ajax request.
By default, ACF will run an Ajax request on page load and everytime a user collapse a layout, in order to retrieve all layouts title when using the acf/fields/flexible_content/layout_title
. This setting will remove those requests to lighten the server load.
Allow users to customize the Layout Title on the Post Edit screen. The title can be modified directly by clicking on it from the layout handle.
Allow users to hide/show specific layout from the front-end. This setting will add a new icon in the layout handle. When a layout is toggeled off, the layout will fade-out in the administration and won’t be rendered on the front-end.
Add a new action allowing users to copy a layout and paste it on an another post using the same Flexible Content. This setting add a “Copy” icon on each layouts of the Flexible Content.
To paste the layout, the user has to use the new secondary dropdown that appear next to the “Add Row” button. It is possible to copy all layouts from one post and paste them all at once.
Remove the ability to re-order layouts from the Post Edit screen.
Add a “Close” button at the bottom the sub fields render for a better user experience.
Remove the native collapse button from the layout handle which allow users to collapse/open a layout.
This setting will remove the “Add Row” button from the general Flexible Content field and from the Layout Handle bar. Users won’t be able to add new layouts.
Remove the “Delete” icon from the layout handle bar. The user won’t be able to delete a layout that has been added on a post.
Remove the “Duplicate” button from the layout handle bar. The user won’t be able to duplicate a layout.
This is the default ACF behavior applied to Flexible Content. The browser save the user preference of the opened and closed Layouts for each posts.
Force the layouts to be loaded as collapsed (or display the Preview Mode). This setting will ensure that the user always see all layouts closed when loading a post.
Force all layouts to be opened, and showing all layouts sub fields, by default.
An alternative “Opened” layout state which remove the ability to collapse layouts, which means they will be always opened.