Excessive SEO is Ruining Google Search

Sadly, I have to completly agree with Jeff Atwood’s assessment of the recent decline in the quality of Google search results:

People whose opinions I respect have all been echoing the same sentiment — Google, the once essential tool, is somehow losing its edge. The spammers, scrapers, and SEO’ed-to-the-hilt content farms are winning.

W3Schools Isn’t Official or Accurate

Divya Manian gave a presentation yesterday at WordCamp Seattle about generating proper markup when creating output from plugins, and she mentioned a site called W3Fools.com, which is basically a protest against W3Schools.com. I didn’t realize until I saw W3Fools, but W3Schools isn’t actually ran by the W3C, and it contains a lot of inaccurate information. […]

Continue reading...

Choosing a Video Format for the Web

Nettuts+ has a good article detailing the current state of the various video codecs supported by desktop and mobile browsers. Basically, there’s still no single format with universal support; Flash is still the best option for the desktop, and H.264 is the only option for mobile devices. In the future browsers will natively support HTML5’s […]

Continue reading...

Determining WordPress Paths and URLs

I often need to include a directory or URL path when writing a theme or plugin, but I can never find all of the different options in one place, so I’m pulling it together from various Codex pages and xref. Constants ABSPATH – /var/www/vhosts/example.com/httpdocs/ WP_CONTENT_DIR – /var/www/vhosts/example.com/httpdocs/wp-content WP_CONTENT_URL – http://www.example.com/wp-content WP_PLUGIN_DIR – /var/www/vhosts/example.com/httpdocs/wp-content/plugins WP_PLUGIN_URL – http://www.example.com/wp-content/plugins TEMPLATEPATH – /var/www/vhosts/example.com/httpdocs/wp-content/themes/parent-theme STYLESHEETPATH – /var/www/vhosts/example.com/httpdocs/wp-content/themes/child-theme […]

Continue reading...

Using Chained Properties Inside $wpdb->prepare()

If you’re using $wpdb->prepare() to query a custom table, you can’t pass the table name in as an argument because it will be single-quoted, which would be a MySQL syntax error. Instead, you need to insert the variable directly into the double-quoted query string and let PHP parse it out. That creates a new problem, […]

Continue reading...

Capturing WordPress Plugin Activation Errors

If you’re developing a plugin and there are any PHP errors/warnings you’ll get a message like this when you activate it: The plugin generated [x] characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin. You don’t actually see […]

Continue reading...

Directory Permissions for WordPress under Plesk/Linux

Jason Diehl describes the right way to setup directory permissions on a Linux box running Plesk so that WordPress can automatically create the directories it uses to store uploads. Basically, you need to make sure that PHP’s safe mode is turned off and that wp-content is owned by apache, in the apache group, and chmod’d to 777.

WordPress Plugin and Theme Security

Mark Jaquith recently gave a good presentation on writing secure WordPress themes and plugins at Wordcamp Phoenix 2011. The notes are also available. The main points are: Protect against SQL Injection by using the API whenever possible (because it automatically handles data sanitization). If the API can’t do what you need, use $wpdb->prepare(). Protect against […]

Continue reading...

Body Classes Instead of Conditional Stylesheets

I’m thinking I should create a, ‘Duh, why didn’t I think of that?’ category for this. Instead of using conditional stylesheets or CSS hacks to fix Internet Explorer’s obnoxious lack of support for standards, you can conditionally set a class on the html or body tag and target that in your normal stylesheet. This is better for […]

Continue reading...