Skip to content

Instantly share code, notes, and snippets.

@michaeltwofish
Created November 15, 2011 03:23
Show Gist options
  • Save michaeltwofish/1366034 to your computer and use it in GitHub Desktop.
Save michaeltwofish/1366034 to your computer and use it in GitHub Desktop.
Always add a tag to a post
public function action_publish_post( $post, $form )
{
if ( $post->content_type == Post::type( 'mycontenttype' ) ) {
$post->tags .= ',mytag';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment