Linux Kernel, Modules and Plugins

Here are some views expressed by Linus Torvalds about the Linux kernel, plugins and how he thinks about derivative work. Very relevant to what I said about plugin interfaces and user space.

So, do themes and plugins serve a system-level or a user-level function?

p.s. Some have compared WordPress plugin and theme API to the way Linux loads kernel modules, when in fact relating it to system call interface (SCI) would be more appropriate.

di
di

KonstruktorsNotes?i=M3fQBsGaeUU:t0fH1Qbl KonstruktorsNotes?i=M3fQBsGaeUU:t0fH1Qbl KonstruktorsNotes?i=M3fQBsGaeUU:t0fH1Qbl KonstruktorsNotes?i=M3fQBsGaeUU:t0fH1Qbl KonstruktorsNotes?d=qj6IDK7rITs
M3fQBsGaeUU

GPL Sockets

It is interesting how thinking and understanding of ideas change over time. This morning I woke up and started reading the GPL licence with the intent to take another look at what it actually stands for.

I have come to conclusion that its purpose is to give everyone the freedom to do whatever they want with my work as long as they retain the freedom to derive from it.

With every software there are only two things one can do with it — either run it or modify it. By applying the GPL licence to my original work I am making sure that these two things can always happen and nobody can take those freedoms away.

The important point is that I am ‘enforcing’ these rules only in the context of the work that I have written and distributed. WordPress has been built upon the b2 blogging software by modifying its source code and adding new functionality, and because b2 was licensed under the GPL, the derived and altered source code is also licenced under the GPL. Although there might be not a single line of code left from the days of b2, WordPress started off as a tiny modification of its source code, and therefore must retain its licence. This is a very important point to understand for those trying to dismiss the spirit of GPL, because it’s the only thing left when every single line of code is different from the original. And it doesn’t matter if that change happened in a single patch or thousands of them.

Plugin functionality in WordPress didn’t exist in b2 and was added only in 2004 when WordPress 1.2 was released. Before that, one would have to make changes directly to the source code in order to alter the way WordPress works.

Therefore, the important question is — if changing the source code is clearly deriving from the original, then what is a plugin? Is it simply an elegant way to “modify” the source code or is it something else?

If we think of the plugin architecture as a “socket” through which one can get access to the “power”, does GPL has any say over what can be plugged into that socket? Do I, as the creator of the “socket”, want to determine and have control over what can be plugged in there?

I view software exactly as devices with plugs which need sockets of power to function. If lower level sockets didn’t exist, everyone would need to write software in assembly with the only knowledge being the hardware on which it will run. Like building a table lamp with its own wind farm.

Relying on existing interfaces for creating new functionality is an inherent feature of how computers work. Even programming languages can be considered as semantic interfaces through which we communicate and control the hardware. For example, WordPress will always need PHP to run. Outside PHP WordPress is not WordPress anymore.

With that comparison in mind, we should note that WordPress can be licensed under the GPL only because the licence of PHP doesn’t impose any restrictions or rules on how the products derived from it are licensed. At the same time, WordPress has no influence over how PHP can be used.

I think that once you create an interface in your software through which you want others to modify or change the way software works, you have given others the freedom to plug in anything into it. You have created an interface which no longer requires others to derive from your original work, in order to use it. When someone uses that interface, nothing is being changed or altered in your original work.

By creating such plugin architecture, you have decided to give others the freedom to add any type of functionality without any restrictions. That added functionality is a derivative work only in a sense that it uses your “socket”, while the functionality itself stands on its own. It’s like plugging an amplifier into an audio system — the amplification depends only on the existence of a signal not on the type of socket it’s passed through.

To conclude, I think WordPress plugins and themes are not derivative works of WordPress. Use of plugins and themes is protected by the freedom Zero of the GPL — “the freedom to run the program, for any purpose”. Once you have allowed users to run any plugins or themes, you can’t limit them to plugins and themes that are licensed only under GPL.

di
di

KonstruktorsNotes?i=SudpFHzLBFQ:mFSkdlWO KonstruktorsNotes?i=SudpFHzLBFQ:mFSkdlWO KonstruktorsNotes?i=SudpFHzLBFQ:mFSkdlWO KonstruktorsNotes?i=SudpFHzLBFQ:mFSkdlWO KonstruktorsNotes?d=qj6IDK7rITs
SudpFHzLBFQ

Location Aware Login Prompt

Define your home as a GPS location +/- 50 m. If you are within that area, you don’t have to enter the password. If you are outside that area, you are requested to select three images in the right order from a grid of nine images. If that fails, you are requested to enter the password.

This would be extremely useful for all the tablets out there.

di
di

KonstruktorsNotes?i=fCpS_ipMqQI:MTsj9k1I KonstruktorsNotes?i=fCpS_ipMqQI:MTsj9k1I KonstruktorsNotes?i=fCpS_ipMqQI:MTsj9k1I KonstruktorsNotes?i=fCpS_ipMqQI:MTsj9k1I KonstruktorsNotes?d=qj6IDK7rITs
fCpS_ipMqQI

Automatic Updates for Plugins and Themes Hosted Outside WordPress Extend

Here are two sample scripts along with an API to provide automatic updates for plugins and themes you host on your own server.

Inside /api you’ll find index.php which processes all the update requests. You should place this in something like http://updates.example.com and update $api_url in /plugin/test-plugin-update/test-plugin-update.php and /theme/portfolio-racer/inc/updates.php accordingly. If you activate these sample plugins without changing API URL, updates will be checked against my test server. If you decide to update, both plugin and theme will be replaced with exactly the same version of each.

di
di

KonstruktorsNotes?i=OtTg8cWfSyU:roTkB8-x KonstruktorsNotes?i=OtTg8cWfSyU:roTkB8-x KonstruktorsNotes?i=OtTg8cWfSyU:roTkB8-x KonstruktorsNotes?i=OtTg8cWfSyU:roTkB8-x KonstruktorsNotes?d=qj6IDK7rITs
OtTg8cWfSyU

OpenID and PHP 5.3

Here is a fix to make the OpenID plugin (version 3.3.2) work with PHP 5.3. Without it, you would get an error when trying to login:

This is an OpenID Server. Nothing to see here… move along.

di
di

KonstruktorsNotes?i=Us-gi61Hh3U:yFjictCU KonstruktorsNotes?i=Us-gi61Hh3U:yFjictCU KonstruktorsNotes?i=Us-gi61Hh3U:yFjictCU KonstruktorsNotes?i=Us-gi61Hh3U:yFjictCU KonstruktorsNotes?d=qj6IDK7rITs
Us-gi61Hh3U