USB Recovery Disk Not Working in Mountain Lion?

So, first blog post in a while, but I’ve been busy. I’ve bought myself a MacBook in the meantime, and wanted to install Windows on it too. No problem, BootCamp. But, I wanted to be awkward, and I wanted 3 partitions on my drive – Mac, Windows and a 300GB exFAT storage partition to be used by both systems. Disk Utility only allows you to create two.

I went and got myself iPartition, but I had to start it from recovery mode from a different volume. So again, no problem, I went and got Disk Recovery Assistant, put in an empty USB drive, I restart my MacBook, select the Recovery HD USB and…

I boot into my normal OS X.

Corrupted USB? Nope. Corrupted Recovery partition? Nope. The culprit?

FileVault.

It took well over an hour of googling at 3am to find out that FileVault encrypts the recovery partition too, and therefore you can’t create a USB disk from it.

Fair enough, but WHY DOES IT NOT SAY IT IN THE GODDAMN ASSISTANT? I’m sorry, but this is something common and important enough that it should be included, at the least in the help text. But no, had some random article not mentioned it, I don’t think I would have found out. And this isn’t 3rd party software – this is disk encryption included with the OS.

Get your shit together, Apple.

Check if WordPress is using pretty permalinks from code

Seeing as I’ve just spent at least 10 minutes looking for this before figuring it out on my own, I figured it would be useful to have here. The issue is as follows: “How does one check if WordPress is currently using ‘pretty permalinks’ or if it’s just using a GET variable?” This issue is important for example, when you’re writing GET forms that operate on the frontend. Unfortunately, you have to add the page_id param back into the URL (usually through a hidden input), otherwise WordPress will route the query to the homepage.

Continue reading

Easily include a page dropdown in your plugin or theme’s settings

Ok, so here’s a common story I’ve seen too many times, and admittedly been guilty of myself (the following is a screenshot from a plugin I made a while back):

Making the user go and look for page ID’s themselves? Rather embarrassing.

This is even worse, considering the fact that it can be solved with one line of code.

Continue reading

Organising WordPress plugin/theme code: Part 2 – Single Class

Last week we looked at the most common method of organising WordPress code. Today we’ll look at the method many consider the one and only true way of coding WordPress plugins – namely, the Single Class method.

Continue reading

Organising WordPress plugin/theme code: Part 1 – Prefixed Functions

Part 2 of this article is now out!

I’m sure a lot of you reading this will have developed a plugin or a theme before, and therefore know the single question that comes to mind every time you start a new project, whether it’s a plugin or a theme – how should you organise your code?

In short, there are three main ways to do this – prefixed functions, one giant class, or a complex class/worker class structure. In this first article, I’ll be introducing you to the most common method, and showing you a simple plugin that we’ll be implementing all three ways.

Continue reading

Twitter fail

Status

As some of you (as if people actually read this blog) have probably noticed, my twitter is currently suspended. I have no fucking idea why, but it did this automatically after I tweeted out the following through Freelance:

I just completed a Hire me & WordPress job (for theoceanproject) on @Freelancer.com and earned $300 USD! http://www.freelancer.com/projects/Seas-the-Day-Tip-Functionality.html

So yeah, that’s that. It’s the second day of my waiting for support to answer, and I still have no twitter. Hope you will deal!

UPDATE: They finally unsuspended me, it took them a few days. Never am I using the Freelancer tweet functionality again!

Sharing non-canonical links, or og:url hell

If you’re coming here because your shared URL is getting changed or having things cut off it, check the og:url and link rel=”canonical” tags in your page. Facebook always takes the URL from those first, regardless of whether or not you have provided a different URL. Now for the rant.

Ok, I’m pissed.

I generally dislike Facebook’s API (rant for another time). Unclear error messages, documentation which is misleading and confusing in places make for a lovely development process, not to mention the obstinate habit the JS API has of failing with a 500 error, leaving it up to you to figure out what you’re doing wrong.
Continue reading