Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
function km_do_something_when_term_12_is_being_edited() {
$term = km_get_term_being_edited();
if ( ! $term || 12 !== $term->term_id ) {
// Put code here that should only run when the term with an
// ID of 12 is being edited.
add_action( 'admin_init', 'km_do_something_when_term_12_is_being_edited' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment