wp-menu-import-export-cli icon indicating copy to clipboard operation
wp-menu-import-export-cli copied to clipboard

Argument to select which index (id, name, slug) should be used to export/import terms

Open roelmagdaleno opened this issue 5 years ago • 0 comments

Sometimes the user needs to use the name instead of id for terms when export/import the JSON file. Right now the default index is the id of the term.

We need to allow the user to change this behavior, for example:

Export: wp menu export --term_index=name

Import: wp menu import --term_index=name

When importing it's easier if the user specify which term index is being used so we can reduce code in the class.

NOTE: Looks like this feature only applies for terms. Posts or pages must use id as index.

roelmagdaleno avatar Jun 26 '20 17:06 roelmagdaleno