Introduce `global_changes_plugin:transform_change/3`
diff --git a/src/global_changes_httpd.erl b/src/global_changes_httpd.erl
index dc7c08a..e76b494 100644
--- a/src/global_changes_httpd.erl
+++ b/src/global_changes_httpd.erl
@@ -13,6 +13,7 @@
 -module(global_changes_httpd).
 
 -export([handle_global_changes_req/1]).
+-export([default_transform_change/2]).
 
 -include_lib("couch/include/couch_db.hrl").
 
@@ -65,8 +66,11 @@
 handle_global_changes_req(Req) ->
     chttpd:send_method_not_allowed(Req, "GET").
 
+transform_change(Username, Change) ->
+    global_changes_plugin:transform_change(Username, Change,
+        fun default_transform_change/2).
 
-transform_change(Username, _Resp, {Props}) ->
+default_transform_change(Username, {Props}) ->
     {id, Id} = lists:keyfind(id, 1, Props),
     {seq, Seq} = lists:keyfind(seq, 1, Props),
     Info = case binary:split(Id, <<":">>) of
@@ -100,7 +104,7 @@
     {ok, Acc#acc{resp=Resp, last_data_sent_time=os:timestamp()}};
 changes_callback({change, Change0}, #acc{feed="continuous"}=Acc) ->
     #acc{resp=Resp, username=Username} = Acc,
-    case transform_change(Username, Resp, Change0) of
+    case transform_change(Username, Change0) of
         skip ->
             {ok, maybe_send_heartbeat(Acc)};
         Change ->
@@ -140,7 +144,7 @@
     }};
 changes_callback({change, Change0}, Acc) ->
     #acc{resp=Resp, prepend=Prepend, username=Username} = Acc,
-    case transform_change(Username, Resp, Change0) of
+    case transform_change(Username, Change0) of
         skip ->
             {ok, maybe_send_heartbeat(Acc)};
         Change ->
diff --git a/src/global_changes_plugin.erl b/src/global_changes_plugin.erl
new file mode 100644
index 0000000..d73a541
--- /dev/null
+++ b/src/global_changes_plugin.erl
@@ -0,0 +1,40 @@
+% Licensed under the Apache License, Version 2.0 (the "License"); you may not
+% use this file except in compliance with the License.  You may obtain a copy of
+% the License at
+%
+%   http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+% License for the specific language governing permissions and limitations under
+% the License.
+
+-module(global_changes_plugin).
+
+-export([transform_change/3]).
+
+-include_lib("couch/include/couch_db.hrl").
+
+-define(SERVICE_ID, global_changes).
+
+
+%% ------------------------------------------------------------------
+%% API Function Definitions
+%% ------------------------------------------------------------------
+
+transform_change(Username, Change, Default) ->
+    maybe_handle(transform_change, [Username, Change], Default).
+
+%% ------------------------------------------------------------------
+%% Internal Function Definitions
+%% ------------------------------------------------------------------
+
+maybe_handle(Func, Args, Default) ->
+    Handle = couch_epi:get_handle(?SERVICE_ID),
+    case couch_epi:apply(Handle, ?SERVICE_ID, Func, Args, [ignore_providers]) of
+        [] ->
+            apply(Default, Args);
+        [Result] ->
+            Result
+    end.