From d6ec1ea1e5ee03f7e6934647614e60101422a213 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Fri, 23 Aug 2013 18:37:54 +0100 Subject: [PATCH] Remove `plugin` field now that we've got the `plugin-type` field I've been meaning to remove the `plugin` field for ages. --- boot/boot.js | 3 +-- core/docs/fields/plugin.tid | 3 --- core/modules/tiddler.js | 2 +- editions/tw5.com/tiddlers/concepts/TiddlerFields.tid | 1 - 4 files changed, 2 insertions(+), 7 deletions(-) delete mode 100644 core/docs/fields/plugin.tid diff --git a/boot/boot.js b/boot/boot.js index 07b10c6b1..2e6c2e9b6 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -741,7 +741,7 @@ $tw.Wiki.prototype.registerPluginTiddlers = function(pluginType,titles) { registeredTitles = []; // Go through the provided titles, or the entire tiddler list, looking for plugins of this type var checkTiddler = function(tiddler) { - if(tiddler && tiddler.fields.type === "application/json" && tiddler.hasField("plugin") && tiddler.fields["plugin-type"] === pluginType) { + if(tiddler && tiddler.fields.type === "application/json" && tiddler.fields["plugin-type"] === pluginType) { self.plugins.push(tiddler); registeredTitles.push(tiddler.fields.title); } @@ -1173,7 +1173,6 @@ $tw.loadPluginFolder = function(filepath,excludeRegExp) { var fields = { title: pluginInfo.title, type: "application/json", - plugin: "yes", text: JSON.stringify(pluginInfo,null,4), "plugin-priority": pluginInfo["plugin-priority"], "name": pluginInfo["name"], diff --git a/core/docs/fields/plugin.tid b/core/docs/fields/plugin.tid deleted file mode 100644 index 0a3b037d2..000000000 --- a/core/docs/fields/plugin.tid +++ /dev/null @@ -1,3 +0,0 @@ -title: $:/docs/fields/plugin - -Set to "yes" to indicate that a tiddler is a plugin \ No newline at end of file diff --git a/core/modules/tiddler.js b/core/modules/tiddler.js index 0189b89dd..7b59b8c77 100644 --- a/core/modules/tiddler.js +++ b/core/modules/tiddler.js @@ -17,7 +17,7 @@ exports.hasTag = function(tag) { }; exports.isPlugin = function() { - return this.fields.type === "application/json" && this.hasField("plugin") && this.hasField("plugin-type"); + return this.fields.type === "application/json" && this.hasField("plugin-type"); } exports.getFieldString = function(field) { diff --git a/editions/tw5.com/tiddlers/concepts/TiddlerFields.tid b/editions/tw5.com/tiddlers/concepts/TiddlerFields.tid index 4f9762fc0..19d8809d0 100644 --- a/editions/tw5.com/tiddlers/concepts/TiddlerFields.tid +++ b/editions/tw5.com/tiddlers/concepts/TiddlerFields.tid @@ -21,7 +21,6 @@ Other fields used by the core are: * `footer` - The footer for a modal dialogue (interpreted as WikiText) * `library` - Set to `yes` if the tiddler should be loaded in the browser as a `