Comments (4)
I've committed 946bc90 to resolve this and related issues.
As @paulmist noted in #4 the nesting level for the subfield loop was not right, and so a lot of subfields were potentially getting missed.
The warning was caused because acf_get_fields() requires a WordPress post ID (which anything below the Field Group level does not have). Thankfully it is not necessary to call that function on the individual layouts: while acf_get_field_groups() does not populate field data, acf_get_fields() does return recursive field group data.
I've refactored the code to split the recursive portion out into another method that calls itself, which I think makes things a little easier to read. It also means that even deeper nesting levels are supported. While going deeper probably wouldn't be a good user experience, the plugin will allow it for anyone who wants. :)
from acf-flexible-content-preview.
Thanks, @benvoynick. @paulmist this is now resolved and released. Thanks for reporting!
from acf-flexible-content-preview.
@benvoynick brilliant! Thank you for tidying up my mess.
Perhaps you can have a stab at Covid19 next?
I was looking for some good documentation on the ACF functions but struggled.
from acf-flexible-content-preview.
@paulmist while you’re here, check out https://github.com/jameelmoses/acf-flexible-content-extended. It provides the same functionality for image previews of layouts with the added improved UX of editing layouts in a modal so your backend pages aren’t so long
from acf-flexible-content-preview.
Related Issues (10)
- preview image not displaying when block name starts with a number
- Not an issue but an improvement/idea! HOT 1
- Preview images don't show for nested flexible content HOT 3
- PHP8.0 Warnings On Singleton Class HOT 2
- Preview Images Missing HOT 6
- Image not showing for Table field added via extension HOT 6
- Custom images are not seeked HOT 7
- Child theme compatibility HOT 2
- ACF 5.9 no longer shows the modal when adding flexible content
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acf-flexible-content-preview.