[wp-trac] [WordPress Trac] #11049: Page Preview does not autosave page template

WordPress Trac wp-trac at lists.automattic.com
Thu Apr 28 13:42:44 UTC 2011


#11049: Page Preview does not autosave page template
----------------------------+-----------------------
 Reporter:  janeforshort    |       Owner:  westi
     Type:  defect (bug)    |      Status:  assigned
 Priority:  normal          |   Milestone:  3.2
Component:  Administration  |     Version:  2.8.4
 Severity:  normal          |  Resolution:
 Keywords:  has-patch gci   |
----------------------------+-----------------------

Comment (by nacin):

 Tested, seemed to work well. Made a few tweaks.

 Then decided to try this a different way, by storing the value with the
 revision and getting core to recognize the revised meta value.

 When I tested this, I discovered what the showcase template in Twenty
 Eleven really looked like. The initial patch broke is_page_template() and
 what not, so going lower in the stack definitely makes sense.

 It would have been easier if I believed I should trust
 `$_GET['preview_id']` or that I could easily pass the ID from
 _set_preview() to _show_page_template_preview(). Used get_the_ID() and
 is_preview() instead and it's working well here.

 Possibility there should be a logic tweak or two to be had here. Please
 review.

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


More information about the wp-trac mailing list