Theme Development Enhancements In WordPress 3.8

WordPress Admin Screenshots

Some news on recent changes for WordPress 3.8 that make theme development even easier:

Post Formats

From 3.8 onwards, theme developers will be able to check if a post has any post format associated by checking has_post_format() without passing an argument:

// Does the post have any format assigned to it?
has_post_format();

// Does the post have this specific format assigned to it?
has_post_format( 'aside' );

// Does the post have any of these formats assigned to it?
has_post_format( array( 'aside', 'image', ) );

Background Images

Additionally, it is now possible to be more specific about a theme’s custom background support. You can now specify default-repeat, default-position-x, and default-attachment arguments for background images. This is the full array of defaults when registering theme support now:

$defaults = array(
    'default-image'          => '',
    'default-repeat'         => 'repeat',
    'default-position-x'     => 'left',
    'default-attachment'     => 'scroll',
    'default-color'          => '',
    'wp-head-callback'       => '_custom_background_cb',
    'admin-head-callback'    => '',
    'admin-preview-callback' => '',
);

Miscellaneous

  • With the improved theme experience in the Appearance menu, WordPress can accommodate for even bigger screenshot sizes of your theme, the new standard size is now 880x660px!
  • If you have themes in the WordPress.org repository or plan to release a theme there (you should!), these three tags will be available to classify your theme appropriately: responsive-layout, fluid-layout, fixed-layout.
    They replace fluid-width and fixed-width, to make the terms broader and match web design terminology better. You can also classify your theme as accessibility-ready – if it is.

5 responses

  1. Nice sharing. I already read about the upcoming wordpress 3.8 in several other blogs too. It should be a great fun to use wordpress 3.8. I specially love the new theme edition feature.

  2. The “accessibility-ready” was added too.

    1. You’re right, I updated the post. Thanks!

  3. Shyam Chathuranga Avatar
    Shyam Chathuranga

    Thanks for writing this post. I had a few problems with my 1st Theme which I created to sell on ThemeForest, This post helped me to solve 2 issues in my theme.

  4. bevislarsen Avatar
    bevislarsen

    Very useful software as this version makes wordpress themes development really easy task.