diff --git a/connectors/class-connector-jetpack.php b/connectors/class-connector-jetpack.php index ee75ff504..eaa6a5842 100644 --- a/connectors/class-connector-jetpack.php +++ b/connectors/class-connector-jetpack.php @@ -379,10 +379,10 @@ public function callback_jetpack_log_entry( array $entry ) { $action = $method; $meta = compact( 'user_id', 'user_email', 'user_login' ); $message = sprintf( - /* translators: %1$s: a user display name, %2$s: a status, %3$s: the connection either "from" or "to" (e.g. "Jane Doe", "unlinked", "from") */ + /* translators: %1$s: a user display name, %2$s: a status and the connection either "from" or "to" (e.g. "Jane Doe", "unlinked from") */ __( '%1$s\'s account %2$s Jetpack', 'stream' ), $user->display_name, - ( 'unlink' === $action ) ? esc_html__( 'unlinked from', 'stream' ) : esc_html__( 'linked to', 'stream' ), + ( 'unlink' === $action ) ? esc_html__( 'unlinked from', 'stream' ) : esc_html__( 'linked to', 'stream' ) ); } elseif ( in_array( $method, array( 'register', 'disconnect', 'subsiteregister', 'subsitedisconnect' ), true ) ) { $context = 'blogs'; diff --git a/tests/tests/connectors/test-class-connector-jetpack.php b/tests/tests/connectors/test-class-connector-jetpack.php index 64795aa82..c42ab9282 100644 --- a/tests/tests/connectors/test-class-connector-jetpack.php +++ b/tests/tests/connectors/test-class-connector-jetpack.php @@ -79,7 +79,7 @@ public function test_callback_jetpack_log_entry() { \Jetpack::log( 'register' ); // Check callback test action. - $this->assertFalse( 0 === did_action( 'wp_stream_test_callback_jetpack_log_entry' ) ); + $this->assertFalse( 0 === did_action( $this->action_prefix . 'callback_jetpack_log_entry' ) ); } public function test_callback_sharing_get_services_state() { @@ -116,7 +116,7 @@ public function test_callback_sharing_get_services_state() { ); // Check callback test action. - $this->assertFalse( 0 === did_action( 'wp_stream_test_callback_sharing_get_services_state' ) ); + $this->assertFalse( 0 === did_action( $this->action_prefix . 'callback_sharing_get_services_state' ) ); } public function test_callback_jetpack_module_configuration_load_monitor() { @@ -145,7 +145,7 @@ public function test_callback_jetpack_module_configuration_load_monitor() { do_action( 'jetpack_module_configuration_load_monitor' ); // Check callback test action. - $this->assertFalse( 0 === did_action( 'wp_stream_test_callback_jetpack_module_configuration_load_monitor' ) ); + $this->assertFalse( 0 === did_action( $this->action_prefix . 'callback_jetpack_module_configuration_load_monitor' ) ); } public function test_check() { @@ -229,8 +229,8 @@ public function test_check() { $this->assertEquals( 200, $response->get_status() ); // Check callback test action. - $this->assertFalse( 0 === did_action( 'wp_stream_test_callback_add_option' ) ); - $this->assertFalse( 0 === did_action( 'wp_stream_test_callback_update_option' ) ); + $this->assertFalse( 0 === did_action( $this->action_prefix . 'callback_add_option' ) ); + $this->assertFalse( 0 === did_action( $this->action_prefix . 'callback_update_option' ) ); } public function test_track_post_by_email() { @@ -298,8 +298,8 @@ public function test_track_post_by_email() { do_action( 'wp_ajax_jetpack_post_by_email_regenerate' ); // Check callback test action. - $this->assertFalse( 0 === did_action( 'wp_stream_test_callback_wp_ajax_jetpack_post_by_email_enable' ) ); - $this->assertFalse( 0 === did_action( 'wp_stream_test_callback_wp_ajax_jetpack_post_by_email_regenerate' ) ); - $this->assertFalse( 0 === did_action( 'wp_stream_test_callback_wp_ajax_jetpack_post_by_email_disable' ) ); + $this->assertFalse( 0 === did_action( $this->action_prefix . 'callback_wp_ajax_jetpack_post_by_email_enable' ) ); + $this->assertFalse( 0 === did_action( $this->action_prefix . 'callback_wp_ajax_jetpack_post_by_email_regenerate' ) ); + $this->assertFalse( 0 === did_action( $this->action_prefix . 'callback_wp_ajax_jetpack_post_by_email_disable' ) ); } }