Last active
February 27, 2019 14:58
-
-
Save csalzano/015e85e4655ec5a3033e0b4406729f4b to your computer and use it in GitHub Desktop.
JavaScript that inserts a term inside a WordPress custom taxonomy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//insert a term into our Transmission custom taxonomy | |
let term = new wp.api.models.Transmission( { | |
name: 'Automatic', | |
description: 'A vehicle transmission that self-shifts between gear ratios', | |
slug: 'automatic' | |
} ); | |
term.save(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment