From 8806f32cce509a67d2c1fb77069c2cbec2e2f7fa Mon Sep 17 00:00:00 2001 From: Faishal Saiyed Date: Tue, 10 Feb 2015 19:09:15 +0530 Subject: [PATCH 1/2] babble_post_ready_for_translation hook added for notification --- class-jobs.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/class-jobs.php b/class-jobs.php index bf351f0..25b598f 100755 --- a/class-jobs.php +++ b/class-jobs.php @@ -679,7 +679,12 @@ public function save_post( $post_id, WP_Post $post ) { # @TODO individual language selection when marking post as translation ready $langs = bbl_get_active_langs(); $lang_codes = wp_list_pluck( $langs, 'code' ); - $this->create_post_jobs( $post->ID, $lang_codes ); + $jobs = $this->create_post_jobs( $post->ID, $lang_codes ); + + /** + * Fires when post ready for transaltion + */ + do_action( 'babble_post_ready_for_translation', $post_id, $post, $jobs ); } /** From 05b9a9a276d20eb7740004d3b20d3ec67651b8b1 Mon Sep 17 00:00:00 2001 From: Faishal Saiyed Date: Thu, 23 Jul 2015 22:13:14 +0530 Subject: [PATCH 2/2] Use the prefix bbl_ rather than babble_ --- class-jobs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class-jobs.php b/class-jobs.php index 9e24267..8c6676f 100755 --- a/class-jobs.php +++ b/class-jobs.php @@ -750,7 +750,7 @@ public function save_post( $post_id, WP_Post $post ) { /** * Fires when post ready for transaltion */ - do_action( 'babble_post_ready_for_translation', $post_id, $post, $jobs ); + do_action( 'bbl_post_ready_for_translation', $post_id, $post, $jobs ); } /**