Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Saving workflow state #48

merged 1 commit into from

2 participants

Connor Jennings Ben Balter
Connor Jennings

$_POST['workflow-state'] is a slug, not an id. So compare slugs, not ids. Related to these two issues: #1 #2

The most recent change invalidates the need for this (it just always updates regardless), but it might be confusing down the road if the comparison is slugs and ids.

Ben Balter benbalter merged commit b8869cc into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 13, 2013
  1. Connor Jennings
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  includes/admin.php
2  includes/admin.php
@@ -979,7 +979,7 @@ function workflow_state_save( $post_id ) {
$old = wp_get_post_terms( $post_id, 'workflow_state', true );
//no change, keep moving
- if ( isset( $old[0] ) && $old[0]->term_id == $_POST['workflow_state'] )
+ if ( isset( $old[0] ) && $old[0]->slug == $_POST['workflow_state'] )
//all's good, let's save
Something went wrong with that request. Please try again.