MarieComet / mc-acf-flexible-template

WordPress plugin makes it possible to save the ACF flexible content fields as templates
71 stars 20 forks source link

Template Names #5

Closed NewJenk closed 6 years ago

NewJenk commented 6 years ago

Great work on the plugin!

I noticed that when saving templates, they can have the same name, e.g. if you save a template 'Test' you can then save another template 'Test'. Is it possible to give an alert to the user if saving a template that already has that name (or append a number to the template name)?

MarieComet commented 6 years ago

Hi @NewJenk, yes you're right on this point. See my last commit https://github.com/MarieComet/mc-acf-flexible-template/commit/b8cd6647409def652b56dbeb4c53445daf063b6f I've added a check on template name before save them, if an existing template has the same name, an error is shown. What do you think ?

NewJenk commented 6 years ago

Hi @MarieComet,

Thanks for responding so quickly - the fix is great!