Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
MM-15562 Add a way to unregister post type components (#2791)
Browse files Browse the repository at this point in the history
  • Loading branch information
hmhealey authored and lieut-data committed May 15, 2019
1 parent a1747f7 commit 5ce6d60
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions plugins/registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -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-<yourpluginid>']"
// Accepts a reducer. Returns undefined.
Expand Down

0 comments on commit 5ce6d60

Please sign in to comment.