I just created a tab of stuff that should be internal and once it hits that tab it breaks the output. So everything after the private tab is hidden. This way I don’t have to go to php anytime I add a field. Works for me in this situation.
add_filter('acf/field_group/get_fields', 'check_acf_fields');
function check_acf_fields($arg){
$x=0;
foreach ($arg as $field) {
if( in_array('Internal', $field,true) || in_array('should only be internal', $field,true) ){
$output = array_slice($arg, 0, $x);
return $output;
}
$x++;
}
}