[wp-trac] [WordPress Trac] #21755: wp_insert_post() cannot set a page template from the frontend

WordPress Trac wp-trac at lists.automattic.com
Fri Sep 14 18:36:09 UTC 2012


#21755: wp_insert_post() cannot set a page template from the frontend
-------------------------------------+---------------------
 Reporter:  nacin                    |       Owner:  nacin
     Type:  defect (bug)             |      Status:  closed
 Priority:  normal                   |   Milestone:  3.5
Component:  Themes                   |     Version:
 Severity:  normal                   |  Resolution:  fixed
 Keywords:  has-patch needs-testing  |
-------------------------------------+---------------------
Changes (by nacin):

 * owner:   => nacin
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [21847]:
 {{{
 #!CommitTicketReference repository="" revision="21847"
 Use wp_get_theme()->get_page_templates() rather than get_page_templates()
 in wp_insert_post(),
 to allow page template setting on the frontend without a fatal error.
 fixes #21755.
 }}}

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


More information about the wp-trac mailing list