Opened 12 years ago
Closed 10 years ago
#19378 closed defect (bug) (fixed)
post_preview() does not apply the preview_post_link filter
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.6 | Priority: | normal |
Severity: | normal | Version: | 3.2.1 |
Component: | Administration | Keywords: | has-patch 3.6-early commit |
Focuses: | Cc: |
Description
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.
Attachments (2)
Change History (12)
#5
@
11 years ago
For other people that need an intermediate solution, here's a workaround I came up with that you can modify to your needs: https://github.com/danielbachhuber/Edit-Flow/commit/79a70d55a2ae482ef9d6df6061dbde12d821e836
#6
@
11 years ago
This also needs to apply the filter: http://core.trac.wordpress.org/browser/tags/3.4.2/wp-admin/includes/class-wp-posts-list-table.php#L548
Just ran into this too. Seems like an easy win. 3.6-early?