Author Archives: Tom Woodward

oEmbed Additions in WordPress


One of the minor hassles of running WordPress Multisite is dealing with the rules about HTML cleansing- mainly the removal of iframe elements. You could install unfiltered MU but the plugin itself warns you that’s end-of-the-world dangerous and the plugin hasn’t been updated in two years. The combination might make one a bit nervous.

In this particular case, I have a group who wants to use videos from Turns out it’s a good site for captioning and other things that make the video more accessible. This group is working on universal design so dotsub makes doubly good sense.

WordPress supports a number of sites using oEmbed. That’s the magic that allows you to paste in a YouTube URL and the embed codes are taken care of without you having to do anything. WordPress essentially run off a white list of sites that it accepts off the bat.

It turns out that oEmbed lists a bunch of sites that support the API and ended up being one of them.1 That means I just have to add to the WordPress install’s whitelist. The ever handy WordPress codex lets me know that I do that using wp_oembed_add_provider and further down on that page you’ll see that lives wp-includes/media.php.

I could have done it this way but I don’t like editing the core WordPress files for all sorts of reasons. One of them would be that I’d have to redo this every time WordPress updates. Another would be that I stand a much greater chance of seriously breaking something.

I figured I could write a plugin to do something similar. I have never written a plugin so I wandered around a bit looking for oEmbed plugins to use as an example. I found Codepen oEmbed relatively quickly.2 It is a dead simple plugin. It simply says (I left out the non-action stuff that says the name etc.) -

wp_oembed_add_provider( '*/pen/*', '' );

That’s all there is to it. Who knew?3 Somehow I thought it’d be much harder and more involved.

All I had to do was replace the codepen url structure with the dotsub url structure, like so.

 wp_oembed_add_provider( '*', '' ); had a handy page to help me get the structure straight. The first chunk is the URL structure and the second is the API endpoint on the site.

I haven’t done it yet but it seems like it’d be easy to keep adding URLS to this plugin to add additional oEmbed sites and it’d be fairly seamless. If wiser folk than I have better ways to do this, I’m all eyes, ears etc.

1 Another option is to view the page source and search for oembed.

2 You should checkout Code Pen. It is full of cool things.

3 Probably lots of people but still . . .

Walking at Work – Week 20

Several dogs in honor of Alan “The Cog Dog” Levine. I’m cheating a bit as the second two were taken this weekend but they come with good stories and this is my blog so I figure all is fair.

IMG_7206 I can’t remember the name of this dog but he was full of this kind of energy both times we ran into him. He was trailed by two kids who he ignored completely. He brought me the stick but wouldn’t let me have it. He also attempted to dry off using me as a towel yet he had the personality to pull it off.

IMG_7415 We ran into this guy at the end of a long dirt road. He and a friend weren’t all that welcoming at first but chilled out when I said “sit” loudly. Funny how those ingrained commands short circuit things. It was a fun way to teach my oldest son that trick.






it's the little things



To counteract the flowers and sweetness . . .





Weekly Web Harvest (weekly)

  • “These are satellite dishes, but they aren’t for TV. They’re meant for dispatching “mindfiles,” the memories, thoughts and feelings of people who wish to create digital copies of themselves and fling them into space with the belief that they’ll eventually reach some benevolent alien species.”

    Flinging mindfiles in to space in pursuit of immortality h/t @DavidRCroteau #english #philosophy #writingprompt

    — Tom Woodward (@twoodwar) April 18, 2014

    tags: IFTTT Twitter weekly technology self immortality

  • “(This is a long post, born out of years of frustration with ineffective institutional collaborations. If you only want the highlights, here they are: grow your network by sharing, not planning to share or deciding who to share with; the tech doesn’t determine the sharing – if you want to share, you will; weave your network by sharing what you can, and they will share what they can – people won’t share [without a lot of added incentives] stuff that’s not easy or compelling for them to share. Create virtuous cycles that amplify network effects. Given the right ‘set,’ simple tech is all they need to get started.)”

    tags: weekly sharing

  • “His original concept was called the Action Office, and it was meant to be a flexible three-walled structure that could accommodate a variety of ways of working—his idea was that people were increasingly performing “knowledge work” (a new term in the 1960s), and that they needed autonomy and independence in order to perform it.

    In other words, the original cubicle was about liberation. “

    tags: weekly office design intent

  • “In studying this systematically, Harvard neurobiologist Margaret Livingstone found that “if you look at this painting so that your center of gaze falls on the background or her hands, Mona Lisa’s mouth — which is then seen by your peripheral, low-resolution, vision — appears much more cheerful than when you look directly at it, when it is seen by your fine-detail fovea.

    “This explains its elusive quality — you literally can’t catch her smile by looking at it. Every time you look directly at her mouth, her smile disappears because your central vision does not perceive coarse image components very well. People don’t realize this because most of us are not aware of how we move our eyes around or that our peripheral vision is able to see some things better than our central vision. Mona Lisa smiles until you look at her mouth, and then her smile fades, like a dim star that disappears when you look directly at it.””

    tags: art science weekly monalisa

  • “3. Granted, Madonna has adopted two children from Malawi. According to the record, this gesture was humanitarian and of her accord. It, therefore, comes across as strange and depressing that for a humanitarian act, prompted only by her, Madonna wants Malawi to be forever chained to the obligation of gratitude. Kindness, as far as its ordinary meaning is concerned, is free and anonymous. If it can’t be free and silent, it is not kindness; it is something else. Blackmail is the closest it becomes.

    tags: weekly language english manners protocol

