Make WordPress Core

Changeset 8502


Ignore:
Timestamp:
07/30/2008 07:01:03 AM (18 years ago)
Author:
westi
Message:

Allow a plugin to add attributes to the next and previous posts links. Fixes #7434 props JohnLamansky.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/link-template.php

    r8487 r8502  
    697697                echo '<a href="';
    698698                next_posts($max_page);
    699                 echo '">'. preg_replace('/&([^#])(?![a-z]{1,8};)/', '&#038;$1', $label) .'</a>';
     699                $attr = apply_filters( 'next_posts_link_attributes', '' );
     700                echo "\" $attr>". preg_replace('/&([^#])(?![a-z]{1,8};)/', '&#038;$1', $label) .'</a>';
    700701        }
    701702}
     
    721722                echo '<a href="';
    722723                previous_posts();
    723                 echo '">'. preg_replace('/&([^#])(?![a-z]{1,8};)/', '&#038;$1', $label) .'</a>';
     724                $attr = apply_filters( 'previous_posts_link_attributes', '' );
     725                echo "\" $attr>". preg_replace('/&([^#])(?![a-z]{1,8};)/', '&#038;$1', $label) .'</a>';
    724726        }
    725727}
Note: See TracChangeset for help on using the changeset viewer.