Sorry I forgot the part where I edit, so I include the whole function.
Maybe you could look inside the ‘wp-pagenavi’ especially anchor tag attributes.
[ Moderator note: pre works but please use the code button or backtick character instead. ]
<?php
// file: '/includes/templating.php':
function file_gallery_do_pagination( $total = 0, $page = 0 )
{
if( 0 < $total && 0 < $page )
{
remove_query_arg('page');
$options = get_option('file_gallery');
$out = array('<span class="current">' . $page . '</span>');
if( ! isset($options['pagination_count']) || empty($options['pagination_count']) || 0 >= $options['pagination_count'] )
$limit = 9;
else
$limit = $options['pagination_count'];
$c = 0;
$l = $limit;
$end = false;
$start = false;
$current = $page;
$sides = ($limit - 1) / 2;
$sl = ceil($sides);
$sr = floor($sides);
// skip to first page link
if( ($limit - $sl) < $current )
$start = true;
// skip to last page link
if( ($total - $sr) > $current )
$end = true;
// left side
if( 1 < $current )
{
$current--;
while( 0 < $current && 0 < $sl)
{
array_unshift($out, str_replace('<a>');
$current--;
$sl--;
$limit--;
}
$c = $current;
}
$current = $page + 1;
$sr += $sl;
// right side
while( $current <= $total && 0 < $sr )
{
array_push($out, str_replace('</a><a>');
$current++;
$sr--;
$limit--;
}
// leftovers
while( 1 < $limit && 0 < $c )
{
array_unshift($out, str_replace('</a><a>');
$c--;
$limit--;
}
if( $start )
array_unshift($out, str_replace('</a><a title="' . __('Skip to first page', 'file-gallery') . '">');
if( $end )
array_push($out, str_replace('</a><a title="' . __('Skip to last page', 'file-gallery') . '">');
if( 'rtl' == get_bloginfo('text_direction') )
$out = array_reverse($out);
return '<div class="wp-pagenavi">' . "\n" . implode("\n", $out) . "\n</div>";
}
return '';
}
</a>