Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2015
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. function status_save_email( $post_id ) {
  2. if ( !wp_is_post_revision($post_id) ) {
  3. $slug = 'sessions';
  4. if ( $slug != $_POST['post_type'] ) { return; }
  5.  
  6. $status = get_the_terms( $post_id, 'status_tax' );
  7. if ( $status != null ){
  8. foreach( $status as $state ) {
  9. $state_name = $state->name ;
  10. }}
  11.  
  12. if ( $state_name == 'Rejected' || $state_name == 'Approved' ){
  13. echo "bingo";
  14. }
  15.  
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement