Skip to content

Instantly share code, notes, and snippets.

@kellenmace
Created April 3, 2018 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kellenmace/fbac1975728c2d1cacb03d9b54bd6a88 to your computer and use it in GitHub Desktop.
Save kellenmace/fbac1975728c2d1cacb03d9b54bd6a88 to your computer and use it in GitHub Desktop.
<?php
function km_do_something_when_term_12_is_being_edited() {
$term = km_get_term_being_edited();
if ( ! $term || 12 !== $term->term_id ) {
return;
}
// 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