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

MM-15562 Add a way to unregister post type components #2791

Merged
merged 1 commit into from
May 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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