From 3811b8aa4c9fc08bf84d5da55b7927f4e300b9b5 Mon Sep 17 00:00:00 2001 From: Robin Ward <robin.ward@gmail.com> Date: Tue, 16 Feb 2016 12:25:01 -0500 Subject: [PATCH] `withPluginAPI` shim to updated plugins will not raise errors --- app/assets/javascripts/discourse/lib/plugin-api.js.es6 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/assets/javascripts/discourse/lib/plugin-api.js.es6 b/app/assets/javascripts/discourse/lib/plugin-api.js.es6 index b7a7ece9129..f5d66d738a6 100644 --- a/app/assets/javascripts/discourse/lib/plugin-api.js.es6 +++ b/app/assets/javascripts/discourse/lib/plugin-api.js.es6 @@ -15,3 +15,8 @@ export function decorateCooked(container, cb) { decorate(container.lookupFactory('view:embedded-post'), 'didInsertElement', cb); decorate(container.lookupFactory('view:user-stream'), 'didInsertElement', cb); } + +// Will be backported so plugins in the new format will not raise errors +export function withPluginApi(version) { + console.warn(`Plugin API v${version} is not supported`); +}