1. Home
  2. WordPress Plugin Developer Handbook
  3. ソフトウェアライセンスを含める

ソフトウェアライセンスを含める

ほとんどの WordPress プラグインは GPL の下でリリースされます。これはWordPress 自体が使用するのと同じライセンスです。 ただし、他のオプションも利用できます。 プラグインが使用するライセンスを明確に示すことが常に最善です。

ヘッダー要件セクションで、プラグインヘッダーコメント内でプラグインのライセンスを指定する方法について簡単に説明しました。 別の一般的で推奨される方法は、メインプラグインファイル(プラグインヘッダーコメントがあるもの)の上部近くにライセンスブロックコメントを配置することです。

通常、このライセンスブロックコメントは次のようになります。

<?php
/*
{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}.
*/
?>

プラグインヘッダーコメントと組み合わせると:

<?php
/*
Plugin Name: WordPress.org Plugin
Plugin URI:  https://developer.wordpress.org/plugins/the-basics/
Description: Basic WordPress Plugin Header Comment
Version:     20160911
Author:      WordPress.org
Author URI:  https://developer.wordpress.org/
Text Domain: wporg
Domain Path: /languages
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}.
*/
Updated on 2019年8月26日

Was this article helpful?

Related Articles

サポートが必要ですか?
もし、このサイトでわからない場合はこちらからお問い合わせください。
お問い合わせ