Lightweight YouTube Channel Widget
Author: Daniel Jonsson
License: GPL version 3
Download URL: https://wordpress.org/plugins/lightweight-youtube-channel-widget/
As the original codebase (YouTube Channel version 22.214.171.124) is licensed under GPLv3, this project as a whole needs to retain that license. However, my contributions are licensed under the MIT License, though not very useful as long as the there still exists GPL licensed code in the project.
|Lightweight YouTube Channel Widget 10.0||YouTube Channel 126.96.36.199|
|PHP SLOC *||438||1452|
|PHP LOC *||623||1853|
|WordPress plugin dependencies||-||Redux Framework|
|CSS, minimized||1.1 kB ‖||7.1 kB ¶|
* Calculated by CLOC.
† jQuery version 1.11.1 bundled with WordPress 4.1.
‡ 95807 + 22012 + 1746 + 270 = 119835
§ 22012 + 1746 + 270 = 24028
‖ 1139 = 1139
¶ 5998 + 1139 = 7137
Note, SI unit prefixes are used, where k = kilo = 1000.
Local development and testing
The plugin can easily be tested locally during development with Docker.
The following two steps will create a Docker container with a complete LAMP stack and a WordPress blog running within it:
$ sudo docker build -t wordpress . $ sudo docker run -i -t -p 80:80 -v `pwd`:/var/www/html/wordpress/wp-content/plugins/lightweight-youtube-channel-widget wordpress
The blog is then accessible at http://localhost/wordpress.
Build a zip file containing the plugin with all its necessary files by running the following command:
The assets (banners, screenshots and icon) being used on wordpress.org/plugins/lightweight-youtube-channel-widget/ are found in the directory wp-assets/.
Generate POT file
Attach to the Docker container and run the following command inside it:
$ php /var/www/html/wordpress/tools/i18n/makepot.php wp-plugin /var/www/html/wordpress/wp-content/plugins/lightweight-youtube-channel-widget/ /var/www/html/wordpress/wp-content/plugins/lightweight-youtube-channel-widget/languages/lightweight-youtube-channel-widget-xx_XX.pot
The POT file is accessible outside the Docker container inside the
Compile PO file to MO
Use the program
msgfmt to compile a .po file to a binary .mo file. This
program is available on most Linux distributions in the package
for more information.