TagWordPress

Thoughts on “Too Much Escaping” in WordPress

While sanitizing and escaping everything is very important when dealing with websites, I think there are times when we need to back off a little bit, and trust the functions that have been given to us by WordPress. <a href="<?php echo esc_url( get_permalink( get_the_ID() ) ); ?>" title="<?php echo esc_attr( sprintf( __( 'Permanent Link to %s', 'domain' ), the_title_attribute( array(...

How to write a terrible WordPress tutorial

True, and here’s a related post I wrote earlier about Plugins vs. Without a Plugin. Still, we keep seeing such tutorials piling up everyday, even obvious ones like Google Analytics. Why would one want to go through the trouble of copying and pasting code into their theme’s header.php file, and then breaking everything when they change their theme or when the theme gets an update? Why...

P2 for WordPress Gets an Update!

Not much has changed from the previous version. Perhaps the most exciting change is that you can now create todo lists, by adding an “o” or an “x” at the beginning of a new line. Cool huh? If you’re new to P2, don’t forget to read this article by Matt on why we use P2 at Automattic.

Default Custom Background for WordPress 3.4

Custom backgrounds are handled through add_theme_support since WordPress 3.4, and although you can add your custom callback to wp_head, you don’t need you. You can simply pass a default-image to add_theme_support for your custom background: add_theme_support( 'custom-background', array( 'default-image' => get_template_directory_uri() . '/images/default-background.png', ) ); The default...

How to: Disable HTTP Calls in WordPress

Sometimes you’re travelling on a plane or on a boat, in the metro or on the road. Sometimes you just have a crappy Internet connection, and you’ll notice that a local WordPress install (mostly admin pages) takes several seconds to load. That could create a big problem if you’re developing a theme or plugin, and have to refresh eighty times per minute. WordPress uses its HTTP API...