-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix recursion in ACF fields with GravityView shortcodes (#1998)
This PR adresses #1812. It looks like a recursion is going on when trying to retrieve the meta fields for a post. It used the `get_field_objects()` method of ACF. Apparently they are right when they say: > The function is not very elegant and wastes a lot of PHP memory / SQL queries if you are not using all the fields / values So I've replaced it with half the internal method, retrieving the meta keys for ACF only, and microcaching the result. This fixes the recursion for me, and I'm able to show the view when rendering `the_field('content');`.
- Loading branch information
Showing
2 changed files
with
52 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters