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

Add "Replace Existing Content" Feature #12

Closed virgo79 closed 5 years ago

virgo79 commented 5 years ago

@MarieComet

This pull request is related to the following feature request

Basically, this is the list of changes:

  1. a "replace content" checkbox has been added into the import tab layout (just before the load button)
  2. a bit of css as been added to add margin between the checkbox and the load button.
  3. all the js logic has been added into the mc-acf-ft-template.js. This logic simply removes all current flexible layouts before performing the template import. This logic is executed only if the ajax request has a success response.

The feature should be complete and has been tested. However would be useful doing some other tests before merging.

Hope to see this feature merged soon :)

replace-existing-content