[wp-trac] [WordPress Trac] #29663: next_post_link & previous_post_link Category exclude broken

WordPress Trac noreply at wordpress.org
Mon Nov 3 20:43:17 UTC 2014


#29663: next_post_link & previous_post_link Category exclude broken
------------------------------------------------+--------------------------
 Reporter:  gabrieldiggs                        |       Owner:
     Type:  defect (bug)                        |  wonderboymusic
 Priority:  normal                              |      Status:  assigned
Component:  Posts, Post Types                   |   Milestone:  4.0.1
 Severity:  normal                              |     Version:  trunk
 Keywords:  reporter-feedback needs-unit-tests  |  Resolution:
                                                |     Focuses:  template
------------------------------------------------+--------------------------

Comment (by MikeHansenMe):

 So I have been writing some unit tests for this and getting mixed results.
 First I went to write a basic test using the defaults for
 get_previous_post_link and I would expect to get something like
 {{{
 « <a href="http://example.org/?p=12" rel="prev">Post title 2</a>
 }}}
 but instead I get an empty string(most of the time). Once in awhile
 running the same test I will get the correct return link. This is after
 creating 8 posts in setUp and checking based on a post in the middle.

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


More information about the wp-trac mailing list