I’m working on a didactic template with these features:
- Bootstrap (for responsive web design)
- Wp-navwalker (for the menu)
During the development I’ve used SASS and Bower for rapid prototyping. The theme was validated by the theme check plugin.
I’m working on a didactic template with these features:
During the development I’ve used SASS and Bower for rapid prototyping. The theme was validated by the theme check plugin.
Friday: on a meeting we prepared for the upcoming semester.
I told the 2nd semester team about the ideas behind Twenty Seventeen. In many ways the theme for our first project and Twenty Seventeen are similar.
It’s interesting to note, that topics we’ve worked on for the last two -three years find its way to official WordPress themes. For instance Twenty Seventeen is defined as immersive.
To me the next logical step is to engage in themes. Since 2010 or so I have dabbled with themes. Testing themes is a challenge. Doing so will give valuable skills. That’s why I try out this role. The standards for WordPress themes are well defined. Working with review gives:
Here bash commands, such as grep, is a great help too. It’s relatively easy to find lines, styles, classes, get_header, and so on. Testing themes is more than:
phpcs --standard=WordPress /wp-content/themes/themeName
I guess that anyone starting out in a new role is bound to make errors here and there. Trying to engage in the open source community isn’t easy at all. By now I see two classes of theme-reviewers:
There are two layers of control here.
The theme reviewers meet on Slack. Here they chat and help each others with day-to-day problems.
The themes are reviewed on Trac. Getting into the WordPress repositories is not easy at all. I saw one theme, that tried to get in for 5 months or so.
This knowledge is valuable for the business academies. We need knowledge about the coding standards in the business. But we also have to be pragmatic.
I guess that sometimes it’s important to get the feeling of “IT WORKS!”. Validating the code according to the stern standards of professional WordPress developers would be a didactic suicide in the classroom.
At least I think that’s the case where I teach.
Our students should be able to code a child theme or a theme from scratch. You can say that they work with frontend.
I use Linux Mint on Virtual Box as the theme-review platform. Doing a total review is somewhat time consuming. Even with codesniffers. I developed a template in markdown for the review, and went trough the list of theme requirements.
Here’s the list of requirements:
Today a fellow researcher mentioned that she wanted to publish her findings on a WordPress blog. The researchers with a multimedia background promised to give an introduction to “add images and media“.
Deduction I: WordPress is everywhere. It’s not just a question of the odd multimedia designer student mocking up a web presence or webshop. WordPress is a tool for researchers too.
Deducton II: WordPress is used because you can publish without code knowledge. The ease of use is a major key to the influence of WordPress.
So basicly everything is ready in order to enter the phase of the anthropological field study:
The theme review quest.
PHP Code sniffer is a code validator. In the tutorial: “Using PHP CodeSniffer With WordPress: Installing and Using the WordPress Rules” Tom McFarlin explains how to install the codesniffer with WordPress-specific sniffs.
Then Tom McFarlin gives a demo on a phpcs on the plugin Hello Dolly:
phpcs --standard=WordPress hello-dolly
I have installed the sniffer following the suggestions in McFarlin’s tutorial on a LAMP server with WordPress. So the tool’s in the box.
In this shinding the gives a live demo of the phpcs (php code sniffer) and a discussion of several theme-check-tools.
Meeting with participants from the theme_review crew. The theme reviewers test whether submitted themes live up to the WordPress standards. If a new theme is accepted, it’s added to the WordPress repo. Then it’s available to millions of users.
Just announced on Facebook: WordPress 4.7 at 10 mio. downloads.
Do you want to publish a theme on WordPress? In that case a team of reviewers will check the theme for errors. The code must follow the WordPress standards and policies. If the theme doesn’t meet the standards the theme is rejected.
The theme review team recommended to test the themes on a virtual system. I installed Virtualbox via apt. Found and downloaded a Linux Mint .iso via Torrents. Booted the system and installed Linux on the virtual disk. So far so good.
Set up a LAMP server via the Ubuntu meta-package:
sudo apt-get install lamp-server^
An then WordPress was installed manually. Noproblemo here.
Testing is a major subject in WordPress. Several tools are recommended:
Then the codesniffer was installed. My first experiments were more or less “trial and error”. If worked, but pretty it wasn’t (later I found Tom McFarlin’s excellent tutorial.).
This blog is a research tool. So I’m saving my fumblings with the code:
2011 pear 2013 sudo pear channel-update pear.php.net 2014 pear upgrade-all 2016 pear install wordpress 2018 sudo apt-get install composer 2019 composer create-project \ wp-coding-standards/wpcs:dev-master --no-dev 2020 phpcs --standard=WordPress wp-config.php 2021 phpcs --config-set installed_paths wpcs 2022 sudo phpcs --config-set installed_paths wpcs 2023 phpcs -i 2024 phpcs --standard=WordPress /foo/bar.php
Lo and behold: the sniffer worked. Via wildcards it’s possible to scan all files in the theme directory:
phpcs --standard=WordPress pathToTheme/*/*.php
The sniffer will print errors and warnings – and so the debugging process may begin. Here’s a sample:
Note the wildcard result. Several files are checked. Errors and linenumbers are displayed. That’s a handy tool.
Avoid “Pig Latin”
In a package of test tools I found the pig latin. Don’t use that silly plug in. It will redesign your Dashboard and add all kinds of silly pig latin words all over the plugin. Joke or not – it’s a complete waste of time.
Now the virtual theme testing environment is up and running. If there are grave errors in the theme, no damage will come to the test pc.
The next step is a real life theme review.
Entered the theme review theme on make.wordpress.org. Today a lot of software was installed:
Then I read the extensive documentation on coding standards, and the things a theme reviewer should look at.
The codesniffer gave some problems. The recipe found here worked. The documentation in a zip-file on Slack missed many practical details. And so did the page on Github with the codesniffer code.
First phpcs was installed via apt-get. The next steps are contained in this shell history dump:
2010 phpcs --standard=WordPress wp-config.php 2011 pear 2012 phpcs --standard=WordPress wp-config.php 2013 sudo pear channel-update pear.php.net 2014 pear upgrade-all 2015 phpcs --standard=WordPress wp-config.php 2016 pear install wordpress 2017 composer create-project wp-coding-standards/wpcs:dev-master --no-dev 2018 sudo apt-get install composer 2019 composer create-project wp-coding-standards/wpcs:dev-master --no-dev 2020 phpcs --standard=WordPress wp-config.php 2021 phpcs --config-set installed_paths wpcs 2022 sudo phpcs --config-set installed_paths wpcs 2023 phpcs -i 2024 phpcs --standard=WordPress wp-config.php
Yesterday Matt Mullenweg wrote:
“There are three main focuses this year: the REST API, the editor, and the customizer.
For the REST API we’re going to work on getting first party wp-admin usage of the new endpoints, and hopefully replace all of the core places where we still use admin-ajax.
The editor will endeavour to create a new page and post building experience that makes writing rich posts effortless, and has “blocks” to make it easy what today might take shortcodes, custom HTML, or “mystery meat” embed discovery.
The customizer will help out the editor at first, then shift to bring those fundamental building blocks into something that could allow customization “outside of the box” of post_content, including sidebars and possibly even an entire theme.” (Matt Mullenweg, 2017-01-04)
We use cookies - more information
Multimusen.dk will set a few cookies from Doubleclick, Google and the Social Media plugins they ay set some cookies. Some of my pages use APIs - such as YouTube, LinkedIn, Google Fonts, Google Maps, Mapbox, Spotify, Jetpack, Twitter, Facebook &c.. Such plugins may set the odd cookie.