MWUG notes from Wednesday 21 January 2015

Some notes from last night’s MWUG meeting. Something I don’t get along to often enough, as Mike has mentioned on occasion. :)

Using the OSX clipboard from the command line

The OSX pbcopy terminal command, which adds “stuff” to the clipboard to be pasted later, is really useful. For example, to download some webpage and put the HTML source in the clipboard: Here’s a WordPress example; want to get some fresh API salts and keys for a wp-config.php? Try this: Want to be notified when …

Spot the duplicates, using a Gravatar identicon hack

A project at work needed me to write a UI to find and delete duplicate attachments on a single post, from a client’s WordPress website. Creating a couple of queries where I could look over each post in turn, and check a hash for each file attached, then spot the duplicate hashes wasn’t too hard. …

Issues with embedding Vimeo videos with HTTPS URLs

As documented in WordPress trac ticket #20102, there is an issue with oEmbeds from some services which have started allowing/using https URLs rather than http URLs. The ticket documents an issue with the oEmbed functionality, oEmbed is the technology which allows you to paste a YouTube URL into your blog and have that converted to …

A quick custom plugin to import redirections into Safe Redirect Manager

At Code for the People we’ve just imported a load of blogposts from Drupal into WordPress. One of the differences is that Drupal encodes fancy characters, like typographically nice “quote marks”, into the URL whereas WordPress mostly drops them. We ended up with about 80 URLs which had changed and the need for a redirections …

Capabilities for custom post types in WordPress

I’ve just had to break out some serious Capabilities in WordPress today, and I’m documenting the process here in case it helps me in the future (or the past, though it seems unlikely) or anyone else. The scenario i: I have a custom post type (Video) and I want to allow Editors and Admins to …

Dragging, dropping and sorting, with jQuery UI

I spy a nice opportunity to document some jQuery UI functionality I’ve been playing with this afternoon, for a soon-to-be-revealed client project. The project needs photo galleries, and as these need to be tied into the other custom post types and taxonomies, I’m quickly rolling my own so I can completely control the experience for …