Support

Account

Home Forums ACF PRO filter 'acf/field_group/get_fields' missing in ACF pro

Solved

filter 'acf/field_group/get_fields' missing in ACF pro

  • hello there 😉

    today purchased the ACF pro version. in the ACF free version i used to call a filter to get the field values from a field group.

    $fields = apply_filters(‘acf/field_group/get_fields’, $array, $field_group_id);

    calling this filter would return me all the field values from that specific $field_group_id of the current post and then i can loop through the $fields array and do whatever i want to do.

    but since upgrading to the ACF pro version i don’t get anything returned by the apply_filter call

    if i do a search in the ACF pro code for the string ‘acf/field_group/get_fields’ then nothing is found.

    perhaps the filter name has changed? or is there another function i need to call to get all the fields value by the field group id from the current post?

    any help would be really more than awesome as i want this to also work on the ACF pro version.

    thanks again for such a great plugin 😉

    looking forward to your reply

    greetings & all the best
    becki

  • The filter has been removed in ACF5 and was not replaced. Instead there are function to call depending on what you need.

    get_fields() returns all the values for a specific post. http://www.advancedcustomfields.com/resources/get_fields/

    I’m not sure there’s a function that gets all the field values based on the group id. There is a function that gets all the field objects by the group id. ‘acf_get_fields($group_key)`, this one is not in the documentation.

  • hello john,

    thanks a lot for your reply. your supplied info helped me to find what i’m looking for. would be nice if someone could update the documentation so all API function are in the documentation?

    thanks & all the best
    becki

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘filter 'acf/field_group/get_fields' missing in ACF pro’ is closed to new replies.