[wp-trac] [WordPress Trac] #9353: Override default page_template and
post_parent
WordPress Trac
wp-trac at lists.automattic.com
Wed Mar 18 04:25:37 GMT 2009
#9353: Override default page_template and post_parent
-------------------------+--------------------------------------------------
Reporter: aldenta | Owner: anonymous
Type: enhancement | Status: new
Priority: normal | Milestone: Unassigned
Component: General | Version: 2.7.1
Severity: normal | Keywords:
-------------------------+--------------------------------------------------
In previous versions (not sure where this stopped working but I believe it
worked in 2.6) you could override the default page_template and
post_parent when creating a new post/page. This was extremely useful when
using WP as a CMS. I had custom meta_boxes, would set the page_template to
a specific template, set the post_parent to the correct parent, and then
hide them with CSS so the user could not change them (hiding doesn't work
now either since page_template and page_parent aren't wrapped in their own
divs).
Now, based on how get_default_post_to_edit gets called, it sets the
defaults and they cannot be changed. The attached diff adds two
apply_filters that will allow hooking into this.
Thanks
--
Ticket URL: <http://core.trac.wordpress.org/ticket/9353>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list