Tagged: API RSS

  • Mark Jaquith 4:54 pm on May 18, 2009 Permalink | Reply
    Tags: API, , esc_url, esc_url_raw,   

    Deprecated clean_url() in favor of esc_url(), and deprecated sanitize_url() in favor of esc_url_raw().

     
  • Mark Jaquith 3:13 pm on May 18, 2009 Permalink | Reply
    Tags: API, , esc_attr, esc_html,   

    Deprecated wp_specialchars() in favor of esc_html() (also: esc_html__() and esc_html_e()). Using wp_specialchars() with more than one param works for backwards compat. Also, esc_html() (or wp_specialchars() with one param) escapes quotes, just like esc_attr(). This buys security for plugin authors who were mistakenly using a one-param wp_specialchars() call in an HTML attribute. See this wp-hackers message for more detail.

     
  • Mark Jaquith 9:16 pm on May 5, 2009 Permalink | Reply
    Tags: API, ,   

    Standardizing and shortening the WP security escaping functions.

    attribute_escape() is now esc_attr()

    Additionally, you can do attribute escaping and translation in one go. Just add the translation function to the end. Like so:

    • esc_attr__() — translate and return, attribute-escaped.
    • esc_attr_e() — translate and echo, attribute-escaped.

    Will be following up with esc_html (with __() and _e() variants), esc_url(), maybe some more. Will be nice, short, predictable, and allow you do translate/escape in one go without a lot of nested parenthesis.

     
    • Viper007Bond 5:04 am on May 6, 2009 Permalink | Reply

      An esc_js() or whatnot might be useful to (i.e. an improved js_escape() (see #7648).

      • Mark Jaquith 5:58 am on May 6, 2009 Permalink | Reply

        Yes, I meant to include that in the list of “coming soon” ones. Though js_escape() would continue to work, as would attribute_escape() and wp_specialchars().

        Improvements to esc_js() née js_escape() are a separate issue — I’ll take a look at that ticket.

    • Leandro Vieira Pinho 3:11 am on May 9, 2009 Permalink | Reply

      Why not escape_attr than esc_attr?. Write escape is more intuitive than esc.

  • Ryan 10:51 pm on September 9, 2008 Permalink | Reply
    Tags: API, ,   

    New API that allows plugins to add sections and fields to settings pages and register new settings along with sanitization callbacks. add_settings_section(), add_settings_field(), register_setting(), unregister_setting()

     
    • Administrator 2:27 pm on September 12, 2008 Permalink | Reply

      Is there backward compatibility with the old API? (add_management_page and add_options_page)

      Where can plugin authors find out more about these changes?

    • Ryan 6:24 pm on September 12, 2008 Permalink | Reply

      The new API is more for adding to the default settings pages. You’d still use add_options_page() to add a new page. Right now the only docs are the inline phpdoc, which needs to be fleshed out more before release.

  • Ryan 10:50 pm on September 9, 2008 Permalink | Reply
    Tags: API,   

    New wp_page_menu() API that creates a menu of pages. Themes will no longer have to do this for themselves.

     
    • Joel Goodman 5:00 pm on September 10, 2008 Permalink | Reply

      awesome!

    • Xavier 9:35 am on September 12, 2008 Permalink | Reply

      This is very cool, and could prove quite useful for WP-as-CMS websites, but I’ve heard of some that are afraid that implementing such features, generally handled by plugins or theme authors, might bulge the WP core code. One told me this: “I love the concept of having a simple core that you can build anything upon, it’s great. But with these new methods, I’m afraid WP is turning into a Rube Goldberg machine.”

      With wp_page_menu, inline editing and threaded comments all going to core, aren’t you afraid you might over-adding features?

    • Muhammad Siyab 1:35 pm on September 12, 2008 Permalink | Reply

      fantastic! finally, its here!

    • Rick Beckman 1:35 pm on September 12, 2008 Permalink | Reply

      Somewhere a chorus of angels sings.

      Hallelujah! :)

    • TDH 3:32 pm on September 12, 2008 Permalink | Reply

      Actually, that really does sound awesome!

    • Steve Meisner 4:15 pm on September 12, 2008 Permalink | Reply

      shweeet.

    • matt 5:30 pm on September 12, 2008 Permalink | Reply

      is there any example of this in action somewhere that we can check out?

    • lostkore 6:08 pm on September 12, 2008 Permalink | Reply

      Great news!

    • marti garaughty 9:25 pm on September 12, 2008 Permalink | Reply

      I looking forward to the release of WP 2.7 & child themes, this is just the cherry on the cake. Thx!

    • Ben 7:02 am on September 16, 2008 Permalink | Reply

      Maybe I am being dumb but I don’t understand what this is or why i should be excited? From what people have been saying it’s cool, but the lack of info makes it hard for me to interpret the limited news.

    • Ryan 5:56 pm on September 16, 2008 Permalink | Reply

      Ben, it’s not a big deal. It’s almost the same code you use at the top of Regulus for creating the menu. I just packaged it up into wp_page_menu() for convenience. I got tired of seeing this code having to be recreated in theme after theme.

  • Ryan 6:53 am on February 9, 2008 Permalink | Reply
    Tags: API, ,   

    Avatar support is now baked in. Themes can use get_avatar() to fetch the avatar for an author or commenter.

     
  • Ryan 7:17 pm on February 8, 2008 Permalink | Reply
    Tags: API   

    New API for adding boxes to edit page: add_meta_box()

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
esc
cancel