GeeDeePeeAgh

Shout out today to the very remarkable Heather Burns and all those involved in WordPress 4.9.6 which landed today. It’s the one with the privacy stuff…

If you run WordPress you should be notified of the available update any time now.

Things to jump out straight away – the ease at which a Privacy Policy can be added. I know, it doesn’t sound like much, adding pages is a fundamental of WordPress really but the fact you can instruct WP to create a new page and that adds in the headings and starter content for you to consider is excellent.

The data export and data erase tools come in to play too, which is nice. Oh, and WP have added some PHP polyfills to core.

All in all – a very handy update.

Unlikely things to say

I recently had the pleasure of setting up a WordPress install for a client who already had GoDaddy hosting.

I won’t say this too loud or often, and hopefully no one will read this anyway, but I was pleasantly surprised by the GoDaddy WordPress hosting that he had – it included SSH access, default plugins that seemed to be useful rather than hinder, and most impressive was the inclusion of a full staging area, with quick and simple deployment options.

A staging area is, in my experience, missed off the list of things to use by so many, it was good to see this done on what has to be said is a very low budget hosting solution.

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.

add_theme_support('editor-color-palette',
'#ba1200',
'#031927',
'#9dd1f1',
'#508aa8',
'#c8e0f4'
);

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.

Nice.

NB Thanks to Coolers.co for the colour scheme in this example.

Welcome Prefix

function replace_prefix( $wp_admin_bar ) {
 $my_account=$wp_admin_bar->get_node('my-account');
 $newtitle = str_replace( 'Hi,', 'Logged in as', $my_account->title );
 $wp_admin_bar->add_node( array(
 'id' => 'my-account',
 'title' => $newtitle,
 ) );
 }
 add_filter( 'admin_bar_menu', 'replace_prefix',25 );

It’s the little things that make me happy. Like controlling the WordPress prefix to the username in the admin bar. Here from a simple “Hi” to a “Logged in as” notification.