A quick and easy way to decouple your code from WordPress logic, is by using repositories. Repositories are standardized ways to get and put data in a data store, usually databases. WordPress introduces a couple functions to interact with various database tables (get_post_meta(), get_option(), etc.) that are commonly used inside plugin and theme files, that are cumbersome to mock while testing. Repositories on the other hand are very easy to mock in unit tests. Continue reading Decouple from WordPress databases by using repositories
It’s common practice in the larger PHP world, but something the WordPress ecosystem has yet to catch up on. All too often, I see WordPress plugins and themes setup actions, filters and use other WordPress specific functions in class constructors. This leads to a class that is directly coupled to WordPress logic. Continue reading Class constructors should only setup the object
A lot has been already said about Gutenberg and whether it should be included in WordPress core. How should it behave once it is included? Should it be the new editor for new sites only? Should it be an option that users can enable, or should it be on by default and give the option to disable it?
Exciting news! I have joined Mindsize as Director of Products. The past two weeks have been filled with getting to know the team and the projects that are currently in the works. I’m being tasked with pushing our line of products to the next level.
Our leadership team consists of three fine, bearded gentlemen, who all have a passion for creating amazing web projects. Patrick, Zach and Scott have made me feel welcome from the very first minute we started talking. I’ve known Patrick from our time at WooThemes and have stayed in touch ever since. As soon as we started talking about me working for Mindsize, it didn’t take long until the deal was sealed. Continue reading A new adventure awaits
When times are tough, you learn what is important in life. The past couple months have been a bit of a disaster for me on a personal level. I’m not going to explain details on any of it in this post, as most of it is in the past now, where it belongs.
A first proof of concept version of Mozart is now available for public testing. Mozart is a command line tool for wrapping PHP packages inside your own namespace. This is the least bad solution for solving most dependency management issues inside the WordPress ecosystem.
The fundamental lack of dependency management support inside the WordPress ecosystem has lead to a number of issues. Wrapping (third party) PHP packages inside your own namespace is something some developers already started doing on their own. Mozart simplifies and automates this process.
Say you want to use the Pimple package in your WordPress plugin. This package runs from the Pimple namespace. What Mozart does, is convert the files from the Pimple package, to use your own namespace, CoenJacobs\TestPlugin\Pimple for example. Your plugin can then use this package, inside your own namespace, so you always use the exact version you want. Continue reading Mozart monkey patches WordPress’ lack of dependency management
Wes recommends to chat to someone about the course on a regular basis, to keep you motivated and to give you a slap as soon as you start slacking. So, I’ve decided to log my progress in a public repository on GitHub, so you all can follow along (and improve it as we go, perhaps). Here we go!
Sigh. Where do I start on this? Everyone who owns a website these days and has some sort of analytics tool active has seen the lifehacĸer and ɢoogle domain spam (note the weird characters). For the last couple months, the amount of spam like this has been growing slowly but steady. Annoying, yes, but also very easy to filter out in your reports.
Today, however, I’ve stumbled upon something new. Google Analytics showed me a bunch of extra traffic over the past couple days. A quick look at where the traffic was coming from, showed that it was coming from Reddit. Okay, that’s interesting, as I hadn’t been active on Reddit for a while. Diving deeper in the referrals report, lead me to this Reddit thread (don’t click the link in the thread, but you can view the thread without risk).
The Reddit thread links to one of the well known domain spam websites. This same thread is used as referral for over 1000 unique visitors to my humble website on a single day. The thread does not link to my website at all, so the referral is fake. But it did offer me the link to the spam website again, while I thought that I was just looking at a Reddit thread giving me a ton of new traffic… Continue reading Analytics spammers now use legit websites as referrals
I remember the feeling of pride, excitement and determination to make something great, in the months prior to the launch of Listings. The project was born out of frustrations with WP Job Manager being abandoned after the Automattic acquisition and the idea that we could do something better. We made a plan to setup a more generic listings experience, powered by niche specific implementations. Listings was born.
After a couple weeks of digging through the WP Job Manager code (which we forked Listings out of) we got a point where the plugin was ready to be viewed by the public. The first public beta version was available and we got a lot of press coverage, tweets, likes and everyone seemed to like the idea.
All this attention made us believe in the project even more. Listings was born out of a need, there is a massive target audience for each specific niche we wanted to target and people seemed to like our setup. We got Listings from initial idea to actually released project and were able to tick all boxes of our plan so far. I think I’ve never been more enthusiastic about a project, than I was about Listings. That’s why it stings so much that I have to step down as project lead. Continue reading Leaving the Listings project
In April of this year, Scott Basgaard and I started an adventure together. I became part of The Look and Feel as technical lead. We had all the right projects, exciting clients to work with and a lot of potential for our own products to launch.
Later on, Rob, Gareth and Jack joined the team and we had a lot of fun, while working on exciting stuff. I can think of nothing wrong about our current team, except for the fact that our plans for the future have started to differ. What is best for the team in the long run, is not best for my personal life and future career.