[wp-trac] [WordPress Trac] #24345: preview link for published posts does not apply the preview_post_link filter

WordPress Trac noreply at wordpress.org
Fri Oct 17 20:52:22 UTC 2014


#24345: preview link for published posts does not apply the preview_post_link
filter
---------------------------------+-----------------------------
 Reporter:  joeybvi              |       Owner:
     Type:  defect (bug)         |      Status:  new
 Priority:  lowest               |   Milestone:  Future Release
Component:  Posts, Post Types    |     Version:  3.5.1
 Severity:  minor                |  Resolution:
 Keywords:  3.9-early has-patch  |     Focuses:  administration
---------------------------------+-----------------------------
Changes (by TomHarrigan):

 * keywords:  needs-patch 3.9-early => 3.9-early has-patch


Comment:

 Went through and created {{{get_preview_post_link()}}} function and used
 it in (I believe) all areas where preview links are used. The
 {{{'preview_post_link'}}} filter now only occurs inside that function, in
 the wp-includes/link-template.php file.


 {{{get_preview_post_link()}}} accepts a required ID, optional array of
 query args, and an optional URL string. The third parameter was created to
 handle the case of {{{_wp_link_page()}}} for adding things like the
 pagination base and such when using {{{<!--nextpage-->}}} in a post, for
 example.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/24345#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list