Open mindfullsilence opened 1 month ago
Hello,
Thanks for the feedback!
In fact, good catch. The setting should respect the defined value. I'm adding it to the next patch.
Thanks again for the report, and sorry for the inconvenience.
Regards.
Thanks! Excellent plugin, btw. My admin is just so dang clean now :D
Hello,
Just a heads up to let you I think there was a misunderstanding.
I checked the code, and it is actually correct. There is no reason for the Stylised Button to show unless you specifically set acfe_repeater_stylised_button = true
. By default it is set to false
, so it won't show up.
The code is pretty straight forward:
if($field['acfe_repeater_stylised_button']){
$wrapper['data-acfe-repeater-stylised-button'] = 1;
}
Which means: if acfe_repeater_stylised_button is true
or has any value other than false
, then display the Sylised Button.
I'm not sure if the issue come from acf-builder (which might automatically set it to true
), or if you have a custom code/hook somewhere which does that.
This code also disable it, but it is not needed, since it's the default behavior:
add_filter('acf/load_field/type=repeater', function($field){
$field['acfe_repeater_stylised_button'] = false;
return $field;
});
Regards.
Describe the bug Repeater fields show the "Stylized Button" described here when created with acf-builder, regardless of setting true, false, or not setting at all.
To Reproduce Create a repeater via acf-builder programmatically:
Expected behavior Should be able to turn on/off this configuration per repeater field by setting its value to true or false.
WordPress & ACF WordPress version: 6.5.5 ACF Pro version: 6.3.3 ACF add-ons:
Related file (I think this is where the issue is): field-repeater.php#L61-63
Current workaround I'm using in theme functions.php: