WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/28/2010 01:42:25 AM (10 years ago)
Author:
nacin
Message:

Add filter to the links in paginate_links(). fixes #10826, props johnjamesjacoby

File:
1 edited

Legend:

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

    r13474 r13478  
    19581958            $link = add_query_arg( $add_args, $link );
    19591959        $link .= $add_fragment;
    1960         $page_links[] = "<a class='prev page-numbers' href='" . esc_url($link) . "'>$prev_text</a>";
     1960        $page_links[] = "<a class='prev page-numbers' href='" . esc_url( apply_filters( 'paginate_links', $link ) ) . "'>$prev_text</a>";
    19611961    endif;
    19621962    for ( $n = 1; $n <= $total; $n++ ) :
     
    19721972                    $link = add_query_arg( $add_args, $link );
    19731973                $link .= $add_fragment;
    1974                 $page_links[] = "<a class='page-numbers' href='" . esc_url($link) . "'>$n_display</a>";
     1974                $page_links[] = "<a class='page-numbers' href='" . esc_url( apply_filters( 'paginate_links', $link ) ) . "'>$n_display</a>";
    19751975                $dots = true;
    19761976            elseif ( $dots && !$show_all ) :
     
    19861986            $link = add_query_arg( $add_args, $link );
    19871987        $link .= $add_fragment;
    1988         $page_links[] = "<a class='next page-numbers' href='" . esc_url($link) . "'>$next_text</a>";
     1988        $page_links[] = "<a class='next page-numbers' href='" . esc_url( apply_filters( 'paginate_links', $link ) ) . "'>$next_text</a>";
    19891989    endif;
    19901990    switch ( $type ) :
Note: See TracChangeset for help on using the changeset viewer.