0

So, I've read through this question about licensing of PHP code under the GPL v2. As well as the compromise of the Thesis theme developer, as far as licensing all PHP under the GPL, but copyrighting js, css, images, etc.

My question is does ALL php have to be GPL?

Consider this scenario:

  • the php that generates the wp content/layout is under GPL
  • the JS is copyrighted (similar to the question linked above)
  • the JS makes AJAX requests to php code that generates certain data
  • this data-generating php code uses it's own datalayer (not wordpress's) and uses no wordpress code.

Can the data-generating php (separated into a different folder within the theme) be licensed other than GPL?

1

The data generating PHP, if it truly stands alone and doesn't use any WordPress code or WordPress' data layer, can be licensed as a standalone library. You can use any license you want here without any problems.

The only issues come when you start distributing your code. If you want your theme hosted in the theme repository on WordPress.org, it must be GPL-compatible. That means you have to use either GPL or a more permissible license on your extra library ...

If you're distributing things yourself, you just have to make a very clear distinction between the parts of the theme that are GPL and the parts that aren't. But since you'll be bundling a part that's not GPL, you can't distribute the entire package as GPL.

So no, all PHP does not have to be GPL unless you're distributing the entire package under the terms of the GPL.

| improve this answer | |
1

The position of the WordPress project leadership is clear: all PHP is derivative of WordPress, and therefore must be GPL. There are those who disagree, and licensing disputes abound.

In the end, this point remains: regardless of who is right and who is wrong, if you want your work to be recognized in/accepted by the WordPress community, use GPL.

| improve this answer | |
  • the point about staying in the good graces of the wordpress community is well taken – DTest Mar 30 '11 at 18:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.