-
-
Notifications
You must be signed in to change notification settings - Fork 166
Custom modules
The "Custom modules" field in the Settings->Themes
or Settings->Plugins
also enables you to install a theme (or plugin) that is not listed in the official WonderCMS repository.
Custom modules can be used to serve your theme or plugin to other users. There are some full project examples which can be copied at the bottom of this document with some more helpful links.
As a plugin or theme maintainer, a few files must be provided for these modules to be correctly installed for WonderCMS users.
-
Your theme module must include the following files:
-
theme.php
contains your theme and all WonderCMS theme elements
-
style.css
must be inside a /css folder
-
preview.jpg
compressed screenshot of your theme
-
wcms-modules.json
file with the following fields below
-
theme.php
{
"version": 1,
"themes": {
"theme-name": {
"name": "Name of your theme",
"repo": "https://github.com/yourUsername/theme-name/tree/master",
"zip": "https://github.com/yourUsename/theme-name/archive/master.zip",
"summary": "My sample theme",
"version": "2.0.0",
"image": "https://raw.githubusercontent.com/yourUsername/theme-name/master/preview.jpg"
}
}
}
Note: Leave the first version: 1
at the top as it is, it is used for reading the format of the module.
-
Your plugin module must include the following files:
-
plugin-name.php
contains your plugin code
- IMPORTANT: plugin-name.php must be the same as the plugin folder name
-
preview.jpg
compressed screenshot of your plugin
-
wcms-modules.json
file with the following fields below
-
plugin-name.php
{
"version": 1,
"plugins": {
"plugin-name": {
"name": "Name of your plugin",
"repo": "https://github.com/yourUsername/plugin-name/tree/master",
"zip": "https://github.com/yourUsename/plugin-name/archive/master.zip",
"summary": "My sample plugin",
"version": "2.0.0",
"image": "https://raw.githubusercontent.com/yourUsername/plugin-name/master/preview.jpg"
}
}
}
Note: Leave the first version: 1
at the top as it is, it is used for reading the format of the module.
After finishing creating a custom theme/plugin module, login to your website and open Settings -> Themes or Plugins and scroll to the bottom.
Paste your full wcms-modules.json URL
- example:
https://raw.githubusercontent.com/yourUsername/theme-name/master/wcms-modules.json
) and click "Add". Your module (theme/plugin) should be now listed in the Settings -> Themes/Plugins section. Reopen settings to install it.
- Make new changes to your theme/plugin files.
- Change the version file in the wcms-modules.json (eg: from 3.0.0 to 3.0.1) after you've confirmed everything is working.
- Users will receive an "Update" notification in their Settings panel.
- This will happen either after 24 hours after logging in OR when the users manually click the "Check for updates" button in the Settings panel.
- When "Update" is clicked, the users existing theme/plugin (from your changed files) will be overwritten with the latest ones from your theme/plugin changes.
- After you've created a Custom module as shown above, simply share the link.
- Share your creation with our community.
- If you're confident in your module, you can create a pull request to the official WonderCMS theme/plugins repository and CDN with your theme/plugin URL.
- Pull requests can be made to the themes-list.json or the plugins-list.json.
Still need help?
- Ask a question or make a request in the community.
- Official website
Intro
- Home
- Demo
- Download
- One step install
- Requirements
- 5 file structure
- List of hooks
- Included libraries
- Create theme in 8 easy steps
- Create a plugin
- Custom modules
- Translations
- All security features described
Basic how to's
- Backup all files
- Change default login URL
- Change default password
- Create custom page template
- Create new editable areas or editable blocks
- Edit 404 page
- Get data from database
- Set data to database
- Hide page from menu
- Caddy web server config
- IIS server config
- NGINX server config
- Login
- Recover login URL
- Reset password
- Restore backup
- Update
- PHP built in server
Themes
- Create theme in 8 easy steps
- Add favicon
- Theme tags
- Update theme to work with WonderCMS 2.0.0
- Update theme to work with WonderCMS 3.0.0
- Share your themes with Custom modules
Plugins
- Quick intro on creating plugins and List of hooks
- Share your plugin with simply with Custom modules
Security
- All security features described
- Add SRI tags to your theme libraries
- Always redirect to https and www
- Additional security configuration(s)
- Add SRI tags to your theme libraries
- Better security mode (HTTPS and other features)
Features description
- One click update
- Optional: functions.php file
- Default database.js
- Allowed extensions file types for uploads
- Login URL doesn't work - 404
- 500 internal server error
- Persistent "New WonderCMS update available" message
- URLs mailformed on Windows IIS
- Other errors