[wp-trac] [WordPress Trac] #18660: Enhance rel_canonical function, add filter

WordPress Trac wp-trac at lists.automattic.com
Wed Sep 14 19:34:29 UTC 2011


#18660: Enhance rel_canonical function, add filter
-------------------------------------------------+-------------------------
 Reporter:  nathanrice                           |       Owner:
     Type:  enhancement                          |  joostdevalk
 Priority:  normal                               |      Status:  assigned
Component:  Canonical                            |   Milestone:  Awaiting
 Severity:  normal                               |  Review
 Keywords:  has-patch needs-testing 2nd-opinion  |     Version:  3.3
                                                 |  Resolution:
-------------------------------------------------+-------------------------

Comment (by joostdevalk):

 Replying to [comment:8 nathanrice]:
 > Maybe this is just paranoia, but since `$link` can be filtered, I'd like
 to see it escaped before output.

 Agreed, fixed.

 > Also, use `home_url()` in lieu of `get_bloginfo('url')`.

 In fact, `home_url( '/' );` to make it even shorter :)

 > The only thing I don't get is the distinction between front page and
 home (if `show_on_front` is page). Seems to me, both of those would be
 `home_url()`.

 Your second comment was correct, it's the posts page. And the logic for
 that is annoying indeed, we should probably have a convenience function
 for that too.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18660#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list