| 1 | Index: wp-includes/link-template.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-includes/link-template.php (revisión: 7162) |
|---|
| 4 | +++ wp-includes/link-template.php (copia de trabajo) |
|---|
| 5 | @@ -662,7 +662,7 @@ |
|---|
| 6 | echo clean_url(get_next_posts_page_link($max_page)); |
|---|
| 7 | } |
|---|
| 8 | |
|---|
| 9 | -function next_posts_link($label='Next Page »', $max_page=0) { |
|---|
| 10 | +function next_posts_link($label='Next Page »', $max_page=0, $class='') { |
|---|
| 11 | global $paged, $wp_query; |
|---|
| 12 | if ( !$max_page ) { |
|---|
| 13 | $max_page = $wp_query->max_num_pages; |
|---|
| 14 | @@ -673,7 +673,10 @@ |
|---|
| 15 | if ( (! is_single()) && (empty($paged) || $nextpage <= $max_page) ) { |
|---|
| 16 | echo '<a href="'; |
|---|
| 17 | next_posts($max_page); |
|---|
| 18 | - echo '">'. preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'</a>'; |
|---|
| 19 | + echo '"'; |
|---|
| 20 | + if ( !empty($class) ) |
|---|
| 21 | + echo ' class="'. $class . '"'; |
|---|
| 22 | + echo '>'. preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'</a>'; |
|---|
| 23 | } |
|---|
| 24 | } |
|---|
| 25 | |
|---|
| 26 | @@ -692,12 +695,15 @@ |
|---|
| 27 | echo clean_url(get_previous_posts_page_link()); |
|---|
| 28 | } |
|---|
| 29 | |
|---|
| 30 | -function previous_posts_link($label='« Previous Page') { |
|---|
| 31 | +function previous_posts_link($label='« Previous Page', $class='') { |
|---|
| 32 | global $paged; |
|---|
| 33 | if ( (!is_single()) && ($paged > 1) ) { |
|---|
| 34 | echo '<a href="'; |
|---|
| 35 | previous_posts(); |
|---|
| 36 | - echo '">'. preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'</a>'; |
|---|
| 37 | + echo '"'; |
|---|
| 38 | + if ( !empty($class) ) |
|---|
| 39 | + echo ' class="'. $class . '"'; |
|---|
| 40 | + echo '>'. preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'</a>'; |
|---|
| 41 | } |
|---|
| 42 | } |
|---|
| 43 | |
|---|