[wp-trac] [WordPress Trac] #19378: post_preview() does not apply the preview_post_link filter

WordPress Trac wp-trac at lists.automattic.com
Mon Nov 28 06:08:54 UTC 2011


#19378: post_preview() does not apply the preview_post_link filter
--------------------------+-----------------------------
 Reporter:  atetlaw       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  3.2.1
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 The post_preview() function (line # 1367 in wp-admin/includes/post.php)
 does not apply the preview_post_link filter and it probably should.

 The code to generate the anchor tag for the post preview button DOES apply
 the filter and the correct URL is generated. However the button, via
 javascript, ignores that URL and submits the post form, triggering the
 'preview' action in the redirect_post() function. The redirect_post()
 function obtains the redirect URL from the post_preview() function.

 The upshot of that is although the correct URL is generated for the anchor
 tag for the Preview button, clicking the button opens the standard preview
 URL.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19378>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list