protected function setup() { // the boring defaults that are ommited in the wpgrade-config.php // configuration for clarity and bravity, and also because some require // extensive logic handling $defaults = array('base' => str_replace(999999999, '%#%', esc_url(get_pagenum_link(999999999))), 'format' => $this->pager_format($this->pager), 'current' => max(1, get_query_var($this->pager)), 'total' => $this->query->max_num_pages, 'formatter' => null, 'prev_next' => true, 'sorted_paging' => false, 'order' => 'desc', 'show_all' => false, 'end_size' => 1, 'mid_size' => 2, 'add_args' => false, 'add_fragment' => null); $conf = wpgrade::merge($defaults, $this->conf); # we're filling in prev_text and next_text seperatly to avoid # requesting the translation when not required if (empty($conf['prev_text'])) { $conf['prev_text'] = __('« Previous', 'rosa_txtd'); } else { // exists; translate $conf['prev_text'] = __($conf['prev_text'], 'rosa_txtd'); } if (empty($conf['next_text'])) { $conf['next_text'] = __('Next »', 'rosa_txtd'); } else { // exists; translate $conf['next_text'] = __($conf['next_text'], 'rosa_txtd'); } // is the pager sorted? if ($conf['sorted_paging'] && $conf['order'] == 'asc') { $temp = $conf['prev_text']; $conf['prev_text'] = $conf['next_text']; $conf['next_text'] = $temp; } return $conf; }