My blog

Something goes here but I don't know what I want to write. So I'll just leave it at this.

Dan Cameron

I build stuff with WordPress

I'm currently building Sprout Apps to help small businesses and freelancers running WordPress.


Javascript new Date() Formats and Offsets

July 19, 2014

Noticing that new Date( ‘July 17, 2014′ ).getTime() and new Date( ’07/17/2014′ ).getTime() will return two different values. The former will have the GMT offset attached while the later will not. I need to test if this has anything to do with the values of the first are from a string and the second is from a date […]


January 27, 2014

My experience with contributing to WordPress core has been awful and after years of convincing myself it’s gotten better the results might be the same. Hopefully my feeling of discouragement changes because I really want to be involved.

Git Submodules with Detached HEAD

November 8, 2013

This week we at Sprout Venture migrated our largest project to git. Without going into detail about our process we ran into a problem with our superproject’s submodules initialized with detached HEADs; regardless if they’re added with the branch set. The .gitmodules file would properly show the branch, e.g. [submodule "wordpress"] path = wordpress url […]

Allow WP_Embed (oEmbed) to filter the_content on non post_content.

September 15, 2012

Ran into a problem tonight where simply applying ‘the_content’ filter to some content wasn’t getting any oembed magic. After a look at WP_Embed class I quickly found that WP does the right thing and caches the filtered content, so without a PostID is quites before it does any work. Here’s a quick hack to get that […]

Ubuntu + Webmin + Apache2 Errors

May 19, 2010

Setting up a new server on MediaTemple (ve) tonight and I was getting some errors with webmin and Ubuntu 8. Apache2 was running fine but I couldn’t get webmin to start/stop the service. The error I was getting was: “Failed to start apache” “etc/ line 22: /dev/console: Permission denied” … The solution was simple: When […]

How I use SVN:Externals in my Development Process

April 15, 2010

SVN ( version control ) is one of the key ingredients in my development process, not because I work with other developers and version control is necessary but I need to keep things organized and in sync with other development environments ( e.g. my laptop ). In a future post I’ll explain the setup, since […]

Display a loading image until the page completes loading

November 3, 2009

Similar to how has it’s loading.gif while the page completes this method will do something very similar. Right after the body I include the image inside a div: <div id="loading-image"> <img src="<?php bloginfo('template_url'); ?>/images/ajax-loader.gif" alt="Loading…" /> </div> Of course I’m using wordpress so you might need to include a different path for your ajax-loader.gif. […]

Older Posts