Licensing
Overview
ValPress is released under the GNU General Public License version 3 (GPLv3). This is a strong copyleft license that ensures the software remains free and open-source for all users, protecting the rights of developers and contributors while fostering a collaborative ecosystem.
Why It Matters
Licensing is the legal foundation of the ValPress ecosystem. By using the GPLv3, we ensure:
- Freedom to Modify: You can change the code to fit your needs.
- Freedom to Distribute: You can share the software and your modifications.
- Open Ecosystem: All extensions (plugins and themes) that interact with the core must respect the same freedoms, preventing the fragmentation of the platform into proprietary, "black-box" components.
How It Works
As a derivative work of Laravel (MIT) and incorporating various libraries, ValPress adopts the GPLv3 for its core. Because plugins and themes are designed to extend the core functionality of ValPress through hooks, filters, and direct API calls, they are legally considered derivative works.
The "GPL-Only" Rule: All plugins and themes distributed for ValPress must be licensed under the GPLv3 or a compatible license. This ensures that the entire stack remains interoperable and that users retain their rights across all components of their CMS.
Usage
When developing for ValPress, you must include appropriate licensing information in your project. This typically involves:
- Including a
LICENSEfile in your plugin or theme root. - Adding a license header to your main entry files (
plugin.phporfunctions.php). - Declaring the license in your
config.phpmetadata.
Code Examples
Plugin Header Example
Your plugin.php should clearly state the license and copyright holder.
<?php
/**
* Plugin Name: Advanced Analytics
* Description: Real-time traffic monitoring for ValPress.
* Version: 1.2.0
* Author: DevTeam
* License: GPL-3.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
*/
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
if (!defined('VALPRESS_VERSION')) {
exit;
}
Theme Metadata Example
In your theme's config.php, include the license identifier.
return [
'name' => 'Minimalist Pro',
'slug' => 'minimalist-pro',
'author' => 'DevTeam',
'version' => '2.0.1',
'license' => 'GPL-3.0-or-later',
'description' => 'A high-performance, GPL-compliant theme for ValPress.',
'screenshot' => 'screenshot.png',
];
Including the Full License
Always include a LICENSE file in your repository. You can obtain the standard GPLv3 text from gnu.org.
Advanced Usage
Bundled Libraries
If your plugin or theme bundles third-party libraries (e.g., a JS slider or a PHP client), those libraries must have GPL-compatible licenses (e.g., MIT, BSD, or
LGPL). You should document these in a THIRD-PARTY-NOTICES file.
Commercial Distribution
The GPLv3 allows you to sell your plugins and themes. However, you cannot restrict the user's right to redistribute the code after purchase. You are selling the service (updates, support, easy installation) rather than the license to use the code.
Best Practices
- Standard Identifiers: Use SPDX license identifiers like
GPL-3.0-or-later. - Consistent Headers: Apply the license header to every PHP file in your extension.
- Clear Attribution: Maintain a clear
Authorfield to ensure you get credit for your work while keeping the code free.
Common Mistakes
- Attempting to Dual-License: You cannot license the PHP code of a plugin as "Proprietary" if it uses ValPress core APIs; it must be GPL.
- Missing License File: Distributing code without a
LICENSEfile creates legal ambiguity. - Incompatible Bundled Code: Using a "Creative Commons Non-Commercial" library inside a GPL plugin is a violation, as GPL allows commercial use.
Summary
ValPress is built on the principle of open-source freedom. By ensuring your plugins and themes are licensed under the GPLv3, you contribute to a healthy, transparent, and sustainable ecosystem where every user and developer benefits from shared progress.