On update_value check if value is string
This PR
- [x] Adds a check if value is_string
Context
In some cases when copying flexible layouts, value would default to white, because instead of actual $value which is a slug, $color object would be sent.
With this case if value is not empty and it's not string we can be sure that the value is color object and we can pull the slug which will result in correct result.
Thanks for the PR.
I assume you have tested this? You mentioned "in some cases" so I'm not sure how to reproduce the issue on my end to confirm the fix.
@Log1x Sorry for the lack of context. I've used your plugin in combination with ACF Flexible Layouts Manager, and that plugin uses update_value when importing other layouts, which under the hood uses acf_update_value which picks up the entire object and sends it to update_value of your plugin.