Copy the code below and paste at the end of your theme's functions.php.
Then call my_link_pages() instead of wp_link_pages(). This version takes no parameters. Tested on WP version 2.8.6.
<?php function my_link_pages() {
global $post, $page, $multipage, $numpages, $more, $pagenow;
if (!$multipage) {
echo '';
return;
}
$links = wp_link_pages(array('echo' => 0, 'link_before' => ':', 'link_after' => ':', 'before' => '', 'after' => '', 'next_or_number' => 'number'));
$output = '';
if ($links) {
//print_r('<p>LINKS:');print_r(htmlspecialchars($links));print_r(':::</p>');
$parts = explode('<a ',$links);
//print_r('<p>PARTS:');print_r(htmlspecialchars($parts[1]));print_r('</p>');
// The part with a trailing number is the previous link followed by current page number
$prev_link_ndx = -1;
for ($i=0;$i<$numpages;++$i) {
if (preg_match('/ :(\d+): *$/', $parts[$i], $matches)) $prev_link_ndx = $i;
}
//print_r('<p>NDX:');print_r($prev_link_ndx);print_r('</p>');
if (prev_link_ndx > -1) {
if ($prev_link_ndx == 0) {
$prev_link = '< 1/' . $numpages;
} else {
$prev_link = preg_replace('/ :(\d+): *$/',' $1/'.$numpages.' ',$parts[$prev_link_ndx]);
$prev_link = '<a ' . preg_replace('/:\d+:/','<',$prev_link);
}
if ($prev_link_ndx < $numpages - 1) {
$next_link = '<a ' . preg_replace('/:\d+:/',' >',$parts[$prev_link_ndx + 1]);
} else {
$next_link = ' >';
}
//print_r('<p>PREV:');print_r(htmlspecialchars($prev_link));print_r('</p>');
//print_r('<p>NEXT:');print_r(htmlspecialchars($next_link));print_r('</p>');
$output = "<p>$prev_link$next_link</p>";
}
echo $output;
}
}
?>