Created
October 28, 2014 14:17
-
-
Save solepixel/c1f7377a8784a185b1c6 to your computer and use it in GitHub Desktop.
render_field() method in ACF-Reusable-Field-Group extension for Advanced Custom Fields/Pro Plugin
This file contains hidden or 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
<?php | |
// ... | |
// @ line 137 | |
# see https://github.com/tybruffy/ACF-Reusable-Field-Group/blob/master/acf-reusable_field_group-v5.php#L137 | |
function render_field( $field ) { | |
global $post; | |
$current_id = $post->ID; ### $post is not defined/availabe on a Settings page | |
$group = _acf_get_field_group_by_key($field["group_key"]); | |
$fields = acf_get_fields($group); | |
acf_render_fields($current_id, $fields); | |
} | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment