[wp-trac] Re: [WordPress Trac] #2834: Cannot conditionalize previous_posts_link() or next_posts_link()

WordPress Trac wp-trac at lists.automattic.com
Mon Jan 7 13:31:02 GMT 2008


#2834: Cannot conditionalize previous_posts_link() or next_posts_link()
---------------------------+------------------------------------------------
 Reporter:  paulschreiber  |        Owner:  pishmishy
     Type:  enhancement    |       Status:  new      
 Priority:  normal         |    Milestone:  2.6      
Component:  Template       |      Version:  2.2.3    
 Severity:  normal         |   Resolution:           
 Keywords:                 |  
---------------------------+------------------------------------------------
Changes (by pishmishy):

  * owner:  anonymous => pishmishy
  * status:  reopened => new

Comment:

 How could a theme author tell whether there's a link or not? Anything that
 matches on the returned text is going to run into problems when you're
 running on a translated WordPress.

 Your patch seems to be a lot of work to fix a more general issue in a
 specific place to achieve just one task. Could we simply add a $nolink
 (default to empty) parameter to adjacent_post_link() and have that value
 returned later in the function by
 {{{
 if ( !$post )
                 return $nolink;
 }}}

-- 
Ticket URL: <http://trac.wordpress.org/ticket/2834#comment:5>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list