Chapter 2

Exploring the World of Open-Source Software

IN THIS CHAPTER

Check Exploring open-source concepts

Check Discovering examples of open-source projects

Check Understanding WordPress licensing

Check Applying WordPress licensing

Open-source software is a movement that started in the software industry in the 1980s. Its origins are up for debate, but most people believe that the concept came about in 1983, when a company called Netscape released its Navigator web browser source code to the public, making it freely available to anyone who wanted to dig through it, modify it, or redistribute it.

WordPress software users need a basic understanding of the open-source concept and the licensing upon which WordPress is built because WordPress’s open-source policies affect you as a user — and greatly affect you if you plan to develop plugins or themes for the WordPress platforms. A basic understanding helps you conduct your practices in accordance with the license at the heart of the WordPress platform.

This chapter introduces you to open-source; the Open Source Initiative (OSI); and the GNU General Public License (GPL), which is the specific license that WordPress is built upon (GPLv2, to be exact). You also discover how the GPL license applies to any projects you may release (if you’re a developer of plugins or themes) that depend on the WordPress software and how you can avoid potential problems by abiding by the GPL as it applies to WordPress.

Remember IANAL — I Am Not a Lawyer — is an acronym that you often find in articles about WordPress and the GPL. I use it here because I’m not a lawyer, and the information in this chapter shouldn’t be construed as legal advice. Rather, you should consider the chapter to be an introduction to the concepts of open-source and the GPL. The information presented here is meant to inform you about and introduce you to the concepts as they relate to the WordPress platform.

Defining Open-Source

