diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php
index 4043d7fb6..f4d9da273 100644
--- a/wp-includes/link-template.php
+++ b/wp-includes/link-template.php
@@ -1459,9 +1459,8 @@ function next_posts( $max_page = 0, $echo = true ) {
function get_next_posts_link( $label = 'Next Page »', $max_page = 0 ) {
global $paged, $wp_query;
- if ( !$max_page ) {
+ if ( !$max_page )
$max_page = $wp_query->max_num_pages;
- }
if ( !$paged )
$paged = 1;
@@ -1470,7 +1469,7 @@ function get_next_posts_link( $label = 'Next Page »', $max_page = 0 ) {
if ( !is_single() && ( empty($paged) || $nextpage <= $max_page) ) {
$attr = apply_filters( 'next_posts_link_attributes', '' );
- return '". preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'';
+ return '" . preg_replace('/&([^#])(?![a-z]{1,8};)/i', '&$1', $label) . '';
}
}
@@ -1585,7 +1584,7 @@ function get_posts_nav_link( $args = array() ) {
if ( $max_num_pages > 1 ) {
$return = get_previous_posts_link($args['prelabel']);
- $return .= preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $args['sep']);
+ $return .= preg_replace('/&([^#])(?![a-z]{1,8};)/i', '&$1', $args['sep']);
$return .= get_next_posts_link($args['nxtlabel']);
}
}
@@ -1674,7 +1673,7 @@ function get_next_comments_link( $label = '', $max_page = 0 ) {
if ( empty($label) )
$label = __('Newer Comments »');
- return ''. preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'';
+ return ''. preg_replace('/&([^#])(?![a-z]{1,8};)/i', '&$1', $label) .'';
}
/**
@@ -1711,7 +1710,7 @@ function get_previous_comments_link( $label = '' ) {
if ( empty($label) )
$label = __('« Older Comments');
- return '' . preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'';
+ return '' . preg_replace('/&([^#])(?![a-z]{1,8};)/i', '&$1', $label) .'';
}
/**