Information for Helper, Translator and other Plugin-Developer
This Page isn’t complete, yet. Sorry.
It is only a rough draft at the moment, but I will complete this page as soon as possible.
This are information for other people who want help to develop the Role Manager Plugin. Information for Translators are located in the multilanguage-stuff for Role Manager. For developers of other Plugins it is an extra part available, what hold information to enhance a Plugin to use Roles and Capabilities.
Version-Numbering
The version number has the following three parts: major.minor.patch. All parts represent an unique level for a release. The minor-part of the version-number has an extra functionality: here you can see, if you use a regular or a developer
release. If the minor number is even - this is a regular release. On the other hand - odd minor numbers are a sign for a developer release.
Warning: Don’t use developer releases in production environment!
Help to develop the Role Manager Plugin
The most important parts of the development can be found at the project-page at sourceforge:
http://sourceforge.net/projects/role-manager.
Developer-Sourcecode, Developer-Releases and so on
All parts of the sourcecode are under the control of subversion. The basic-layout is:
- /branches/
- all public released series (2.0.x, 2.2.x and so on)
- /dev-releases/
- all released snapshots for developer (2.1.0, …)
- /tags/
- all released public versions (2.0.5, 2.0.6, …)
- /trunk/
- the development tree
The latest source can be found via subversion-access with:
svn co https://role-manager.svn.sourceforge.net/svnroot/role-manager/trunk role-manager
If you want browse the svn-repository you can do it via
http://role-manager.svn.sourceforge.net/viewvc/role-manager/
For other Plugin-Authors
In the moment this part describes only some parts from the core of WordPress you can use. One of the next upcoming Role Manager releases - 2.2.x - will expand this with new functions.
Using functionality from the WordPress-Core to enhance your Plugin
An other place for information about this is Ryans Post about Roles and Capabilities or the Code from the API.
The decision if a user (not) can do something
To check if the current user has a capability to do something, plugins can make use of the current_user_can() function.
if ( current_user_can('edit_posts') ) {
/* user is allowed */
} else {
/* user isn't allowed */
}
Check if a Role has a Capability
For this purpose you can use this code:
$role = get_role('administrator');
if ($role->has_cap('edit_user')) {
/* the Capability is assigned to this Role */
}
For Translator
First of all you need to know the basics about Localization. The easiest way to get this knowledge, you can read this
article about translating WordPress from the WordPress Codex. The article holds also the information, which tools you need.
The next step to translating the Role Manager in your languages is to open the .pot-File. The file role-manger.pot resides in the language-directory under wp-content/plugins/role-manager.
If you are finished with your translation you have .mo and .po-files of your language. Put both together in a single zip-archive and go to the translation-tracker to submit this zip-archive as a new tracker-issue. Thats all.
I will add your language-files to the next release of the Plugin.
Announcement if a new pot-file is created
From time to time I genrate a new pot-File for the Role Manager. After a new file is created I will send a message to the mailing-listrole-manager-translations@lists.sourceforge.net
This is a very low traffic list only for this purpose and it is a good idea, if you subscribe to this list. You can do it here:
https://lists.sourceforge.net/lists/listinfo/role-manager-translations
