大多数WordPress插件是在GPL下发布的,这与WordPress本身使用的许可相同。但是,还有其他兼容选项可用。最好明确指出插件使用的许可证。
在页头要求一节中,我们简要介绍了如何表明您的插件页头注释中的插件许可证。另一种常见且受鼓励的做法是在主插件文件(与插件页头注释相同)顶部附近放置许可证注释块。
此许可证注释块通常如下所示:
/* {Plugin Name} 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 2 of the License, or any later version. {Plugin Name} is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with {Plugin Name}. If not, see {URI to Plugin License}. */