Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer

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.

share|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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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