1. 主页
  2. 文档
  3. 插件及插件制作
  4. 插件基础
  5. 包括软件许可证

包括软件许可证

大多数WordPress插件是根据GPL发布的,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}.
*/
这篇文章对您有用吗?

我们要如何帮助您?