Skip to content

Javascript

Richard Coffee edited this page Feb 8, 2016 · 3 revisions

Javascript

js/slug_noedit.js

Prevents slug editing

Simply hides anything with a css class of 'term-slug-wrap'.

js/tax_nodelete.js

Prevent term deletion

The php uses wp_localize_script to pass an array of term IDs. The js loops through the array, using jQuery to find the table row with an id of 'tag-{termID}', then a child element with a css class of 'row-actions', then it's child element with a css class of 'delete'. That element is then deleted, making the term deletion option go away.

Clone this wiki locally