The version registry key stores the version number of the plugin or component being described. This value is used to display to a user, and is used to determine if newer versions of this plugin or component exist.
The value of version should be any valid positive floating point number and should not contain and letters or special characters.
Sample Values
For those components that have custom data types that they define, it is highly recommended that they also define a `schema_version`. The `schema_version` is used by Movable Type to determine if changes are required to the structure of database when new components or plugins are installed. Each time Movable Type is loaded, the schema version of the database is compared to that of each component is compared to what is declared and stored within the system. If the declared schema version is greater then what is on record for that component, Movable Type begins the upgrade process to bring the schemas in sync.
The `schema_version` should be a simple integer, but can be a floating point number to indicate minute changes to the schema. Each time the schema for a component or plugin changes, the `schema_version` should be incremented.
Movable Type allows plugins and components to generate custom permissions that can be assigned to users. Permissions registered in this way will automatically appear within the user interface allowing administrators to immediate begin assigning that permission to users and roles.
The value associated with the `permissions` registry key is an array of permissions being defined. Each permission being registered in this way is itself a hash which defines the specific parameters governing the display and usage of that permission within the application.
Permissions within the registry support the following properties:
(Not currently used for rendering in the UI, but will be in the future.)
Note: as of MT 4.0, these values are hard coded in UI.
Permissions can be defined to operated within two different scopes: a blog specific scope or a system wide scope. The scope of a permission is specified by prefixing the permission's unique id or name with either "blog" or "system" followed by a period (".").
For example, to register a custom permission, use the following syntax.
$registry = {
permissions => {
'system.create_blog' => {
label => trans("Create Blogs"),
group => 'sys_admin',
order => 100,
},
},
};