Gutenberg Color Pallette

I know that the rather lovely Gutenberg isn’t supposed to be used on production sites yet but I figure this blog doesn’t really count so I’m using this as my playground. I am also very aware that Gutenberg has split opinion in the WordPress community and there are a lot of issues to work through but, as I mentioned very briefly before, I am enjoying Gutenberg and like the direction it is taking WordPress as a content editor.

There will be a lot of head scratching and working out to be done to make sure sites I’ve made work with it, and to work out how Gutenberg sits alongside all the WordPress site builders that I’ve inherited over the last few years, but I’ve added it in to my work flow for site development now, taking me away from encouraging people to use something such as Divi or similar. They are great, but, when simplicity is desired, Gutenberg works for me.


Anyway – enough of that – the above code snippet is one of my new favourite things. It is, I think, pretty obvious what it does – as the code suggests it edits the colour palette options that are available in the Gutenberg editor (for those of you who don’t know Gutenberg – see the image, it’s a handy little Background / Text Colour editor). Drop the snippet in to your theme’s functions file and you’re away.

Simply put, this snippet lets you, the designer / developer behind the website, encourage the content creator for the site to use specific colours within their content. Very handy! The colour picker remains in place so people can go off-piste if they are that way inclined although even that functionality can be removed with the addition of add_theme_support('disable-custom-colors') if you need such restrictions.


NB Thanks to for the colour scheme in this example.

#SBATOL Summary

In a vague attempt to lose a few pounds, and get ready for the York triathlon I’m bringing back the old, and very short lived, #SBATOL.

This week has been encouraging. Two runs, a (slightly shorter than planned) game of squash, a swim, cycling to work, and generally eating less junk than previous weeks.

The amount of food consumed is still too much, and I’ve tried to reduce the amount of Coke I’m drinking, but three mid-week bottles have snuck in.

The squash was frustrating as my left foot hurt quite a lot every time I stood on it, which made playing squash quite tricky. There were three of us playing last night so while I wasn’t on the court I had a go at a Beep Test (remember those?!) – which proved to be rather hard work but very satisfying. I reckon I’ll give it another go next time I’m off court.

The Friday run (today) was my first outing using Sian’s old TomTom watch – long story short, she lost it, bought a Garmin instead, and then found Tom. It’s nice, so I’m using it. It has the option to set workouts / targets and things like that so I went with a 3 x 1mile interval thing with 0.2 mile rests in between and I started by trying to go at sub 8 minute miles but quickly realised I’m way off that pace. My faster pace was more like 9 minute miles. Still – I ran. It counts.

Anyway – this week in numbers:

Swim – 1200m
Bike – 12 miles
Run – 12 miles

Coke – 3 bottles
Chocolate – too much
Extra snack – most days


$ftp_conn = ftp_connect($host) or die("Could not connect to server");
$login = ftp_login ($ftp_conn, $user, $password);

I am pretty sure that ftp_connect isn’t recommended from a security point of view, and probably hasn’t been for a couple of hundred years.

Having said that, it turns out that when a third party says ‘to hell with the security concerns’, and only gives you access to FTP for an order process it’s pretty straight forward to connect with the PHP I’m putting together.


Starting again

Target time. Because, you know, I have been so good at reaching my targets before…

1 – Complete the York Triathlon. It’s not a long thing, 400m swim, 18k bike, 5k run so completing it won’t be a problem. The only thing in there that I’m not sure about is the transitioning. I can’t remember the last time I cycled 18k on a real bike, but there’s still time for that. The swimming is coming on ok, I’m not fast but 400m is pretty short and a 5k run is fine. But my aim for this one is simply to actually do it. Last year I dropped out as I wasn’t feeling motivated by the training. This year I hope that won’t be the case.

2 – A PB at the Oxford Half Marathon.  Now, my PB isn’t anything spectacular, currently sitting at 1:49 a few years back so I’m hopeful I can beat it, and October is a good few months away but I will be disappointed if I don’t go faster this year. I am a long way off the distance (and the pace to be honest) at the moment, but I’m just about getting back into a habit of exercising, swimming, cycling and running every week. The next step, I think, is to try and cover more miles in one go. Much like the longer bike ride above, I can’t remember my last proper long slow run, and I really know it is these that make the difference in the whole half marathon training thing.

So there we go. A target for July, and a target for October.

Next – work!

As a slight aside – I am loving Gutenberg so far…

The importance of alignment…

We took the kids to The National Emergency Services Museum earlier this week. It was fabulous, and the entry was one of those annual ticket things, so more visits will be had during the next twelve months I am sure. The kids learnt a lot that day, one unintended lesson was how important it is to consider alignment when creating a word search!