Support

Account

Home Forums ACF PRO Check if synchronisation is available

Unread

Check if synchronisation is available

  • I’d like to show an admin notice, based on a simple IF statement, when any field groups ‘need synchronisation’.

    If you work with git and thus have several branches, switching between branches can trigger synchronisation. But you only see this if you go to the field groups listing.

    I would like to always show a notice (when syncs are available), so my colleagues don’t forget to do so.

    Is there a function which I can use for this ?

    I checked the source code but can’t find anything.
    I tried using get_posts and then get the field key (aka post_name).

    But I then can’t make use of the check function (yet), located in admin-field-groups.php (line 570).
    if( isset($this->sync[ $field_group['key'] ]) ) {}

    but $this (class acf_field_groups()) is not recognised when creating a new instance.

Viewing 1 post (of 1 total)

The topic ‘Check if synchronisation is available’ is closed to new replies.