Lesson 8.1: Licensing a theme
A theme without a clear license cannot safely be used by anyone, and a theme that copies someone else's fonts or icons without their license can get its users into trouble. This lesson gives learners the four decisions every theme needs and lets them apply them to the files they made in this course.
Note This lesson explains licensing choices as the documentation describes them. It is not legal advice; for a contract or a doubt about compatibility, ask a lawyer who knows software licensing.
At a glance
| Course | Theme design |
| Module | Module 8: Licensing and releasing |
| Duration | 45 minutes (20 presenting, 25 exercise) |
| Level | Intermediate |
| Audience | Designers and developers who publish or sell themes |
| Prerequisites | Module 7 |
Learning objectives
After this lesson, learners can:
- name the licenses Exponential itself uses for its software, its documentation and its themes;
- make the four licensing decisions for a theme;
- list every part of their theme with its author and license;
- name the license consistently in
LICENSE, the README,composer.json,ezinfo.phpandextension.xml.
Trainer's notes
How to present it
Source: Licensing choices: an overview and the pages it links.
What Exponential uses (4 minutes). The software: GNU GPL version 2 or later (
GPL-2.0-or-later). The documentation: GNU FDL 1.3 or later. The published 7x themes:GPL-2.0-or-later.The four decisions (8 minutes).
Part Common choice Page Templates, CSS, JavaScript, PHP GPL-2.0-or-laterThe GPL for theme code The theme's documentation GFDL 1.3 or a Creative Commons license The GFDL for theme documentation Your own images and graphics A Creative Commons license Creative Commons for images Fonts, icons and libraries by others Whatever their authors chose; you must comply Third-party fonts, icons and libraries What the wizards offer (3 minutes). The design extension wizard and the package wizard list the licenses of
package.ini [LicenseSettings]: the GPL, LGPL and AGPL families, MIT, the GFDL, Creative Commons licenses and more.Where it is written (5 minutes).
LICENSEfor the code; separate license files next to assets under other terms; every license in the README with what it covers; the code license incomposer.json(SPDX),ezinfo.phpandextension.xml.
Common questions
Can I sell a GPL theme? Yes; the GPL allows selling, with conditions. See The GPL and selling and Commercial terms next to the GPL.
The icons of admin4 are MIT. Does my theme ship them? No: they are part of the installation
(share/icons/bootstrap-icons/, with their license beside them). Your theme ships only what is in its own folder.
Can I use a font from a font service? Only under its license, and with the privacy question of loading it from another host; ship a copy when the license allows it.
Pitfalls
- Copying files from a shipped theme or icon set without checking their license. The crystal icon themes, for
example, carry their own
COPYINGfile. - A license in
composer.jsonthat differs fromLICENSE. Check all five places. - Treating "free to download" as "free to reuse". Read the license, not the download page.
Hands-on exercise
On your training installation, in extension/training_theme/. Work alone, then compare with a neighbour.
- List the theme's files:
find . -type f -not -path './.git/*' | sort. - Make a table with the columns File or folder, Author, License, Where the license is written.
- Fill a row for the templates, the stylesheets, the script,
ezinfo.phpandextension.xml(your own code). - Fill a row for the SVG flag you drew in lesson 6.2, and for the PNG icons of lesson 6.1. If you copied the PNGs
from
share/icons/crystal-admin/, readshare/icons/crystal-admin/COPYINGand write down what it says about reuse. - Fill a row for the README (documentation).
- Decide each row's license using the four decisions. Where a part is under another license than the code, write the name of the separate license file you would add next to it.
- Check the five places for the code license:
LICENSE, README,composer.json,ezinfo.php,extension.xml. Correct any that differ. - Add a section "Licenses" to the README that lists each license and what it covers.
Expected result
- Every file of the theme has an author and a license in the table; nothing is "unknown".
- Copied icons are either replaced by the learner's own, or listed with their license and its file.
- The five places name the same code license; the README lists every license.
- The trainer checks two learners' tables and the README section.
Quiz
- Under which license is the Exponential software published?
A. MIT B.
GPL-2.0-or-laterC. GFDL 1.3 D. CC BY 4.0 - Name the four licensing decisions of a theme.
- Under which license is this documentation published?
- Your theme uses a font by another designer. What decides whether you may ship it?
- Name the five places that must state the theme's code license.
Answers
- B. (Licensing choices)
- The code, the documentation, your own images, and third-party fonts, icons and libraries.
- The GNU Free Documentation License 1.3 or later.
- The font's license, chosen by its author; you must comply with it.
LICENSE, the README,composer.json,ezinfo.phpandextension.xml.
Further reading
- Licensing choices: an overview.
- Assets under separate licenses.
- Copyright notices in files and Copyright and author lines.
- Choosing a license in the package wizard.
Related pages
- Module 8: Licensing and releasing
- Theme design: course overview
- Trainers: start here
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.