Posted from Diigo. The rest of my favorite links are here.

What Teachers Make?

I know I head further out on the fringe each hour of each day but I’ve always had a problem with the Taylor Mali’s “What Teachers Make“. I’m sure you’ve seen it on facebook or on some email forward.

Essentially, he’s responding to a jackass at a dinner party who’s criticizing teachers and I’m ok with that but the details of the response anger me. It is most of what I dislike about teaching.

I can make a C+ feel like a Congressional Medal of Honor
and an A-­? feel like a slap in the face.

Grades. I hate grades.

I make kids sit through 40 minutes of study hall
in absolute silence. No, you may not work in groups.
No, you may not ask a question.
Why won’t I let you go to the bathroom?
Because you’re bored.
And you don’t really have to go to the bathroom, do you?
I make parents tremble in fear when I call home:

Such command, such control, such an amazing ability to see another human’s bladder level, all that and instilling fear in parents- how proud we must be of our mastery.

I make parents see their children for who they are
and what they can be.

Perhaps the saddest line for parents.

You want to know what I make? I make kids wonder,
I make them question.
I make them criticize.
I make them apologize and mean it.
I make them write.
I make them read, read, read.

This is almost positive other than the fact that ever sentence starts with “I make”.

I make them spell definitely beautiful, definitely beautiful, definitely beautiful
over and over and over again until they will never misspell
either one of those words again.

And I know it’s a poem and I’d give license poetic or otherwise if this wasn’t really an embodiment of how most teaching works. Fear, force, reward, coercion in endless cycles and all, of course, for the best. It is for the children. Their shiftless beasts and will run amuck1 if not forced to do right.

It just seems strange to me. If education really worked well I’d see a different world. I’d see less depression, less poverty, less mindless pursuit of profit . . . I’d see people proudly saying how much school made them realized they loved reading/math/science/history. Far too many people I meet tell me they’re awful at math, hate reading, are no good at science. I don’t believe them but the guilt and lessons are sunk in deep.

Mali could have said I make the very people who don’t recognize the value of teachers at dinner parties.

1 1. A name for: a frenzied Malay. (Found first in Portuguese form amouco, amuco.) – OED etymology

Butcher’s Human Predator Fact Check

I passed on this Wikipedia list of people who mysteriously disappeared 1 on Twitter last night which led to the following reply from Luke Neff.

“Last year in the U.S. alone more than nine hundred thousand people were reported missing and not found…
That’s out of three hundred million, total population. That breaks down to about one person in three hundred and twenty-five vanishing. Every year….
Maybe it’s a coincidence, but it’s almost the same loss ratio experienced by herd animals on the African savannah to large predators.”

? Jim Butcher, Dead Beat

I actually read this novel at one point and I meant to see whether this was true (it’s a great writing prompt either way). I did’t know how many people go missing each year in the U.S.A. or what the predation rate is on herd animals on the African savannah.

The first part seems pretty straightforward. I did a search for missing person statistics us

During 2013, 627,911 missing person records were entered into NCIC, a decrease of 5.1% from the 661,593 records entered in 2012. Missing Person records cleared or canceled during the same period totaled 630,990. Reasons for these removals include: a law enforcement agency located the subject, the individual returned home, or the record had to be removed by the entering agency due to a determination that the record is invalid.

-NCIC Missing Person and Unidentified Person Statistics for 2013

Even if we pretend that the nearly 630,000 entries were all missing permanently, we’re still about 1/3 short. When you look more closely at the numbers, you’ll also see that at the end of 2013 there were 84,136 active missing person records which is considerably short of 900,000. I did find the 900,000 number here (You must read the comments.) but there’s no references or anything to where their numbers come from.

I did want to know some things about predation rates on the African savannah. That took a bit more effort. I found this reference to predation rates on African livestock – between 2-10% in the 1970s – which was a good bit higher than the .3% Butcher references. There are variety of percentages and any number of interesting opportunities for more exploration. Another study, in Bhutan rather than Africa, found 2.3% losses to wild animals. And finally, closer to the mark, The Wildebeest in Western Masailand tells us that the bulk of the roughly 8% yearly turnover in the herd is due mainly to lion predation.