Created
November 15, 2011 03:23
-
-
Save michaeltwofish/1366034 to your computer and use it in GitHub Desktop.
Always add a tag to a post
This file contains hidden or 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
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