A simple, watered-down definition of open-source software is software whose source code is freely available to the public and that can be modified and redistributed by anyone without restraint or consequence. An official organization called the Open Source Initiative (OSI; https://opensource.org), founded in 1998 to organize the open-source software movement in an official capacity, has provided a very clear and easy-to-understand definition of open-source. During the course of writing this book, I obtained permission from the OSI board to include it here.

Open-source doesn’t just mean access to the source code. The distribution terms of open-source software must comply with the following criteria:

  1. Free Redistribution

    The license shall not restrict any party from selling or giving away the software as a component of an aggregate software distribution containing programs from several different sources. The license shall not require a royalty or other fee for such sale.

  2. Source Code

    The program must include source code, and must allow distribution in source code as well as compiled form. Where some form of a product is not distributed with source code, there must be a well-publicized means of obtaining the source code for no more than a reasonable reproduction cost preferably, downloading via the Internet without charge. The source code must be the preferred form in which a programmer would modify the program. Deliberately obfuscated source code is not allowed. Intermediate forms such as the output of a preprocessor or translator are not allowed.

  3. Derived Works

    The license must allow modifications and derived works, and must allow them to be distributed under the same terms as the license of the original software.

  4. Integrity of the Author’s Source Code

    The license may restrict source-code from being distributed in modified form only if the license allows the distribution of “patch files” with the source code for the purpose of modifying the program at build time. The license must explicitly permit distribution of software built from modified source code. The license may require derived works to carry a different name or version number from the original software.

  5. No Discrimination Against Persons or Groups

    The license must not discriminate against any person or group of persons.

  6. No Discrimination Against Fields of Endeavor

    The license must not restrict anyone from making use of the program in a specific field of endeavor. For example, it may not restrict the program from being used in a business, or from being used for genetic research.

  7. Distribution of License

    The rights attached to the program must apply to all to whom the program is redistributed without the need for execution of an additional license by those parties.

  8. License Must Not Be Specific to a Product

    The rights attached to the program must not depend on the program’s being part of a particular software distribution. If the program is extracted from that distribution and used or distributed within the terms of the program’s license, all parties to whom the program is redistributed should have the same rights as those that are granted in conjunction with the original software distribution.

  9. License Must Not Restrict Other Software

    The license must not place restrictions on other software that is distributed along with the licensed software. For example, the license must not insist that all other programs distributed on the same medium must be open-source software.

  10. License Must Be Technology-Neutral

    No provision of the license may be predicated on any individual technology or style of interface.

The preceding items comprise the definition of open-source as provided by the OSI. You can find this definition (see Figure 2-1) at https://opensource.org/osd.

Screenshot of the Open Source Initiative page displaying the Open Source Definition from the OSI.

FIGURE 2-1: Definition of open-source from the OSI.

Open-source software source code must be freely available, and any licensing of the open-source software must abide by this definition. Based on the OSI definition, WordPress is an open-source software project. Its source code is accessible and publicly available for anyone to view, build on, and distribute at no cost anywhere, at any time, or for any reason.

Several examples of high-profile software enterprises, such as the ones in the following list, are also open-source. You’ll recognize some of these names:

  • Mozilla (https://www.mozilla.org): Community whose projects include the popular Firefox Internet browser and Thunderbird, a popular email client. All projects are open-source and considered to be public resources.
  • PHP (http://php.net): An HTML-embedded scripting language that stands for PHP Hypertext Preprocessor. PHP is popular software that runs on most web servers today; its presence is required on your web server for you to run the WordPress platform successfully on your site.
  • MySQL (https://www.mysql.com): The world’s most popular open-source database. Your web server uses MySQL to store all the data from your WordPress installation, including your posts, pages, comments, links, plugin options, theme option, and widgets.
  • Linux (https://www.linux.org): An open-source operating system used by web hosting providers, among other organizations.

As open-source software, WordPress is in some fine company. Open-source itself isn’t a license; I cover licenses in the next section. Rather, open-source is a movement — some people consider it to be a philosophy — created and promoted to provide software as a public resource open to community collaboration and peer review. WordPress development is clearly community-driven and focused. You can read about the WordPress community in Book 1, Chapter 4.

Understanding WordPress Licensing

Most software projects are licensed, meaning that they have legal terms governing the use or distribution of the software. Different kinds of software licenses are in use, ranging from very restrictive to least restrictive. WordPress is licensed by the GNU General Public License version 2 (GPLv2), one of the least restrictive software licenses available.

If you’re bored, read the GPL text at www.gnu.org/licenses/gpl-2.0.html. Licensing language on any topic can be a difficult thing to navigate and understand. It’s sufficient to have a basic understanding of the concept of GPL and let the lawyers sort out the rest, if necessary.

Tip A complete copy of the GPL is included in every copy of the WordPress download package, in the license.txt file. The directory listing of the WordPress software files shown in Figure 2-2 lists the license.txt file.

Screenshot of the GPL text displaying the directory listing of the WordPress software files.

FIGURE 2-2: The GPL text is included in every copy of WordPress.

Simply put, any iteration of a piece of software developed and released under the GPL must be released under the very same license in the future. Check out the nearby sidebar “The origins of WordPress,” which tells the story of how the WordPress platform came into existence. Essentially, the software was forked — meaning that the original software (in this case, a blogging platform called b2) was abandoned by its original developer and adopted by the founders of WordPress, who took the b2 platform, called it WordPress, and began a new project with a new plan, outlook, and group of developers.

Because the b2 platform was originally developed and released under the GPL, by law, the WordPress software (all current and future iterations of the platform) must also abide by the GPL. Because of the nature of the GPL, you, your next-door neighbor, or I could do the very same thing with the WordPress platform. Nothing is stopping you, or anyone else, from taking WordPress, giving it a different name, and rereleasing it as a completely different project. Typically, open-source projects are forked when the original project development stalls or is abandoned (as was the case with b2) or (in rare cases) when the majority of the development community is at odds with the leadership of the open-source project. I'm not suggesting that you do that, though, because WordPress has one of the most active development communities of any open-source project I’ve come across.

Applying WordPress Licensing to Your Projects

Regular users of WordPress software need never concern themselves with the GPL of the WordPress project at all. You don’t have to do anything special to abide by the GPL. You don’t have to pay to use the WordPress software, and you aren’t required to acknowledge that you’re using the WordPress software on your site. (That said, providing on your site at least one link back to the WordPress website is common courtesy and a great way of saying thanks.)

Most people aren’t even aware of the software licensing because it doesn’t affect the day-to-day business of blogging and publishing sites with the platform. It’s not a bad idea to educate yourself on the basics of the GPL, however. When you try to be certain that any plugins and themes you use with your WordPress installation abide by the GPL, you have peace of mind that all applications and software you’re using are in compliance.

Your knowledge of the GPL must increase dramatically, though, if you develop plugins or themes for the WordPress platform. (I cover WordPress themes in Book 6 and WordPress plugins in Book 7.)

The public licensing that pertains to WordPress plugins and themes wasn’t decided in a court of law. The current opinion of the best (legal) practices is just that: opinion. The opinion of the WordPress core development team, as well as the opinion of the Software Freedom Law Center (https://www.softwarefreedom.org/services), is that WordPress plugins and themes are derivative works of WordPress and, therefore, must abide by the GPL by releasing the development works under the same license that WordPress has.

A derivative work, as it relates to WordPress, is a work that contains programming whose functionality depends on the core WordPress files. Because plugins and themes contain PHP programming that call WordPress core functions, they rely on the core WordPress framework to work properly and, therefore, are extensions of the software.

Technical stuff The text of the opinion by James Vasile from the Software Freedom Law Center is available at https://wordpress.org/news/2009/07/themes-are-gpl-too.

To maintain compliance with the GPL, plugin or theme developers can’t release development work under any (restrictive) license other than the GPL. Nonetheless, many plugin and theme developers have tried to release material under other licenses, and some have been successful (from a moneymaking standpoint). The WordPress community, however, generally doesn’t support these developers or their plugins and themes. Additionally, the core WordPress development team considers such works to be noncompliant with the license and, therefore, with the law.

WordPress has made it publicly clear that it won’t support or promote any theme or plugin that isn’t in 100 percent compliance with the GPL. If you’re not 100 percent compliant with the GPL, you can’t include your plugin or theme in the WordPress Plugin Directory hosted at https://wordpress.org/plugins. If you develop plugins and themes for WordPress, or if you’re considering dipping your toe into that pool, do it in accordance with the GPL so that your works are in compliance and your good standing in the WordPress community is protected.

Table 2-1 provides a brief review of what you can (and can’t) do as a WordPress plugin and theme developer.

TABLE 2-1 Development Practices Compliant with GPL License

Development/Release Practice

GPL-Compliant?

Distribute to the public for free with GPL.

Yes

Distribute to the public for a cost with GPL.

Yes

Restrict the number of users of one download with GPL.

No

Split portions of your work among different licenses. (PHP files are GPL; JavaScript or CSS files are licensed with the Creative Commons license.)

Yes (but WordPress.org won’t promote works that aren’t 100 percent GPL across all files)

Release under a different license, such as the PHP License.

No

The one and only way to make sure that your plugin or theme is 100 percent compliant with the GPL is to do the following before you release your development work to the world:

  • Include a statement in your work indicating that the work is released under the GPLv2 license in the license.txt file, which WordPress does. (Refer to Figure 2-2.) Alternatively, you can include this statement in the header of your plugin file:

    <?php

    This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation.

    This program 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 this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St., Fifth Floor, Boston, MA 02110-1301 USA
    */
    ?>

  • Don’t restrict the use of your works by the number of users per download.
  • If you charge for your work, which is compliant with the GPL, the licensing doesn’t change, and users still have the freedom to modify your work and rerelease it under a different name.
  • Don’t split the license of other files included in your work, such as CSS or graphics. Although this practice complies with the GPL, it won’t be approved for inclusion in the WordPress Plugin Directory.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.40.43