From 00b6904b662780040ed3c3d4ede34122275cb585 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Tue, 14 May 2019 10:01:09 -0400 Subject: [PATCH] MM-15562 Add a way to unregister post type components --- plugins/registry.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/registry.js b/plugins/registry.js index cc5039b6c7c0..f44b2eb68fb4 100644 --- a/plugins/registry.js +++ b/plugins/registry.js @@ -255,6 +255,16 @@ export default class PluginRegistry { }); } + // Unregister a component that provided a custom body for posts with a specific type. + // Accepts a string id. + // Returns undefined in all cases. + unregisterPostTypeComponent(componentId) { + store.dispatch({ + type: ActionTypes.REMOVED_PLUGIN_POST_COMPONENT, + id: componentId, + }); + } + // Register a reducer against the Redux store. It will be accessible in redux state // under "state['plugins-']" // Accepts a reducer. Returns undefined.