[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 Aug 31 18:03:09 UTC 2012
#21755: wp_insert_post() cannot set a page template from the frontend
--------------------------+-----------------
Reporter: nacin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.5
Component: Themes | Version:
Severity: normal | Keywords:
--------------------------+-----------------
wp_insert_post(), when setting a page template with 'page_template', has a
dependency on the get_page_templates() function.
Since WP_Theme is now available in wp-includes, we can use
wp_get_theme()->get_page_templates(). Note that the keys and values are
flipped, so we need to change from an in_array() to an isset().
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21755>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list