Created
September 20, 2016 17:24
-
-
Save gedex/e9b01fe5450827568ae0ff679b8d9a52 to your computer and use it in GitHub Desktop.
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
diff --git a/gp-includes/things/translation.php b/gp-includes/things/translation.php | |
index 5beed6a..e90a9b6 100644 | |
--- a/gp-includes/things/translation.php | |
+++ b/gp-includes/things/translation.php | |
@@ -491,8 +491,14 @@ class GP_Translation extends GP_Thing { | |
} else { | |
$updated = $this->save( array( 'user_id_last_modified' => get_current_user_id(), 'status' => $status ) ); | |
} | |
+ $old_status = $this->status; | |
+ | |
+ if ( 'current' === $status ) { | |
+ $updated = $this->set_as_current(); | |
+ } | |
if ( $updated ) { | |
+ do_action( 'gp_translation_status_updated', $this, $old_status ); | |
gp_clean_translation_set_cache( $this->translation_set_id ); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment