[wp-trac] [WordPress Trac] #17094: Add support for fetching postFormats supported by the active theme

WordPress Trac wp-trac at lists.automattic.com
Sat Apr 9 17:49:48 UTC 2011


#17094: Add support for fetching postFormats supported by the active theme
--------------------------+------------------
 Reporter:  daniloercoli  |       Owner:
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  3.2
Component:  XML-RPC       |     Version:  3.1
 Severity:  normal        |  Resolution:
 Keywords:  mobile        |
--------------------------+------------------

Comment (by josephscott):

 Adding a parameter to wp.getPostFormats to indicate that you want a list
 of supported formats as well is reasonable.  The question that comes up is
 how to do that in a reasonable way.

 I've put together a patch that adjusts the reply to provide both all of
 the formats and the currently supported ones.  When this is requested the
 response will look like:

 {{{
 Array (
     [all] => Array (
             [standard] => Standard
             [aside] => Aside
             [chat] => Chat
             [gallery] => Gallery
             [link] => Link
             [image] => Image
             [quote] => Quote
             [status] => Status
             [video] => Video
             [audio] => Audio
         )

     [supported] => Array (
             [0] => aside
             [1] => gallery
         )
 )
 }}}

 The idea is that clients that specifically ask for this will know that the
 response format has changed slightly.  I'm not entirely thrilled with this
 approach but given the current constraints it seems like a possibly
 reasonable trade off.

 To get the additional data the method call would be wp.getPostFormats(
 'blog_id', 'username', 'password', array( 'show-supported' => TRUE ) ).

 For reference the current response looks like:

 {{{
 Array (
     [standard] => Standard
     [aside] => Aside
     [chat] => Chat
     [gallery] => Gallery
     [link] => Link
     [image] => Image
     [quote] => Quote
     [status] => Status
     [video] => Video
     [audio] => Audio
 )
 }}}

 I'm putting this on my list of XML-RPC tickets for WP 3.2 (which I'll post
 on wpdevel later).

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17094#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list