Including a Software License

Standard
[display-posts post_type="content" id="3672" include_content=true include_title=false wrapper="div" wrapper_class=""]

Including a Software License

Most WordPress plugins are released under the GPL, which is the same license that WordPress itself uses. However, there are other options available. It is always best to clearly indicate the license your plugin uses.

In the Header Requirements section, we briefly mentioned how you can indicate your plugin’s license within the plugin header. Another common, and encouraged, practice is to place a license block near the top of your main plugin file (the same one that has the plugin header).

This license block usually looks something like this:

1
2
3
4
5
6
7
8
9
10
11
12
{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}.

When combined with the plugin header, you have:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
Plugin Name: Plugin Name
Description: This describes my plugin in a short sentence
Version: 1.5
Author: John Smith
License: GPL2
 
{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 {License URI}.
*/
 
Skip to toolbar