IndexPager: Don't generate rel=first and rel=last
authorBartosz Dziewoński <matma.rex@gmail.com>
Mon, 25 Aug 2014 14:40:42 +0000 (16:40 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Sat, 30 Aug 2014 22:48:44 +0000 (00:48 +0200)
These values for the "rel" attribute (aliases for 'begin' and 'end',
respectively) have only appeared as proposals for the HTML4
specification, but were then explicitly dropped.

The story of them and more links are available on
<http://microformats.org/wiki/existing-rel-values> (search for
'first', 'last', 'begin', 'end'). The gist is that they were
intentionally dropped and therefore should not be used.

Change-Id: I33afd1364bf9ccf79c11a2a050ad0c4ff52c447a

includes/pager/IndexPager.php

index 1d93c27..2142227 100644 (file)
@@ -457,7 +457,7 @@ abstract class IndexPager extends ContextSource implements Pager {
                }
 
                $attrs = array();
-               if ( in_array( $type, array( 'first', 'prev', 'next', 'last' ) ) ) {
+               if ( in_array( $type, array( 'prev', 'next' ) ) ) {
                        # HTML5 rel attributes
                        $attrs['rel'] = $type;
                }