[wp-trac] Re: [WordPress Trac] #6098: Expose page template functionality via XML-RPC

WordPress Trac wp-trac at lists.automattic.com
Fri May 2 14:36:11 GMT 2008


#6098: Expose page template functionality via XML-RPC
-------------------------+--------------------------------------------------
 Reporter:  josephscott  |        Owner:  anonymous
     Type:  enhancement  |       Status:  new      
 Priority:  normal       |    Milestone:  2.6      
Component:  XML-RPC      |      Version:  2.5      
 Severity:  normal       |   Resolution:           
 Keywords:  has-patch    |  
-------------------------+--------------------------------------------------
Changes (by josephscott):

  * keywords:  needs-patch => has-patch

Comment:

 I've created a patch that exposes the page template via the
 'wp_page_template' field in wp.getPage and can be set via
 wp.newPage/editPage.  I also included a new method, wp.getPageTemplates,
 which returns a struct of the available page templates.  Here's an example
 of what it returns:

 {{{
 {
     Archives = "archives.php",
     Default = "default",
     Links = "links.php",
     TP1 = "tp1.php"
 }
 }}}

 The key in the struct is the template description and the value is the one
 used by the wp_page_template field.  So to use the TP1 template
 wp_page_template would be set to 'tp1.php'.

 If you provide an empty wp_page_template field no changes will happen.
 You can't delete the setting, only change it to another value.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/6098#comment:1>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list