Mostly about my amusement

Month: January 2014 (page 1 of 1)

That was a good day

Since Lily became half owner of a wine and liquor store she and the other owner (very cool friends of ours) have been working everyday since September. They took off Christmas Day because New York state says they had to close.

That’s one time I agree with the state blue laws.

Lily came up with an idea: they alternate Sundays off since that’s a short day (short as in 12PM to 7PM). The other partner was off yesterday and I worked the whole day with Lily. She’s off next Sunday as she plans to see family for Chinese New Year.

My day job is that I work in IT networks. I specialize in Internet related infrastructure such as DNS, proxies, firewalls, routers, switches, etc. The last time I worked in a retail setting was around 1988 for The Nature Company at the South Street Seaport.

What I did for that time was

  1. Make deliveries (went to an amazing cigar lounge, it was a very cool place).
  2. Move stock from the basement to the store.
  3. Help customers find what they want.
  4. Pretty much gofer anything that Lily said to.

I don’t think there is much chance that I’ll give up my current gig or line of work for doing this full time.

Afterwards we went out to a local thai food restaurant. The whole day was like a date. It was great and for the first time in months we spent the entire day together.

Being a store owner is not an ambition of mine. As I’m a contractor I generally just want to be paid and the appeal of “being your own boss” fell off my radar years ago. But I do understand and support Lily’s goal.

So I’ll give up more Sundays and work in the store. Eventually I’ll get the Internet connectivity in the basement working reliably and I’ll office from their on my WFH days. After all, that’s what a spouse ought to be doing. 😉

WordPress actions and filters are still very cool

I spend time perusing the WordPress support forums (now that’s an understatement) and sometimes I come across someone being unhappy with a plugin. In this particular case a plugin was adding a notice to the admin screens saying “Upgrade now for only $24”.

I really have nothing against plugin authors deriving income that way but I prefer that messages like that in my WordPress dashboard be dismissible. That dashboard real estate is mine and I just don’t like to share.

The plugin adds that message using this code.

add_action( 'admin_notices', 'emg_upgradepro_message' );

WordPress actions and filters are a wonderful thing. It’s a queuing mechanism meaning that the order that your PHP code loads or is executed does not matter. What matters is that actions (or filters) get added to the queue and executed in priority order.

That add_action() does not have a priority so it defaults to 10. Actions that are added that way can be removed too but you have to have that remove_action() in the queue after the action is added. You can’t remove it before it’s added.

I was able to easily (took me 3 minutes) by creating another plugin that just removes that action like so.

<?php
/*
Plugin Name: Remove Easy Media Gallery Upgrade Notice
Version: 0.1
Description: This plugin removes the Easy Media Gallery Upgrade notice in the WordPress dashboard.
Author: Jan Dembowski
Author URI: http://blog.dembowski.net/
*/

add_action( 'admin_init', 'mh_no_upgrade' , 15 );
function mh_no_upgrade () {
        remove_action( 'admin_notices', 'emg_upgradepro_message' );
}

And that’s it. The priority 15 should make it run after the action that adds that message and it does: the message is gone. This may not be the best way to do it but it’s an easy 3 minute fix.

Keep in mind that I don’t use this plugin on my main blog but exercises like this one just show how easy it is to extend WordPress.

12 year old Doctor Who fans are awesome

Like many people I DVR’ed the Doctor Who 50th anniversary episode as well as the last Matt Smith episode. My whole family was smitten with Matt Smith but my son said something that put it all in perspective.

“I doubted Matt Smith at first, I didn’t think he’d be as good as David Tennant. But I liked Matt Smith even more. I’m going to give the new Doctor a chance.”

Smart kid and I really like that he’s got an open mind about this.

I always think that the actor’s run is too short (especially Christopher Eccleston) but Matt Smith’s time as the Doctor was great. There’s not a single episode of his that I didn’t like. I am sure that Peter Capaldi will also take the character to new places and it will be entertaining.

Now if only they could manage to bring back Alex Kingston…