5 Things of Interest to Developers in the New WordPress 2.8

With each major WordPress release, public changes like the new widgets administrative interface usually get all the glory. Here are some new features in WordPress 2.8 that most users won’t even know exist but you will probably care about, if you’re a WordPress developer.

  • Widgets API The new widgets API lets you create widgets by extending the WP_Widget class. If making a multi-widget with the old system was like trying to piece together your kid’s bicycle on Christmas Eve, the new API rolls out the bike for you, tires inflated and topped with a bow.
  • SimplePie RSS WordPress has been using the MagpieRSS class to parse RSS feeds. Trouble is, Magpie development ground to a halt about four years ago, meaning when contemporary feeds flummoxed Magpie, flustered developers fumed, futilely. In 2.8, WordPress now reads RSS with SimplePie, an active project with a robust API.
  • New Escape Functions A new set of functions consistently named and DRY-er now make your strings sparkly clean and cuddly safe.
    • esc_sql(): A wrapper for the $wpdb->escape() method.
    • esc_url(): Clean up an untrustworthy URL for printing.
    • esc_url_raw(): Clean up an untrustworthy URL for storing in the database.
    • esc_js(): Make text suitable for printing as a JavaScript string.
    • esc_html(): Convert characters that have special meaning in HTML (such as > and <) into their equivalent character entities.
    • esc_attr(): Prepare text so that it’s safe to be used in an HTML element attribute.
    • esc_attr__(), esc_attr_e(), and esc_attr_x(): Make a translatable string safe for printing as an HTML element attribute. E.g., <a href="" title="<?php esc_attr_e('Translate me'); ?>">
    • esc_html__() and esc_html_e(): Like the last two, but for escaping HTML characters in general.
  • get_the_author_meta() User data is spread out between two database tables and has been accessed—until now—by a number of methods. get_the_author_meta() retrieves user data with one easy-to-remember function.
  • the_post Action Hook Called in setup_postdata(), the the_post action hook is one of those things that seems so obvious and so useful that you can’t believe it hasn’t existed until now. At a crucial moment it passes the current global $post variable by reference: during the Loop right after global variables are set but before they’re used in the template.

One Trackback

  1. [...] 5 Things of Interest to Developers in the New WordPress 2.8 With each major WordPress release, public changes like the new widgets administrative interface usually get all the glory. Here are some new features in WordPress 2.8 that most users won’t even know exist but you will probably care about, if you’re a WordPress developer. – By Pressed Words [...]

8 Comments

  1. Posted September 13, 2009 at 4:22 pm | Permalink
    FIkri Online

    I’m beginner in WordPress, and this info is very great to me because its give me some information what different the latest wordpress version with the old version…

  2. Posted February 13, 2012 at 3:37 pm | Permalink
    Vinnie Alonzo

    Enjoy WordPress and this info is helpful.
    Vinnie Alonzo
    BirminghamHomes

  3. Posted June 27, 2012 at 11:44 am | Permalink
    Snag A Bargain

    These tidbits of information you provide here is very helpful. You are right, most people don’t know about these.

  4. Posted February 17, 2013 at 10:36 am | Permalink
    Mahedi hasan

    YoungWifeClub.com is an online community of persons in an age gap relationship. It has an exclusive club for those who are in an age-gap romance, offering a community of support for your relationship. Give and get helpful tips and advice to individuals like you. The site offers single membership too to those who are in pursuit of finding real love.

  5. Posted March 21, 2013 at 4:59 pm | Permalink
    Gail

    So many bloggers are quiting blogging these days. Please post some more so that we keep blogging alive!

  6. Posted March 21, 2013 at 6:54 pm | Permalink
    old stone oven

    With a ceramic stone base with surrounding elements that provide even heating, the Pete Evans
    Signature Edition Pizza Maker by Breville is
    the best choice. Cook the chicken first in a little olive oil – cut the chicken into little cubes.
    The other example of a place where you can get your own
    pizza coupons is the pizza hut.

  7. Posted March 22, 2013 at 2:22 am | Permalink
    givenchyt-shirt

    femme lorsqu’ils sont confrontés à des

  8. Posted March 22, 2013 at 3:53 am | Permalink
    givenchyt-shirt

    Une exceptionnelle avec tout nouveau Beaucoup plus de filles

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*