Add filter to the links in paginate_links(). fixes #10826, props johnjamesjacoby
git-svn-id: http://svn.automattic.com/wordpress/trunk@13478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7fa2cac615
commit
2610af8b7b
|
@ -1957,7 +1957,7 @@ function paginate_links( $args = '' ) {
|
||||||
if ( $add_args )
|
if ( $add_args )
|
||||||
$link = add_query_arg( $add_args, $link );
|
$link = add_query_arg( $add_args, $link );
|
||||||
$link .= $add_fragment;
|
$link .= $add_fragment;
|
||||||
$page_links[] = "<a class='prev page-numbers' href='" . esc_url($link) . "'>$prev_text</a>";
|
$page_links[] = "<a class='prev page-numbers' href='" . esc_url( apply_filters( 'paginate_links', $link ) ) . "'>$prev_text</a>";
|
||||||
endif;
|
endif;
|
||||||
for ( $n = 1; $n <= $total; $n++ ) :
|
for ( $n = 1; $n <= $total; $n++ ) :
|
||||||
$n_display = number_format_i18n($n);
|
$n_display = number_format_i18n($n);
|
||||||
|
@ -1971,7 +1971,7 @@ function paginate_links( $args = '' ) {
|
||||||
if ( $add_args )
|
if ( $add_args )
|
||||||
$link = add_query_arg( $add_args, $link );
|
$link = add_query_arg( $add_args, $link );
|
||||||
$link .= $add_fragment;
|
$link .= $add_fragment;
|
||||||
$page_links[] = "<a class='page-numbers' href='" . esc_url($link) . "'>$n_display</a>";
|
$page_links[] = "<a class='page-numbers' href='" . esc_url( apply_filters( 'paginate_links', $link ) ) . "'>$n_display</a>";
|
||||||
$dots = true;
|
$dots = true;
|
||||||
elseif ( $dots && !$show_all ) :
|
elseif ( $dots && !$show_all ) :
|
||||||
$page_links[] = "<span class='page-numbers dots'>...</span>";
|
$page_links[] = "<span class='page-numbers dots'>...</span>";
|
||||||
|
@ -1985,7 +1985,7 @@ function paginate_links( $args = '' ) {
|
||||||
if ( $add_args )
|
if ( $add_args )
|
||||||
$link = add_query_arg( $add_args, $link );
|
$link = add_query_arg( $add_args, $link );
|
||||||
$link .= $add_fragment;
|
$link .= $add_fragment;
|
||||||
$page_links[] = "<a class='next page-numbers' href='" . esc_url($link) . "'>$next_text</a>";
|
$page_links[] = "<a class='next page-numbers' href='" . esc_url( apply_filters( 'paginate_links', $link ) ) . "'>$next_text</a>";
|
||||||
endif;
|
endif;
|
||||||
switch ( $type ) :
|
switch ( $type ) :
|
||||||
case 'array' :
|
case 'array' :
|
||||||
|
|
Loading…
Reference in New Issue