Unfortunately, because fields hidden by this plugin aren’t updated correctly when a repeater is updated I had to remove support for repeater fields, which includes group fields. This is because in order to allow repeaters to save correctly the values need to be provided in hidden fields. This is an issue with repeaters of any kind because the values are in nested arrays and I have not worked out a way to output all of the hidden fields that would be required to allow them to continue working. Enabling group fields would break your field content, and quite possibly crash your site.
Now that I think more about it, I think this plugin will break any field that has an array value, including select, taxonomy, relationship, and several more. I am looking into a way to resolve this. Hopefully I can, otherwise I’m going to need to discontinue this plugin.
hm, that’s too bad! so I have to disable each group manually for certain user roles…
I am using a custom class and the following code to just hide the field not supposed to be seen by the user role:
// CSS based on user role
add_action( 'wp_enqueue_scripts', 'hide_from_author_users' );
function hide_from_author_users(){
if( in_array( 'author', (array) wp_get_current_user()->roles ) ){
echo '<style>
.authorhide {
display: none;
}
</style>';
}
}
I am pretty sure I have this solved, let me know of you run into any problems.