WP-PageNavi - Version 2.61

Version Description

(2010-02-07) = * fixed: memory limit error

Download this release

Release Info

Developer scribu
Plugin Icon WP-PageNavi
Version 2.61
Comparing to
See all releases

Code changes from version 2.50 to 2.61

Files changed (9) hide show
  1. pagenavi-css.css +19 -23
  2. pagenavi-options.php +85 -86
  3. readme.html +0 -460
  4. readme.txt +94 -11
  5. screenshot-1.png +0 -0
  6. screenshot-2.png +0 -0
  7. wp-pagenavi.mo +0 -0
  8. wp-pagenavi.php +157 -137
  9. wp-pagenavi.pot +95 -76
pagenavi-css.css CHANGED
@@ -1,23 +1,19 @@
1
- /*
2
- +----------------------------------------------------------------+
3
- | |
4
- | WordPress 2.8 Plugin: WP-PageNavi 2.50 |
5
- | Copyright (c) 2009 Lester "GaMerZ" Chan |
6
- | |
7
- | File Written By: |
8
- | - Lester "GaMerZ" Chan |
9
- | - http://lesterchan.net |
10
- | |
11
- | File Information: |
12
- | - Page Navigation CSS Style |
13
- | - wp-content/plugins/wp-pagenavi/pagenavi-css.css |
14
- | |
15
- +----------------------------------------------------------------+
16
- */
17
 
18
 
19
  .wp-pagenavi a, .wp-pagenavi a:link {
20
- padding: 2px 4px 2px 4px;
21
  margin: 2px;
22
  text-decoration: none;
23
  border: 1px solid #0066cc;
@@ -25,7 +21,7 @@
25
  background-color: #FFFFFF;
26
  }
27
  .wp-pagenavi a:visited {
28
- padding: 2px 4px 2px 4px;
29
  margin: 2px;
30
  text-decoration: none;
31
  border: 1px solid #0066cc;
@@ -38,7 +34,7 @@
38
  background-color: #FFFFFF;
39
  }
40
  .wp-pagenavi a:active {
41
- padding: 2px 4px 2px 4px;
42
  margin: 2px;
43
  text-decoration: none;
44
  border: 1px solid #0066cc;
@@ -46,14 +42,14 @@
46
  background-color: #FFFFFF;
47
  }
48
  .wp-pagenavi span.pages {
49
- padding: 2px 4px 2px 4px;
50
  margin: 2px 2px 2px 2px;
51
  color: #000000;
52
  border: 1px solid #000000;
53
  background-color: #FFFFFF;
54
  }
55
  .wp-pagenavi span.current {
56
- padding: 2px 4px 2px 4px;
57
  margin: 2px;
58
  font-weight: bold;
59
  border: 1px solid #000000;
@@ -61,9 +57,9 @@
61
  background-color: #FFFFFF;
62
  }
63
  .wp-pagenavi span.extend {
64
- padding: 2px 4px 2px 4px;
65
  margin: 2px;
66
  border: 1px solid #000000;
67
  color: #000000;
68
  background-color: #FFFFFF;
69
- }
1
+ /*----------------------------------------------------------------*
2
+ WordPress 2.8 Plugin: WP-PageNavi 2.60
3
+ Copyright (c) 2009 Lester "GaMerZ" Chan
4
+
5
+ File Written By:
6
+ - Lester "GaMerZ" Chan
7
+ - http://lesterchan.net
8
+
9
+ File Information:
10
+ - Page Navigation CSS Style
11
+ - wp-content/plugins/wp-pagenavi/pagenavi-css.css
12
+ *----------------------------------------------------------------*/
 
 
 
 
13
 
14
 
15
  .wp-pagenavi a, .wp-pagenavi a:link {
16
+ padding: 2px 4px 2px 4px;
17
  margin: 2px;
18
  text-decoration: none;
19
  border: 1px solid #0066cc;
21
  background-color: #FFFFFF;
22
  }
23
  .wp-pagenavi a:visited {
24
+ padding: 2px 4px 2px 4px;
25
  margin: 2px;
26
  text-decoration: none;
27
  border: 1px solid #0066cc;
34
  background-color: #FFFFFF;
35
  }
36
  .wp-pagenavi a:active {
37
+ padding: 2px 4px 2px 4px;
38
  margin: 2px;
39
  text-decoration: none;
40
  border: 1px solid #0066cc;
42
  background-color: #FFFFFF;
43
  }
44
  .wp-pagenavi span.pages {
45
+ padding: 2px 4px 2px 4px;
46
  margin: 2px 2px 2px 2px;
47
  color: #000000;
48
  border: 1px solid #000000;
49
  background-color: #FFFFFF;
50
  }
51
  .wp-pagenavi span.current {
52
+ padding: 2px 4px 2px 4px;
53
  margin: 2px;
54
  font-weight: bold;
55
  border: 1px solid #000000;
57
  background-color: #FFFFFF;
58
  }
59
  .wp-pagenavi span.extend {
60
+ padding: 2px 4px 2px 4px;
61
  margin: 2px;
62
  border: 1px solid #000000;
63
  color: #000000;
64
  background-color: #FFFFFF;
65
+ }
pagenavi-options.php CHANGED
@@ -1,86 +1,84 @@
1
  <?php
2
- /*
3
- +----------------------------------------------------------------+
4
- | |
5
- | WordPress 2.8 Plugin: WP-PageNavi 2.50 |
6
- | Copyright (c) 2009 Lester "GaMerZ" Chan |
7
- | |
8
- | File Written By: |
9
- | - Lester "GaMerZ" Chan |
10
- | - http://lesterchan.net |
11
- | |
12
- | File Information: |
13
- | - Page Navigation Options Page |
14
- | - wp-content/plugins/wp-pagenavi/pagenavi-options.php |
15
- | |
16
- +----------------------------------------------------------------+
17
- */
18
 
19
 
20
  ### Variables Variables Variables
21
  $base_name = plugin_basename('wp-pagenavi/pagenavi-options.php');
22
  $base_page = 'admin.php?page='.$base_name;
23
- $mode = trim($_GET['mode']);
24
  $pagenavi_settings = array('pagenavi_options');
25
 
26
 
27
- ### Form Processing
28
  // Update Options
29
- if(!empty($_POST['Submit'])) {
 
30
  $pagenavi_options = array();
31
- $pagenavi_options['pages_text'] = addslashes($_POST['pagenavi_pages_text']);
32
- $pagenavi_options['current_text'] = addslashes($_POST['pagenavi_current_text']);
33
- $pagenavi_options['page_text'] = addslashes($_POST['pagenavi_page_text']);
34
- $pagenavi_options['first_text'] = addslashes($_POST['pagenavi_first_text']);
35
- $pagenavi_options['last_text'] = addslashes($_POST['pagenavi_last_text']);
36
- $pagenavi_options['next_text'] = addslashes($_POST['pagenavi_next_text']);
37
- $pagenavi_options['prev_text'] = addslashes($_POST['pagenavi_prev_text']);
38
- $pagenavi_options['dotright_text'] = addslashes($_POST['pagenavi_dotright_text']);
39
- $pagenavi_options['dotleft_text'] = addslashes($_POST['pagenavi_dotleft_text']);
40
- $pagenavi_options['style'] = intval(trim($_POST['pagenavi_style']));
41
- $pagenavi_options['num_pages'] = intval(trim($_POST['pagenavi_num_pages']));
42
- $pagenavi_options['always_show'] = intval(trim($_POST['pagenavi_always_show']));
43
- $pagenavi_options['num_larger_page_numbers'] = intval(trim($_POST['pagenavi_num_larger_page_numbers']));
44
- $pagenavi_options['larger_page_numbers_multiple'] = intval(trim($_POST['pagenavi_larger_page_numbers_multiple']));
 
 
45
  $update_pagenavi_queries = array();
46
  $update_pagenavi_text = array();
47
  $update_pagenavi_queries[] = update_option('pagenavi_options', $pagenavi_options);
48
  $update_pagenavi_text[] = __('Page Navigation Options', 'wp-pagenavi');
49
  $i=0;
50
  $text = '';
51
- foreach($update_pagenavi_queries as $update_pagenavi_query) {
52
- if($update_pagenavi_query) {
53
  $text .= '<font color="green">'.$update_pagenavi_text[$i].' '.__('Updated', 'wp-pagenavi').'</font><br />';
54
  }
55
  $i++;
56
  }
57
- if(empty($text)) {
58
  $text = '<font color="red">'.__('No Page Navigation Option Updated', 'wp-pagenavi').'</font>';
59
  }
60
- }
 
61
  // Uninstall WP-PageNavi
62
- if(!empty($_POST['do'])) {
63
  switch($_POST['do']) {
64
  case __('UNINSTALL WP-PageNavi', 'wp-pagenavi') :
65
- if(trim($_POST['uninstall_pagenavi_yes']) == 'yes') {
66
- echo '<div id="message" class="updated fade">';
67
- echo '<p>';
68
- foreach($pagenavi_settings as $setting) {
69
- $delete_setting = delete_option($setting);
70
- if($delete_setting) {
71
- echo '<font color="green">';
72
- printf(__('Setting Key \'%s\' has been deleted.', 'wp-pagenavi'), "<strong><em>{$setting}</em></strong>");
73
- echo '</font><br />';
74
- } else {
75
- echo '<font color="red">';
76
- printf(__('Error deleting Setting Key \'%s\'.', 'wp-pagenavi'), "<strong><em>{$setting}</em></strong>");
77
- echo '</font><br />';
78
- }
79
  }
80
- echo '</p>';
81
- echo '</div>';
82
- $mode = 'end-UNINSTALL';
83
  }
 
 
 
84
  break;
85
  }
86
  }
@@ -88,23 +86,21 @@ if(!empty($_POST['do'])) {
88
 
89
  ### Determines Which Mode It Is
90
  switch($mode) {
91
- // Deactivating WP-PageNavi
92
- case 'end-UNINSTALL':
93
- $deactivate_url = 'plugins.php?action=deactivate&amp;plugin=wp-pagenavi/wp-pagenavi.php';
94
- if(function_exists('wp_nonce_url')) {
95
- $deactivate_url = wp_nonce_url($deactivate_url, 'deactivate-plugin_wp-pagenavi/wp-pagenavi.php');
96
- }
97
- echo '<div class="wrap">';
98
- echo '<h2>'.__('Uninstall WP-PageNavi', 'wp-pagenavi').'</h2>';
99
- echo '<p><strong>'.sprintf(__('<a href="%s">Click Here</a> To Finish The Uninstallation And WP-PageNavi Will Be Deactivated Automatically.', 'wp-pagenavi'), $deactivate_url).'</strong></p>';
100
- echo '</div>';
101
- break;
102
  // Main Page
103
  default:
104
  $pagenavi_options = get_option('pagenavi_options');
105
  ?>
106
- <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
107
- <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?page=<?php echo plugin_basename(__FILE__); ?>">
108
  <div class="wrap">
109
  <?php screen_icon(); ?>
110
  <h2><?php _e('Page Navigation Options', 'wp-pagenavi'); ?></h2>
@@ -133,27 +129,27 @@ switch($mode) {
133
  </td>
134
  </tr>
135
  <tr>
136
- <th scope="row" valign="top"><?php _e('Text For First Post', 'wp-pagenavi'); ?></th>
137
  <td>
138
  <input type="text" name="pagenavi_first_text" value="<?php echo stripslashes(htmlspecialchars($pagenavi_options['first_text'])); ?>" size="30" /><br />
139
  %TOTAL_PAGES% - <?php _e('The total number of pages.', 'wp-pagenavi'); ?>
140
  </td>
141
  </tr>
142
  <tr>
143
- <th scope="row" valign="top"><?php _e('Text For Last Post', 'wp-pagenavi'); ?></th>
144
  <td>
145
  <input type="text" name="pagenavi_last_text" value="<?php echo stripslashes(htmlspecialchars($pagenavi_options['last_text'])); ?>" size="30" /><br />
146
  %TOTAL_PAGES% - <?php _e('The total number of pages.', 'wp-pagenavi'); ?>
147
  </td>
148
  </tr>
149
  <tr>
150
- <th scope="row" valign="top"><?php _e('Text For Next Post', 'wp-pagenavi'); ?></th>
151
  <td>
152
  <input type="text" name="pagenavi_next_text" value="<?php echo stripslashes(htmlspecialchars($pagenavi_options['next_text'])); ?>" size="30" />
153
  </td>
154
  </tr>
155
  <tr>
156
- <th scope="row" valign="top"><?php _e('Text For Previous Post', 'wp-pagenavi'); ?></th>
157
  <td>
158
  <input type="text" name="pagenavi_prev_text" value="<?php echo stripslashes(htmlspecialchars($pagenavi_options['prev_text'])); ?>" size="30" />
159
  </td>
@@ -173,6 +169,12 @@ switch($mode) {
173
  </table>
174
  <h3><?php _e('Page Navigation Options', 'wp-pagenavi'); ?></h3>
175
  <table class="form-table">
 
 
 
 
 
 
176
  <tr>
177
  <th scope="row" valign="top"><?php _e('Page Navigation Style', 'wp-pagenavi'); ?></th>
178
  <td>
@@ -180,7 +182,7 @@ switch($mode) {
180
  <option value="1"<?php selected('1', $pagenavi_options['style']); ?>><?php _e('Normal', 'wp-pagenavi'); ?></option>
181
  <option value="2"<?php selected('2', $pagenavi_options['style']); ?>><?php _e('Drop Down List', 'wp-pagenavi'); ?></option>
182
  </select>
183
- </td>
184
  </tr>
185
  <tr>
186
  <th scope="row" valign="top"><?php _e('Number Of Pages To Show?', 'wp-pagenavi'); ?></th>
@@ -190,12 +192,10 @@ switch($mode) {
190
  </tr>
191
  <tr>
192
  <th scope="row" valign="top"><?php _e('Always Show Page Navigation?', 'wp-pagenavi'); ?></th>
193
- <td>
194
- <select name="pagenavi_always_show" size="1">
195
- <option value="1"<?php selected('1', $pagenavi_options['always_show']); ?>><?php _e('Yes', 'wp-pagenavi'); ?></option>
196
- <option value="0"<?php selected('0', $pagenavi_options['always_show']); ?>><?php _e('No', 'wp-pagenavi'); ?></option>
197
- </select>
198
- </td>
199
  </tr>
200
  <tr>
201
  <th scope="row" valign="top"><?php _e('Number Of Larger Page Numbers To Show?', 'wp-pagenavi'); ?></th>
@@ -224,12 +224,12 @@ switch($mode) {
224
  <input type="submit" name="Submit" class="button" value="<?php _e('Save Changes', 'wp-pagenavi'); ?>" />
225
  </p>
226
  </div>
227
- </form>
228
  <p>&nbsp;</p>
229
 
230
  <!-- Uninstall WP-PageNavi -->
231
- <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?page=<?php echo plugin_basename(__FILE__); ?>">
232
- <div class="wrap">
233
  <h3><?php _e('Uninstall WP-PageNavi', 'wp-pagenavi'); ?></h3>
234
  <p>
235
  <?php _e('Deactivating WP-PageNavi plugin does not remove any data that may have been created, such as the page navigation options. To completely remove this plugin, you can uninstall it here.', 'wp-pagenavi'); ?>
@@ -251,7 +251,7 @@ switch($mode) {
251
  <td valign="top">
252
  <ol>
253
  <?php
254
- foreach($pagenavi_settings as $settings) {
255
  echo '<li>'.$settings.'</li>'."\n";
256
  }
257
  ?>
@@ -261,11 +261,10 @@ switch($mode) {
261
  </table>
262
  <p>&nbsp;</p>
263
  <p style="text-align: center;">
264
- <input type="checkbox" name="uninstall_pagenavi_yes" value="yes" />&nbsp;<?php _e('Yes', 'wp-pagenavi'); ?><br /><br />
265
  <input type="submit" name="do" value="<?php _e('UNINSTALL WP-PageNavi', 'wp-pagenavi'); ?>" class="button" onclick="return confirm('<?php _e('You Are About To Uninstall WP-PageNavi From WordPress.\nThis Action Is Not Reversible.\n\n Choose [Cancel] To Stop, [OK] To Uninstall.', 'wp-pagenavi'); ?>')" />
266
  </p>
267
- </div>
268
  </form>
269
  <?php
270
  } // End switch($mode)
271
- ?>
1
  <?php
2
+ /*----------------------------------------------------------------*
3
+ WordPress 2.8 Plugin: WP-PageNavi 2.60
4
+ Copyright (c) 2009 Lester "GaMerZ" Chan
5
+
6
+ File Written By:
7
+ - Lester "GaMerZ" Chan
8
+ - http://lesterchan.net
9
+
10
+ File Information:
11
+ - Page Navigation Options Page
12
+ - wp-content/plugins/wp-pagenavi/pagenavi-options.php
13
+ *----------------------------------------------------------------*/
 
 
 
 
14
 
15
 
16
  ### Variables Variables Variables
17
  $base_name = plugin_basename('wp-pagenavi/pagenavi-options.php');
18
  $base_page = 'admin.php?page='.$base_name;
19
+ $mode = trim(@$_GET['mode']);
20
  $pagenavi_settings = array('pagenavi_options');
21
 
22
 
23
+ ### Form Processing
24
  // Update Options
25
+ if (!empty($_POST['Submit'])) {
26
+
27
  $pagenavi_options = array();
28
+ $pagenavi_options['pages_text'] = addslashes(@$_POST['pagenavi_pages_text']);
29
+ $pagenavi_options['current_text'] = addslashes(@$_POST['pagenavi_current_text']);
30
+ $pagenavi_options['page_text'] = addslashes(@$_POST['pagenavi_page_text']);
31
+ $pagenavi_options['first_text'] = addslashes(@$_POST['pagenavi_first_text']);
32
+ $pagenavi_options['last_text'] = addslashes(@$_POST['pagenavi_last_text']);
33
+ $pagenavi_options['next_text'] = addslashes(@$_POST['pagenavi_next_text']);
34
+ $pagenavi_options['prev_text'] = addslashes(@$_POST['pagenavi_prev_text']);
35
+ $pagenavi_options['dotright_text'] = addslashes(@$_POST['pagenavi_dotright_text']);
36
+ $pagenavi_options['dotleft_text'] = addslashes(@$_POST['pagenavi_dotleft_text']);
37
+ $pagenavi_options['style'] = intval(@$_POST['pagenavi_style']);
38
+ $pagenavi_options['num_pages'] = intval(@$_POST['pagenavi_num_pages']);
39
+ $pagenavi_options['always_show'] = (bool) @$_POST['pagenavi_always_show'];
40
+ $pagenavi_options['num_larger_page_numbers'] = intval(@$_POST['pagenavi_num_larger_page_numbers']);
41
+ $pagenavi_options['larger_page_numbers_multiple'] = intval(@$_POST['pagenavi_larger_page_numbers_multiple']);
42
+ $pagenavi_options['use_pagenavi_css'] = (bool) @$_POST['use_pagenavi_css'];
43
+
44
  $update_pagenavi_queries = array();
45
  $update_pagenavi_text = array();
46
  $update_pagenavi_queries[] = update_option('pagenavi_options', $pagenavi_options);
47
  $update_pagenavi_text[] = __('Page Navigation Options', 'wp-pagenavi');
48
  $i=0;
49
  $text = '';
50
+ foreach ($update_pagenavi_queries as $update_pagenavi_query) {
51
+ if ($update_pagenavi_query) {
52
  $text .= '<font color="green">'.$update_pagenavi_text[$i].' '.__('Updated', 'wp-pagenavi').'</font><br />';
53
  }
54
  $i++;
55
  }
56
+ if (empty($text)) {
57
  $text = '<font color="red">'.__('No Page Navigation Option Updated', 'wp-pagenavi').'</font>';
58
  }
59
+ }
60
+
61
  // Uninstall WP-PageNavi
62
+ if (!empty($_POST['do'])) {
63
  switch($_POST['do']) {
64
  case __('UNINSTALL WP-PageNavi', 'wp-pagenavi') :
65
+ echo '<div id="message" class="updated fade">';
66
+ echo '<p>';
67
+ foreach ($pagenavi_settings as $setting) {
68
+ $delete_setting = delete_option($setting);
69
+ if ($delete_setting) {
70
+ echo '<font color="green">';
71
+ printf(__('Setting Key \'%s\' has been deleted.', 'wp-pagenavi'), "<strong><em>{$setting}</em></strong>");
72
+ echo '</font><br />';
73
+ } else {
74
+ echo '<font color="red">';
75
+ printf(__('Error deleting Setting Key \'%s\'.', 'wp-pagenavi'), "<strong><em>{$setting}</em></strong>");
76
+ echo '</font><br />';
 
 
77
  }
 
 
 
78
  }
79
+ echo '</p>';
80
+ echo '</div>';
81
+ $mode = 'end-UNINSTALL';
82
  break;
83
  }
84
  }
86
 
87
  ### Determines Which Mode It Is
88
  switch($mode) {
89
+ // Deactivating WP-PageNavi
90
+ case 'end-UNINSTALL':
91
+ $deactivate_url = 'plugins.php?action=deactivate&amp;plugin=wp-pagenavi/wp-pagenavi.php';
92
+ $deactivate_url = wp_nonce_url($deactivate_url, 'deactivate-plugin_wp-pagenavi/wp-pagenavi.php');
93
+ echo '<div class="wrap">';
94
+ echo '<h2>'.__('Uninstall WP-PageNavi', 'wp-pagenavi').'</h2>';
95
+ echo '<p><strong>'.sprintf(__('<a href="%s">Click Here</a> To Finish The Uninstallation And WP-PageNavi Will Be Deactivated Automatically.', 'wp-pagenavi'), $deactivate_url).'</strong></p>';
96
+ echo '</div>';
97
+ break;
 
 
98
  // Main Page
99
  default:
100
  $pagenavi_options = get_option('pagenavi_options');
101
  ?>
102
+ <?php if (!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
103
+ <form method="post" action="<?php echo admin_url('admin.php?page='.plugin_basename(__FILE__)); ?>">
104
  <div class="wrap">
105
  <?php screen_icon(); ?>
106
  <h2><?php _e('Page Navigation Options', 'wp-pagenavi'); ?></h2>
129
  </td>
130
  </tr>
131
  <tr>
132
+ <th scope="row" valign="top"><?php _e('Text For First Page', 'wp-pagenavi'); ?></th>
133
  <td>
134
  <input type="text" name="pagenavi_first_text" value="<?php echo stripslashes(htmlspecialchars($pagenavi_options['first_text'])); ?>" size="30" /><br />
135
  %TOTAL_PAGES% - <?php _e('The total number of pages.', 'wp-pagenavi'); ?>
136
  </td>
137
  </tr>
138
  <tr>
139
+ <th scope="row" valign="top"><?php _e('Text For Last Page', 'wp-pagenavi'); ?></th>
140
  <td>
141
  <input type="text" name="pagenavi_last_text" value="<?php echo stripslashes(htmlspecialchars($pagenavi_options['last_text'])); ?>" size="30" /><br />
142
  %TOTAL_PAGES% - <?php _e('The total number of pages.', 'wp-pagenavi'); ?>
143
  </td>
144
  </tr>
145
  <tr>
146
+ <th scope="row" valign="top"><?php _e('Text For Next Page', 'wp-pagenavi'); ?></th>
147
  <td>
148
  <input type="text" name="pagenavi_next_text" value="<?php echo stripslashes(htmlspecialchars($pagenavi_options['next_text'])); ?>" size="30" />
149
  </td>
150
  </tr>
151
  <tr>
152
+ <th scope="row" valign="top"><?php _e('Text For Previous Page', 'wp-pagenavi'); ?></th>
153
  <td>
154
  <input type="text" name="pagenavi_prev_text" value="<?php echo stripslashes(htmlspecialchars($pagenavi_options['prev_text'])); ?>" size="30" />
155
  </td>
169
  </table>
170
  <h3><?php _e('Page Navigation Options', 'wp-pagenavi'); ?></h3>
171
  <table class="form-table">
172
+ <tr>
173
+ <th scope="row" valign="top"><?php _e('Use pagenavi.css?', 'wp-pagenavi'); ?></th>
174
+ <td>
175
+ <input type="checkbox" name="use_pagenavi_css" value="1" <?php checked($pagenavi_options['use_pagenavi_css']); ?>>
176
+ </td>
177
+ </tr>
178
  <tr>
179
  <th scope="row" valign="top"><?php _e('Page Navigation Style', 'wp-pagenavi'); ?></th>
180
  <td>
182
  <option value="1"<?php selected('1', $pagenavi_options['style']); ?>><?php _e('Normal', 'wp-pagenavi'); ?></option>
183
  <option value="2"<?php selected('2', $pagenavi_options['style']); ?>><?php _e('Drop Down List', 'wp-pagenavi'); ?></option>
184
  </select>
185
+ </td>
186
  </tr>
187
  <tr>
188
  <th scope="row" valign="top"><?php _e('Number Of Pages To Show?', 'wp-pagenavi'); ?></th>
192
  </tr>
193
  <tr>
194
  <th scope="row" valign="top"><?php _e('Always Show Page Navigation?', 'wp-pagenavi'); ?></th>
195
+ <td>
196
+ <input type="checkbox" name="pagenavi_always_show" value="1" <?php checked($pagenavi_options['always_show']); ?>>
197
+ <?php _e("Show navigation even if there's only one page", 'wp-pagenavi'); ?>
198
+ </td>
 
 
199
  </tr>
200
  <tr>
201
  <th scope="row" valign="top"><?php _e('Number Of Larger Page Numbers To Show?', 'wp-pagenavi'); ?></th>
224
  <input type="submit" name="Submit" class="button" value="<?php _e('Save Changes', 'wp-pagenavi'); ?>" />
225
  </p>
226
  </div>
227
+ </form>
228
  <p>&nbsp;</p>
229
 
230
  <!-- Uninstall WP-PageNavi -->
231
+ <form method="post" action="<?php echo admin_url('admin.php?page='.plugin_basename(__FILE__)); ?>">
232
+ <div class="wrap">
233
  <h3><?php _e('Uninstall WP-PageNavi', 'wp-pagenavi'); ?></h3>
234
  <p>
235
  <?php _e('Deactivating WP-PageNavi plugin does not remove any data that may have been created, such as the page navigation options. To completely remove this plugin, you can uninstall it here.', 'wp-pagenavi'); ?>
251
  <td valign="top">
252
  <ol>
253
  <?php
254
+ foreach ($pagenavi_settings as $settings) {
255
  echo '<li>'.$settings.'</li>'."\n";
256
  }
257
  ?>
261
  </table>
262
  <p>&nbsp;</p>
263
  <p style="text-align: center;">
 
264
  <input type="submit" name="do" value="<?php _e('UNINSTALL WP-PageNavi', 'wp-pagenavi'); ?>" class="button" onclick="return confirm('<?php _e('You Are About To Uninstall WP-PageNavi From WordPress.\nThis Action Is Not Reversible.\n\n Choose [Cancel] To Stop, [OK] To Uninstall.', 'wp-pagenavi'); ?>')" />
265
  </p>
266
+ </div>
267
  </form>
268
  <?php
269
  } // End switch($mode)
270
+ ?>
readme.html DELETED
@@ -1,460 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
- <head>
4
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
5
- <title>WP-PageNavi 2.50 Readme</title>
6
- <style type="text/css" media="screen">
7
- /* Default Style */
8
- BODY {
9
- font-family: Verdana, Arial;
10
- font-size: 12px;
11
- color: #000000;
12
- background: #FFFFFF;
13
- }
14
- P {
15
- padding-left: 10px;
16
- }
17
- BLOCKQUOTE {
18
- margin: 10px 20px 0px 20px;
19
- padding: 10px;
20
- border: 1px solid #8d8d8d;
21
- background-color: #f5f5f5;
22
- }
23
- LI {
24
- margin-top: 20px;
25
- }
26
- UL LI UL LI {
27
- margin-top: 10px;
28
- }
29
- A, A:active, A:link, A:visited {
30
- color: #2d3a4c;
31
- text-decoration: none;
32
- }
33
- A:hover {
34
- color: #5577a5;
35
- text-decoration: underline;
36
- }
37
- /* Place Holder Style */
38
- #Container {
39
- width: 780px;
40
- margin-left: auto;
41
- margin-right: auto;
42
- }
43
- #Content {
44
- background-color: #fafafa;
45
- border: 1px solid #a2b6cb;
46
- padding: 10px;
47
- margin-top: -13px;
48
- }
49
- /* Title Style */
50
- #Title {
51
- font-family: Verdana, Arial;
52
- font-size: 22px;
53
- font-weight: bold;
54
- color: #389aff;
55
- border-bottom: 1px solid #389aff;
56
- margin-bottom: 10px;
57
- }
58
- .SubTitle {
59
- font-family: Verdana, Arial;
60
- font-size: 18px;
61
- font-weight: bold;
62
- color: #5b87b4;
63
- }
64
- .SubSubTitle {
65
- font-family: Verdana, Arial;
66
- font-size: 14px;
67
- font-weight: bold;
68
- color: #73a4d6;
69
- }
70
- /* Tabs */
71
- UL#Tabs {
72
- font-family: Verdana, Arial;
73
- font-size: 12px;
74
- font-weight: bold;
75
- list-style-type: none;
76
- padding-bottom: 28px;
77
- border-bottom: 1px solid #a2b6cb;
78
- margin-bottom: 12px;
79
- z-index: 1;
80
- }
81
- #Tabs LI.Tab {
82
- float: right;
83
- height: 25px;
84
- background-color: #deedfb;
85
- margin: 2px 0px 0px 5px;
86
- border: 1px solid #a2b6cb;
87
- }
88
- #Tabs LI.Tab A {
89
- float: left;
90
- display: block;
91
- color: #666666;
92
- text-decoration: none;
93
- padding: 5px;
94
- }
95
- #Tabs LI.Tab A:hover {
96
- background-color: #bfe0fe;
97
- border-bottom: 1px solid #bfe0fe;
98
- }
99
- /* Selected Tab */
100
- #Tabs LI.SelectedTab {
101
- float: right;
102
- height: 25px;
103
- background-color: #fafafa;
104
- margin: 2px 0px 0px 5px;
105
- border-top: 1px solid #a2b6cb;
106
- border-right: 1px solid #a2b6cb;
107
- border-bottom: 1px solid #fafafa;
108
- border-left: 1px solid #a2b6cb;
109
- }
110
- #Tabs LI.SelectedTab A {
111
- float: left;
112
- display: block;
113
- color: #666666;
114
- text-decoration: none;
115
- padding: 5px;
116
- cursor: default;
117
- }
118
- /* Copyright */
119
- #Copyright {
120
- text-align: center;
121
- }
122
- </style>
123
- <script type="text/javascript">
124
- /* <![CDATA[*/
125
- // Index Page
126
- function index() {
127
- // Tab
128
- document.getElementById('IndexTab').className = 'SelectedTab';
129
- document.getElementById('ChangelogTab').className = 'Tab';
130
- document.getElementById('InstallTab').className = 'Tab';
131
- document.getElementById('UpgradeTab').className = 'Tab';
132
- document.getElementById('UsageTab').className = 'Tab';
133
- // Page
134
- document.getElementById('Index').style.display= 'block';
135
- document.getElementById('Changelog').style.display = 'none';
136
- document.getElementById('Install').style.display = 'none';
137
- document.getElementById('Upgrade').style.display = 'none';
138
- document.getElementById('Usage').style.display = 'none';
139
- }
140
- // Changelog Page
141
- function changelog() {
142
- // Tab
143
- document.getElementById('IndexTab').className = 'Tab';
144
- document.getElementById('ChangelogTab').className = 'SelectedTab';
145
- document.getElementById('InstallTab').className = 'Tab';
146
- document.getElementById('UpgradeTab').className = 'Tab';
147
- document.getElementById('UsageTab').className = 'Tab';
148
- // Page
149
- document.getElementById('Index').style.display = 'none';
150
- document.getElementById('Changelog').style.display = 'block';
151
- document.getElementById('Install').style.display = 'none';
152
- document.getElementById('Upgrade').style.display = 'none';
153
- document.getElementById('Usage').style.display = 'none';
154
- }
155
- // Installation Page
156
- function install() {
157
- // Tab
158
- document.getElementById('IndexTab').className = 'Tab';
159
- document.getElementById('ChangelogTab').className = 'Tab';
160
- document.getElementById('InstallTab').className = 'SelectedTab';
161
- document.getElementById('UpgradeTab').className = 'Tab';
162
- document.getElementById('UsageTab').className = 'Tab';
163
- // Page
164
- document.getElementById('Index').style.display= 'none';
165
- document.getElementById('Changelog').style.display = 'none';
166
- document.getElementById('Install').style.display = 'block';
167
- document.getElementById('Upgrade').style.display = 'none';
168
- document.getElementById('Usage').style.display = 'none';
169
- }
170
- // Upgrade Page
171
- function upgrade() {
172
- // Tab
173
- document.getElementById('IndexTab').className = 'Tab';
174
- document.getElementById('ChangelogTab').className = 'Tab';
175
- document.getElementById('InstallTab').className = 'Tab';
176
- document.getElementById('UpgradeTab').className = 'SelectedTab';
177
- document.getElementById('UsageTab').className = 'Tab';
178
- // Page
179
- document.getElementById('Index').style.display= 'none';
180
- document.getElementById('Changelog').style.display = 'none';
181
- document.getElementById('Install').style.display = 'none';
182
- document.getElementById('Upgrade').style.display = 'block';
183
- document.getElementById('Usage').style.display = 'none';
184
- }
185
- // Usage Page
186
- function usage() {
187
- // Tab
188
- document.getElementById('IndexTab').className = 'Tab';
189
- document.getElementById('ChangelogTab').className = 'Tab';
190
- document.getElementById('InstallTab').className = 'Tab';
191
- document.getElementById('UpgradeTab').className = 'Tab';
192
- document.getElementById('UsageTab').className = 'SelectedTab';
193
- // Page
194
- document.getElementById('Index').style.display= 'none';
195
- document.getElementById('Changelog').style.display = 'none';
196
- document.getElementById('Install').style.display = 'none';
197
- document.getElementById('Upgrade').style.display = 'none';
198
- document.getElementById('Usage').style.display = 'block';
199
- }
200
- /* ]]> */
201
- </script>
202
- </head>
203
- <body>
204
- <div id="Container">
205
- <!-- Title -->
206
- <div id="Title">WP-PageNavi 2.50&nbsp;&nbsp;&nbsp;<span style="color: #aaaaaa;">Readme</span></div>
207
-
208
- <!-- Tabs -->
209
- <ul id="Tabs">
210
- <li id="UsageTab" class="Tab"><a href="#Usage" onclick="usage(); return false;" title="Usage Instructions">Usage</a></li>
211
- <li id="UpgradeTab" class="Tab"><a href="#Upgrade" onclick="upgrade(); return false;" title="Upgrade Instructions">Upgrade</a></li>
212
- <li id="InstallTab" class="Tab"><a href="#Installation" onclick="install(); return false;" title="Installation Instructions">Installation</a></li>
213
- <li id="ChangelogTab" class="Tab"><a href="#Changelog" onclick="changelog(); return false;" title="Changelog">Changelog</a></li>
214
- <li id="IndexTab" class="SelectedTab"><a href="#Index" onclick="index(); return false;" title="Index Instructions">Index</a></li>
215
- </ul>
216
-
217
- <!-- Content -->
218
- <div id="Content">
219
- <!-- Index -->
220
- <div id="Index">
221
- <div class="SubTitle">&raquo; Index</div>
222
- <div class="SubSubTitle">Plugin Information</div>
223
- <p>
224
- <strong>Author:</strong><br />
225
- <strong>&raquo;</strong> Lester 'GaMerZ' Chan
226
- </p>
227
- <p>
228
- <strong>Website:</strong><br />
229
- <strong>&raquo;</strong> <a href="http://lesterchan.net/" title="http://lesterchan.net/">http://lesterchan.net/</a>
230
- </p>
231
- <p>
232
- <strong>Features:</strong><br />
233
- <strong>&raquo;</strong> Adds a more advanced paging navigation your WordPress blog.<br /><strong>&raquo;</strong> Example: <strong>Pages (17): [1] 2 3 4 &raquo; ... Last &raquo;</strong>
234
- </p>
235
- <p>
236
- <strong>Download:</strong><br />
237
- <strong>&raquo;</strong> <a href="http://downloads.wordpress.org/plugin/wp-pagenavi.2.50.zip" title="http://downloads.wordpress.org/plugin/wp-pagenavi.2.50.zip">WP-PageNavi 2.50 For WordPress 2.8.x</a><br />
238
- <strong>&raquo;</strong> <a href="http://downloads.wordpress.org/plugin/wp-pagenavi.2.40.zip" title="http://downloads.wordpress.org/plugin/wp-pagenavi.2.40.zip">WP-PageNavi 2.40 For WordPress 2.7.x</a><br />
239
- <strong>&raquo;</strong> <a href="http://downloads.wordpress.org/plugin/wp-pagenavi.2.31.zip" title="http://downloads.wordpress.org/plugin/wp-pagenavi.2.31.zip">WP-PageNavi 2.31 For WordPress 2.1.x To WordPress 2.6.x</a><br />
240
- <strong>&raquo;</strong> <a href="http://downloads.wordpress.org/plugin/wp-pagenavi.2.03.zip" title="http://downloads.wordpress.org/plugin/wp-pagenavi.2.03.zip">WP-PageNavi 2.03 For WordPress 2.0.x</a><br />
241
- <strong>&raquo;</strong> <a href="http://downloads.wordpress.org/plugin/wp-pagenavi.1.00.zip" title="http://downloads.wordpress.org/plugin/wp-pagenavi.1.00.zip">WP-PageNavi 1.00 For WordPress 1.5.2</a>
242
- </p>
243
- <p>
244
- <strong>Screenshots:</strong><br />
245
- <strong>&raquo;</strong> <a href="http://lesterchan.net/wordpress/screenshots/browse/wp-pagenavi/" title="http://lesterchan.net/wordpress/screenshots/browse/wp-pagenavi/">http://lesterchan.net/wordpress/screenshots/browse/wp-pagenavi/</a>
246
- </p>
247
- <p>
248
- <strong>Demo:</strong><br />
249
- <strong>&raquo;</strong> <a href="http://lesterchan.net/wordpress/" title="http://lesterchan.net/wordpress/">http://lesterchan.net/wordpress/</a>
250
- </p>
251
- <p>
252
- <strong>Development:</strong><br />
253
- <strong>&raquo;</strong> <a href="http://dev.wp-plugins.org/browser/wp-pagenavi/" title="http://dev.wp-plugins.org/browser/wp-pagenavi/">http://dev.wp-plugins.org/browser/wp-pagenavi/</a>
254
- </p>
255
- <p>
256
- <strong>Translations:</strong><br />
257
- <strong>&raquo;</strong> <a href="http://dev.wp-plugins.org/browser/wp-pagenavi/i18n/" title="http://dev.wp-plugins.org/browser/wp-pagenavi/i18n/">http://dev.wp-plugins.org/browser/wp-pagenavi/i18n/</a>
258
- </p>
259
- <p><strong>Support Forums:</strong><br />
260
- <strong>&raquo;</strong> <a href="http://forums.lesterchan.net/index.php?board=14.0" title="http://forums.lesterchan.net/index.php?board=14.0">http://forums.lesterchan.net/index.php?board=14.0</a>
261
- </p>
262
- <p>
263
- <strong>Credits:</strong><br />
264
- <strong>&raquo;</strong> Right To Left Language Support by <a href="http://persian-programming.com/" title="http://persian-programming.com/">Kambiz R. Khojasteh</a>.
265
- </p>
266
- <p>
267
- <strong>Note:</strong><br />
268
- <strong>&raquo;</strong> The <strong>Changelog</strong>, <strong>Installation</strong>, <strong>Upgrade</strong>, <strong>Usage</strong> Tab at the top of the page.
269
- </p>
270
- <p>
271
- <strong>Donations:</strong><br />
272
- <strong>&raquo;</strong> I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks as my school allowance, I will really appericiate it. If not feel free to use it without any obligations. Thank You. My Paypal account is
273
- <script type="text/javascript">
274
- /* <![CDATA[*/
275
- document.write(' <strong>lesterchan@gmail.com</strong>.');
276
- /* ]]> */
277
- </script>
278
- </p>
279
- </div>
280
-
281
- <!-- Changelog -->
282
- <div id="Changelog" style="display: none;">
283
- <div class="SubTitle">&raquo; Changelog</div>
284
- <ul>
285
- <li>
286
- <strong>Version 2.50 (01-06-2009)</strong>
287
- <ul>
288
- <li>NEW: Works For WordPress 2.8</li>
289
- <li>NEW: Added Larger Page Number Pagination</li>
290
- <li>NEW: Added "first", "page" and "last" CSS Name To Link<li>
291
- <li>FIXED: Removed "&amp;#8201;" Entity</li>
292
- <li>FIXED: Uses $_SERVER['PHP_SELF'] With plugin_basename(__FILE__) Instead Of Just $_SERVER['REQUEST_URI']</li>
293
- </ul>
294
- </li>
295
- <li>
296
- <strong>Version 2.40 (12-12-2008)</strong>
297
- <ul>
298
- <li>NEW: Works For WordPress 2.7 Only</li>
299
- <li>NEW: Right To Left Language Support by <a href="http://persian-programming.com/" title="http://persian-programming.com/">Kambiz R. Khojasteh</a></li>
300
- <li>NEW: Called pagenavi_textdomain() In pagenavi_init() by <a href="http://persian-programming.com/" title="http://persian-programming.com/">Kambiz R. Khojasteh</a></li>
301
- </ul>
302
- </li>
303
- <li>
304
- <strong>Version 2.31 (16-07-2008)</strong>
305
- <ul>
306
- <li>NEW: Works For WordPress 2.6</li>
307
- </ul>
308
- </li>
309
- <li>
310
- <strong>Version 2.30 (01-06-2008)</strong>
311
- <ul>
312
- <li>NEW: WP-PageNavi Will Load 'pagenavi-css.css' Inside Your Theme Directory If It Exists. If Not, It Will Just Load The Default 'pagenavi-css.css' By WP-PageNavi</li>
313
- <li>NEW: Uses /wp-pagenavi/ Folder Instead Of /pagenavi/</li>
314
- <li>NEW: Uses wp-pagenavi.php Instead Of pagenavi.php</li>
315
- <li>NEW: Added "wp-pagenavi a:visited" Style In pagenavi-css.css</li>
316
- <li>NEW: Added $before And $after Function Arguments To wp_pagenavi();</li>
317
- <li>FIXED: Rearranged CSS Classes In pagenavi-css.css</li>
318
- <li>FIXED: "First" Text Does Not Always Appear If Page 1 Is Not Shown</li>
319
- </ul>
320
- </li>
321
- <li>
322
- <strong>Version 2.20 (01-10-2007)</strong>
323
- <ul>
324
- <li>NEW: Supports query_posts(); Variables</li>
325
- <li>NEW: Ability To Uninstall WP-PageNavi</li>
326
- </ul>
327
- </li>
328
- <li>
329
- <strong>Version 2.11 (01-06-2007)</strong>
330
- <ul>
331
- <li>NEW: Page Navigation Now Is Customizable Via <strong>'WP-Admin -> Options -> PageNavi'</strong> And pagenavi-css.css</li>
332
- <li>NEW: Default Style Navigation Is Now Boxed Navigation (Similar To <a href="http://www.digg.com/">Digg.com</a>)</li>
333
- <li>FIXED: Fix For Ultimate Tag Warrior By Oliver Kastler &amp; Stephan (<a href="http://www.netconcepts.com">Netconcepts</a>)</li>
334
- </ul>
335
- </li>
336
- <li>
337
- <strong>Version 2.10 (01-02-2007)</strong>
338
- <ul>
339
- <li>NEW: Works For WordPress 2.1 Only</li>
340
- <li>NEW: Move pagenavi.php To pagenavi Folder</li>
341
- </ul>
342
- </li>
343
- <li>
344
- <strong>Version 2.03 (01-10-2006)</strong>
345
- <ul>
346
- <li>FIXED: Now Compatible With WordPress 2.1</li>
347
- </ul>
348
- </li>
349
- <li>
350
- <strong>Version 2.02 (01-06-2006)</strong>
351
- <ul>
352
- <li>NEW: Added Drop Down Menu Style Of Page Navigation</li>
353
- </ul>
354
- </li>
355
- <li>
356
- <strong>Version 2.01 (01-03-2006)</strong>
357
- <ul>
358
- <li>FIXED: Paging Show If There Is Only 1 Page</li>
359
- </ul>
360
- </li>
361
- <li>
362
- <strong>Version 2.00 (01-01-2006)</strong>
363
- <ul>
364
- <li>NEW: Compatible With WordPress 2.0</li>
365
- <li>FIXED: Space Issues</li>
366
- </ul>
367
- </li>
368
- </ul>
369
- </div>
370
-
371
- <!-- Installation Instructions -->
372
- <div id="Install" style="display: none;">
373
- <div class="SubTitle">&raquo; Installation Instructions</div>
374
- <ol>
375
- <li>
376
- Open <strong>wp-content/plugins</strong> Folder
377
- </li>
378
- <li>
379
- Put:
380
- <blockquote>Folder: wp-pagenavi</blockquote>
381
- </li>
382
- <li>
383
- <strong>Activate</strong> WP-PageNavi Plugin
384
- </li>
385
- <li>
386
- Refer To <strong>Usage</strong> For Further Instructions
387
- </li>
388
- </ol>
389
- </div>
390
-
391
- <!-- Upgrade Instructions -->
392
- <div id="Upgrade" style="display: none;">
393
- <div class="SubTitle">&raquo; Upgrade Instructions</div>
394
- <div class="SubSubTitle">From v2.0x To v2.50</div>
395
- <ol>
396
- <li>
397
- <strong>Deactivate</strong> WP-PageNavi Plugin
398
- </li>
399
- <li>
400
- Open <strong>wp-content/plugins</strong> Folder
401
- </li>
402
- <li>
403
- Put/Overwrite:
404
- <blockquote>Folder: wp-pagenavi</blockquote>
405
- </li>
406
- <li>
407
- Delete this folder if exists:
408
- <blockquote>
409
- Folder: pagenavi
410
- </blockquote>
411
- </li>
412
- <li>
413
- <strong>Activate</strong> WP-PageNavi Plugin
414
- </li>
415
- <li>
416
- Refer To <strong>Usage</strong> For Further Instructions
417
- </li>
418
- </ol>
419
- </div>
420
-
421
- <!-- Usage Instructions -->
422
- <div id="Usage" style="display: none;">
423
- <div class="SubTitle">&raquo; Usage Instructions</div>
424
- <div class="SubSubTitle">General Usage</div>
425
- <ol>
426
- <li>
427
- Open <strong>wp-content/themes/&lt;YOUR THEME NAME&gt;/footer.php</strong>
428
- </li>
429
- <li>
430
- Add Anywhere:
431
- <blockquote>
432
- &lt;?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?&gt;
433
- </blockquote>
434
- </li>
435
- <li>
436
- Go to <strong>'WP-Admin -> Settings -> PageNavi'</strong> to configure WP-PageNavi.
437
- </li>
438
- <li>
439
- If you need to configure the CSS style of WP-PageNavi, open and edit:
440
- <blockquote>
441
- /wp-content/plugins/wp-pagenavi/pagenavi-css.css
442
- </blockquote>
443
- </li>
444
- </ol>
445
- <div class="SubSubTitle">Note</div>
446
- <ul>
447
- <li>
448
- WP-PageNavi will load '<strong>pagenavi-css.css</strong>' from your theme's directory if it exists.
449
- <ul>
450
- <li>If it doesn't exists, it will just load the default 'pagenavi-css.css' that comes with WP-PageNavi.</li>
451
- <li>This will allow you to upgrade WP-PageNavi without worrying about overwriting your page navigation styles that you have created.</li>
452
- </ul>
453
- </li>
454
- </ul>
455
- </div>
456
- </div>
457
- </div>
458
- <p id="Copyright">WP-PageNavi 2.50<br />Copyright &copy; 2009 Lester 'GaMerZ' Chan. All Rights Reserved.</p>
459
- </body>
460
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -1,29 +1,112 @@
1
  === WP-PageNavi ===
2
- Contributors: GamerZ
3
  Donate link: http://lesterchan.net/wordpress
4
  Tags: pagenavi, navi, navigation, wp-pagenavi, page
5
  Requires at least: 2.8
6
- Stable tag: 2.50
 
7
 
8
- Adds a more advanced paging navigation your WordPress blog.
9
 
10
  == Description ==
11
 
12
- All the information (general, changelog, installation, upgrade, usage) you need about this plugin can be found here: [WP-PageNavi Readme](http://lesterchan.net/wordpress/readme/wp-pagenavi.html "WP-PageNavi Readme").
13
- It is the exact same readme.html is included in the zip package.
14
 
15
- == Development Blog ==
16
 
17
- [GaMerZ WordPress Plugins Development Blog](http://lesterchan.net/wordpress/ "GaMerZ WordPress Plugins Development Blog")
 
 
 
 
 
 
 
 
18
 
19
  == Installation ==
20
 
21
- [WP-PageNavi Readme](http://lesterchan.net/wordpress/readme/wp-pagenavi.html "WP-PageNavi Readme") (Installation Tab)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
  == Screenshots ==
24
 
25
- [WP-PageNavi Screenshots](http://lesterchan.net/wordpress/screenshots/browse/wp-pagenavi/ "WP-PageNavi Screenshots")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
- == Frequently Asked Questions ==
 
28
 
29
- [WP-PageNavi Support Forums](http://forums.lesterchan.net/index.php?board=14.0 "WP-PageNavi Support Forums")
 
 
1
  === WP-PageNavi ===
2
+ Contributors: GamerZ, scribu
3
  Donate link: http://lesterchan.net/wordpress
4
  Tags: pagenavi, navi, navigation, wp-pagenavi, page
5
  Requires at least: 2.8
6
+ Tested up to: 2.9.1
7
+ Stable tag: 2.61
8
 
9
+ Adds a more advanced paging navigation to your WordPress site.
10
 
11
  == Description ==
12
 
13
+ Adds a more advanced paging navigation to your WordPress site.
 
14
 
15
+ Example:
16
 
17
+ Pages (17): [1] 2 3 4 » ... Last »
18
+
19
+
20
+ <br>
21
+ [Demo](http://lesterchan.net/wordpress/) | [Translations](http://dev.wp-plugins.org/browser/wp-pagenavi/i18n/)
22
+
23
+ = Credits =
24
+ * Right-to-left language support by [Kambiz R. Khojasteh](http://persian-programming.com/)
25
+ * Maintenance by [scribu](http://scribu.net)
26
 
27
  == Installation ==
28
 
29
+ You can either install it automatically from the WordPress admin, or do it manually:
30
+
31
+ 1. Unzip the archive and put the `wp-pagenavi` folder into your plugins folder (/wp-content/plugins/).
32
+ 1. Activate the plugin from the Plugins menu.
33
+
34
+ = Usage =
35
+
36
+ 1. Open `wp-content/themes/your-theme-name/footer.php`
37
+ 2. Add anywhere: `<?php wp_pagenavi(); ?>`
38
+ 3. Go to *WP-Admin -> Settings -> PageNavi* to configure WP-PageNavi.
39
+
40
+ = Changing the CSS =
41
+
42
+ If you need to configure the CSS style of WP-PageNavi, you can copy the `pagenavi-css.css` file from the plugin directory to your theme's directory and make your modifications there. This way, you won't lose your changes when you update the plugin.
43
+
44
+ Alternatively, you can uncheck the "Use pagenavi.css?" option from the settings page and add the styles to your theme's style.css file directly.
45
+
46
 
47
  == Screenshots ==
48
 
49
+ 1. Default appearance
50
+ 2. Options page
51
+
52
+ == Changelog ==
53
+
54
+ = 2.61 (2010-02-07) =
55
+ * fixed: memory limit error
56
+
57
+ = 2.60 (2010-02-07) =
58
+ * new: Compatible With WordPress 2.9
59
+ * new: Added "previouspostslink" and "nextpostslink" CSS classes for styling next/previous posts link by Joost de Valk
60
+ * new: Added option to include pagenavi-css.css In WP-Admin -> Settings -> PageNavi
61
+ * fixed: check for pagenavi-css.css in the child theme, first
62
+ * fixed: cleaner options page
63
+
64
+ = 2.50 (2009-06-01) =
65
+ * new: Compatible With WordPress 2.8
66
+ * new: Added Larger Page Number Pagination
67
+ * new: Added "first", "page" and "last" CSS Name To Link
68
+ * fixed: Removed "&#8201;" Entity
69
+ * fixed: Uses $_SERVER['PHP_SELF'] With plugin_basename(__FILE__) Instead Of Just $_SERVER['REQUEST_URI']
70
+
71
+ = 2.40 (2008-12-12) =
72
+ * new: Compatible With WordPress 2.7 Only
73
+ * new: Right To Left Language Support by Kambiz R. Khojasteh
74
+ * new: Called pagenavi_textdomain() In pagenavi_init() by Kambiz R. Khojasteh
75
+
76
+ = 2.31 (2008-07-16) =
77
+ * new: Compatible With WordPress 2.6
78
+
79
+ = 2.30 (2008-06-01) =
80
+ * new: WP-PageNavi Will Load 'pagenavi-css.css' Inside Your Theme Directory If It Exists. If Not, It Will Just Load The Default 'pagenavi-css.css' By WP-PageNavi
81
+ * new: Uses /wp-pagenavi/ Folder Instead Of /pagenavi/
82
+ * new: Uses wp-pagenavi.php Instead Of pagenavi.php
83
+ * new: Added "wp-pagenavi a:visited" Style In pagenavi-css.css
84
+ * new: Added $before And $after Function Arguments To wp_pagenavi();
85
+ * fixed: Rearranged CSS Classes In pagenavi-css.css
86
+ * fixed: "First" Text Does Not Always Appear If Page 1 Is Not Shown
87
+
88
+ = 2.20 (2007-10-01) =
89
+ * new: Supports query_posts(); Variables
90
+ * new: Ability To Uninstall WP-PageNavi
91
+
92
+ = 2.11 (2007-06-01) =
93
+ * new: Page Navigation Now Is Customizable Via 'WP-Admin -> Options -> PageNavi' And pagenavi-css.css
94
+ * new: Default Style Navigation Is Now Boxed Navigation (Similar To Digg.com) =
95
+ * fixed: Fix For Ultimate Tag Warrior By Oliver Kastler & Stephan (Netconcepts)
96
+
97
+ = 2.10 (2007-02-01) =
98
+ * new: Compatible With WordPress 2.1 Only
99
+ * new: Move pagenavi.php To pagenavi Folder
100
+
101
+ = 2.03 (2006-10-01) =
102
+ * fixed: Now Compatible With WordPress 2.1
103
+
104
+ = 2.02 (2006-06-01) =
105
+ * new: Added Drop Down Menu Style Of Page Navigation
106
 
107
+ = 2.01 (2006-03-01) =
108
+ * fixed: Paging Show If There Is Only 1 Page
109
 
110
+ = 2.00 (2006-01-01) =
111
+ * new: Compatible With WordPress 2.0
112
+ * fixed: Space Issues
screenshot-1.png ADDED
Binary file
screenshot-2.png ADDED
Binary file
wp-pagenavi.mo DELETED
Binary file
wp-pagenavi.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
  /*
3
  Plugin Name: WP-PageNavi
4
- Plugin URI: http://lesterchan.net/portfolio/programming/php/
5
  Description: Adds a more advanced paging navigation to your WordPress blog.
6
- Version: 2.50
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: http://lesterchan.net
9
  */
@@ -38,144 +38,150 @@ function pagenavi_textdomain() {
38
  ### Function: Page Navigation Option Menu
39
  add_action('admin_menu', 'pagenavi_menu');
40
  function pagenavi_menu() {
41
- if (function_exists('add_options_page')) {
42
- add_options_page(__('PageNavi', 'wp-pagenavi'), __('PageNavi', 'wp-pagenavi'), 'manage_options', 'wp-pagenavi/pagenavi-options.php') ;
43
- }
44
  }
45
 
46
-
47
  ### Function: Enqueue PageNavi Stylesheets
48
  add_action('wp_print_styles', 'pagenavi_stylesheets');
49
  function pagenavi_stylesheets() {
50
- if(@file_exists(TEMPLATEPATH.'/pagenavi-css.css')) {
51
- wp_enqueue_style('wp-pagenavi', get_stylesheet_directory_uri().'/pagenavi-css.css', false, '2.50', 'all');
 
 
 
 
 
 
 
52
  } else {
53
- wp_enqueue_style('wp-pagenavi', plugins_url('wp-pagenavi/pagenavi-css.css'), false, '2.50', 'all');
54
- }
 
 
55
  }
56
 
57
 
58
  ### Function: Page Navigation: Boxed Style Paging
59
  function wp_pagenavi($before = '', $after = '') {
60
  global $wpdb, $wp_query;
61
- if (!is_single()) {
62
- $request = $wp_query->request;
63
- $posts_per_page = intval(get_query_var('posts_per_page'));
64
- $paged = intval(get_query_var('paged'));
65
- $pagenavi_options = get_option('pagenavi_options');
66
- $numposts = $wp_query->found_posts;
67
- $max_page = $wp_query->max_num_pages;
68
- if(empty($paged) || $paged == 0) {
69
- $paged = 1;
70
- }
71
- $pages_to_show = intval($pagenavi_options['num_pages']);
72
- $larger_page_to_show = intval($pagenavi_options['num_larger_page_numbers']);
73
- $larger_page_multiple = intval($pagenavi_options['larger_page_numbers_multiple']);
74
- $pages_to_show_minus_1 = $pages_to_show - 1;
75
- $half_page_start = floor($pages_to_show_minus_1/2);
76
- $half_page_end = ceil($pages_to_show_minus_1/2);
77
- $start_page = $paged - $half_page_start;
78
- if($start_page <= 0) {
79
- $start_page = 1;
80
- }
81
- $end_page = $paged + $half_page_end;
82
- if(($end_page - $start_page) != $pages_to_show_minus_1) {
83
- $end_page = $start_page + $pages_to_show_minus_1;
84
- }
85
- if($end_page > $max_page) {
86
- $start_page = $max_page - $pages_to_show_minus_1;
87
- $end_page = $max_page;
88
- }
89
- if($start_page <= 0) {
90
- $start_page = 1;
91
- }
92
- $larger_per_page = $larger_page_to_show*$larger_page_multiple;
93
- $larger_start_page_start = (n_round($start_page, 10) + $larger_page_multiple) - $larger_per_page;
94
- $larger_start_page_end = n_round($start_page, 10) + $larger_page_multiple;
95
- $larger_end_page_start = n_round($end_page, 10) + $larger_page_multiple;
96
- $larger_end_page_end = n_round($end_page, 10) + ($larger_per_page);
97
- if($larger_start_page_end - $larger_page_multiple == $start_page) {
98
- $larger_start_page_start = $larger_start_page_start - $larger_page_multiple;
99
- $larger_start_page_end = $larger_start_page_end - $larger_page_multiple;
100
- }
101
- if($larger_start_page_start <= 0) {
102
- $larger_start_page_start = $larger_page_multiple;
103
- }
104
- if($larger_start_page_end > $max_page) {
105
- $larger_start_page_end = $max_page;
106
- }
107
- if($larger_end_page_end > $max_page) {
108
- $larger_end_page_end = $max_page;
109
- }
110
- if($max_page > 1 || intval($pagenavi_options['always_show']) == 1) {
111
- $pages_text = str_replace("%CURRENT_PAGE%", number_format_i18n($paged), $pagenavi_options['pages_text']);
112
- $pages_text = str_replace("%TOTAL_PAGES%", number_format_i18n($max_page), $pages_text);
113
- echo $before.'<div class="wp-pagenavi">'."\n";
114
- switch(intval($pagenavi_options['style'])) {
115
- case 1:
116
- if(!empty($pages_text)) {
117
- echo '<span class="pages">'.$pages_text.'</span>';
 
 
118
  }
119
- if ($start_page >= 2 && $pages_to_show < $max_page) {
120
- $first_page_text = str_replace("%TOTAL_PAGES%", number_format_i18n($max_page), $pagenavi_options['first_text']);
121
- echo '<a href="'.clean_url(get_pagenum_link()).'" class="first" title="'.$first_page_text.'">'.$first_page_text.'</a>';
122
- if(!empty($pagenavi_options['dotleft_text'])) {
123
- echo '<span class="extend">'.$pagenavi_options['dotleft_text'].'</span>';
124
- }
 
125
  }
126
- if($larger_page_to_show > 0 && $larger_start_page_start > 0 && $larger_start_page_end <= $max_page) {
127
- for($i = $larger_start_page_start; $i < $larger_start_page_end; $i+=$larger_page_multiple) {
128
- $page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $pagenavi_options['page_text']);
129
- echo '<a href="'.clean_url(get_pagenum_link($i)).'" class="page" title="'.$page_text.'">'.$page_text.'</a>';
130
- }
 
 
 
 
131
  }
132
- previous_posts_link($pagenavi_options['prev_text']);
133
- for($i = $start_page; $i <= $end_page; $i++) {
134
- if($i == $paged) {
135
- $current_page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $pagenavi_options['current_text']);
136
- echo '<span class="current">'.$current_page_text.'</span>';
137
- } else {
138
- $page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $pagenavi_options['page_text']);
139
- echo '<a href="'.clean_url(get_pagenum_link($i)).'" class="page" title="'.$page_text.'">'.$page_text.'</a>';
140
- }
141
  }
142
- next_posts_link($pagenavi_options['next_text'], $max_page);
143
- if($larger_page_to_show > 0 && $larger_end_page_start < $max_page) {
144
- for($i = $larger_end_page_start; $i <= $larger_end_page_end; $i+=$larger_page_multiple) {
145
- $page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $pagenavi_options['page_text']);
146
- echo '<a href="'.clean_url(get_pagenum_link($i)).'" class="page" title="'.$page_text.'">'.$page_text.'</a>';
147
- }
148
  }
149
- if ($end_page < $max_page) {
150
- if(!empty($pagenavi_options['dotright_text'])) {
151
- echo '<span class="extend">'.$pagenavi_options['dotright_text'].'</span>';
152
- }
153
- $last_page_text = str_replace("%TOTAL_PAGES%", number_format_i18n($max_page), $pagenavi_options['last_text']);
154
- echo '<a href="'.clean_url(get_pagenum_link($max_page)).'" class="last" title="'.$last_page_text.'">'.$last_page_text.'</a>';
 
 
 
 
 
 
155
  }
156
- break;
157
- case 2;
158
- echo '<form action="'.htmlspecialchars($_SERVER['PHP_SELF']).'" method="get">'."\n";
159
- echo '<select size="1" onchange="document.location.href = this.options[this.selectedIndex].value;">'."\n";
160
- for($i = 1; $i <= $max_page; $i++) {
161
- $page_num = $i;
162
- if($page_num == 1) {
163
- $page_num = 0;
164
- }
165
- if($i == $paged) {
166
- $current_page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $pagenavi_options['current_text']);
167
- echo '<option value="'.clean_url(get_pagenum_link($page_num)).'" selected="selected" class="current">'.$current_page_text."</option>\n";
168
- } else {
169
- $page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $pagenavi_options['page_text']);
170
- echo '<option value="'.clean_url(get_pagenum_link($page_num)).'">'.$page_text."</option>\n";
171
- }
172
  }
173
- echo "</select>\n";
174
- echo "</form>\n";
175
- break;
176
- }
177
- echo '</div>'.$after."\n";
178
  }
 
179
  }
180
  }
181
 
@@ -192,26 +198,40 @@ function n_round($num, $tonearest) {
192
  }
193
 
194
 
 
 
 
 
 
 
 
 
 
 
 
195
  ### Function: Page Navigation Options
196
- add_action('activate_wp-pagenavi/wp-pagenavi.php', 'pagenavi_init');
197
  function pagenavi_init() {
198
  pagenavi_textdomain();
199
  // Add Options
200
- $pagenavi_options = array();
201
- $pagenavi_options['pages_text'] = __('Page %CURRENT_PAGE% of %TOTAL_PAGES%','wp-pagenavi');
202
- $pagenavi_options['current_text'] = '%PAGE_NUMBER%';
203
- $pagenavi_options['page_text'] = '%PAGE_NUMBER%';
204
- $pagenavi_options['first_text'] = __('&laquo; First','wp-pagenavi');
205
- $pagenavi_options['last_text'] = __('Last &raquo;','wp-pagenavi');
206
- $pagenavi_options['next_text'] = __('&raquo;','wp-pagenavi');
207
- $pagenavi_options['prev_text'] = __('&laquo;','wp-pagenavi');
208
- $pagenavi_options['dotright_text'] = __('...','wp-pagenavi');
209
- $pagenavi_options['dotleft_text'] = __('...','wp-pagenavi');
210
- $pagenavi_options['style'] = 1;
211
- $pagenavi_options['num_pages'] = 5;
212
- $pagenavi_options['always_show'] = 0;
213
- $pagenavi_options['num_larger_page_numbers'] = 3;
214
- $pagenavi_options['larger_page_numbers_multiple'] = 10;
 
 
215
  add_option('pagenavi_options', $pagenavi_options, 'PageNavi Options');
216
  }
217
- ?>
 
1
  <?php
2
  /*
3
  Plugin Name: WP-PageNavi
4
+ Plugin URI: http://wordpress.org/extend/plugins/wp-pagenavi/
5
  Description: Adds a more advanced paging navigation to your WordPress blog.
6
+ Version: 2.61
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: http://lesterchan.net
9
  */
38
  ### Function: Page Navigation Option Menu
39
  add_action('admin_menu', 'pagenavi_menu');
40
  function pagenavi_menu() {
41
+ add_options_page(__('PageNavi', 'wp-pagenavi'), __('PageNavi', 'wp-pagenavi'), 'manage_options', 'wp-pagenavi/pagenavi-options.php') ;
 
 
42
  }
43
 
 
44
  ### Function: Enqueue PageNavi Stylesheets
45
  add_action('wp_print_styles', 'pagenavi_stylesheets');
46
  function pagenavi_stylesheets() {
47
+ $pagenavi_options = get_option('pagenavi_options');
48
+
49
+ if ( isset($pagenavi_options['use_pagenavi_css']) && !intval($pagenavi_options['use_pagenavi_css']) )
50
+ return;
51
+
52
+ if (@file_exists(STYLESHEETPATH.'/pagenavi-css.css')) {
53
+ $css_file = get_stylesheet_directory_uri() . '/pagenavi-css.css';
54
+ } elseif (@file_exists(TEMPLATEPATH.'/pagenavi-css.css')) {
55
+ $css_file = get_template_directory_uri() . '/pagenavi-css.css';
56
  } else {
57
+ $css_file = plugins_url('pagenavi-css.css', __FILE__);
58
+ }
59
+
60
+ wp_enqueue_style('wp-pagenavi', $css_file, false, '2.60', 'all');
61
  }
62
 
63
 
64
  ### Function: Page Navigation: Boxed Style Paging
65
  function wp_pagenavi($before = '', $after = '') {
66
  global $wpdb, $wp_query;
67
+
68
+ if (is_single())
69
+ return;
70
+
71
+ $pagenavi_options = get_option('pagenavi_options');
72
+
73
+ $request = $wp_query->request;
74
+ $posts_per_page = intval(get_query_var('posts_per_page'));
75
+ $paged = intval(get_query_var('paged'));
76
+ $numposts = $wp_query->found_posts;
77
+ $max_page = intval($wp_query->max_num_pages);
78
+
79
+ if (empty($paged) || $paged == 0)
80
+ $paged = 1;
81
+
82
+ $pages_to_show = intval($pagenavi_options['num_pages']);
83
+ $larger_page_to_show = intval($pagenavi_options['num_larger_page_numbers']);
84
+ $larger_page_multiple = intval($pagenavi_options['larger_page_numbers_multiple']);
85
+ $pages_to_show_minus_1 = $pages_to_show - 1;
86
+ $half_page_start = floor($pages_to_show_minus_1/2);
87
+ $half_page_end = ceil($pages_to_show_minus_1/2);
88
+ $start_page = $paged - $half_page_start;
89
+
90
+ if ($start_page <= 0)
91
+ $start_page = 1;
92
+
93
+ $end_page = $paged + $half_page_end;
94
+ if (($end_page - $start_page) != $pages_to_show_minus_1) {
95
+ $end_page = $start_page + $pages_to_show_minus_1;
96
+ }
97
+
98
+ if ($end_page > $max_page) {
99
+ $start_page = $max_page - $pages_to_show_minus_1;
100
+ $end_page = $max_page;
101
+ }
102
+
103
+ if ($start_page <= 0)
104
+ $start_page = 1;
105
+
106
+ $larger_pages_array = array();
107
+ if ( $larger_page_multiple )
108
+ for ( $i = $larger_page_multiple; $i <= $max_page; $i += $larger_page_multiple )
109
+ $larger_pages_array[] = $i;
110
+
111
+ if ($max_page > 1 || intval($pagenavi_options['always_show'])) {
112
+ $pages_text = str_replace("%CURRENT_PAGE%", number_format_i18n($paged), $pagenavi_options['pages_text']);
113
+ $pages_text = str_replace("%TOTAL_PAGES%", number_format_i18n($max_page), $pages_text);
114
+ echo $before.'<div class="wp-pagenavi">'."\n";
115
+ switch(intval($pagenavi_options['style'])) {
116
+ // Normal
117
+ case 1:
118
+ if (!empty($pages_text)) {
119
+ echo '<span class="pages">'.$pages_text.'</span>';
120
+ }
121
+ if ($start_page >= 2 && $pages_to_show < $max_page) {
122
+ $first_page_text = str_replace("%TOTAL_PAGES%", number_format_i18n($max_page), $pagenavi_options['first_text']);
123
+ echo '<a href="'.clean_url(get_pagenum_link()).'" class="first" title="'.$first_page_text.'">'.$first_page_text.'</a>';
124
+ if (!empty($pagenavi_options['dotleft_text'])) {
125
+ echo '<span class="extend">'.$pagenavi_options['dotleft_text'].'</span>';
126
  }
127
+ }
128
+ $larger_page_start = 0;
129
+ foreach($larger_pages_array as $larger_page) {
130
+ if ($larger_page < $start_page && $larger_page_start < $larger_page_to_show) {
131
+ $page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($larger_page), $pagenavi_options['page_text']);
132
+ echo '<a href="'.clean_url(get_pagenum_link($larger_page)).'" class="page" title="'.$page_text.'">'.$page_text.'</a>';
133
+ $larger_page_start++;
134
  }
135
+ }
136
+ previous_posts_link($pagenavi_options['prev_text']);
137
+ for($i = $start_page; $i <= $end_page; $i++) {
138
+ if ($i == $paged) {
139
+ $current_page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $pagenavi_options['current_text']);
140
+ echo '<span class="current">'.$current_page_text.'</span>';
141
+ } else {
142
+ $page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $pagenavi_options['page_text']);
143
+ echo '<a href="'.clean_url(get_pagenum_link($i)).'" class="page" title="'.$page_text.'">'.$page_text.'</a>';
144
  }
145
+ }
146
+ next_posts_link($pagenavi_options['next_text'], $max_page);
147
+ $larger_page_end = 0;
148
+ foreach($larger_pages_array as $larger_page) {
149
+ if ($larger_page > $end_page && $larger_page_end < $larger_page_to_show) {
150
+ $page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($larger_page), $pagenavi_options['page_text']);
151
+ echo '<a href="'.clean_url(get_pagenum_link($larger_page)).'" class="page" title="'.$page_text.'">'.$page_text.'</a>';
152
+ $larger_page_end++;
 
153
  }
154
+ }
155
+ if ($end_page < $max_page) {
156
+ if (!empty($pagenavi_options['dotright_text'])) {
157
+ echo '<span class="extend">'.$pagenavi_options['dotright_text'].'</span>';
 
 
158
  }
159
+ $last_page_text = str_replace("%TOTAL_PAGES%", number_format_i18n($max_page), $pagenavi_options['last_text']);
160
+ echo '<a href="'.clean_url(get_pagenum_link($max_page)).'" class="last" title="'.$last_page_text.'">'.$last_page_text.'</a>';
161
+ }
162
+ break;
163
+ // Dropdown
164
+ case 2;
165
+ echo '<form action="'.htmlspecialchars($_SERVER['PHP_SELF']).'" method="get">'."\n";
166
+ echo '<select size="1" onchange="document.location.href = this.options[this.selectedIndex].value;">'."\n";
167
+ for($i = 1; $i <= $max_page; $i++) {
168
+ $page_num = $i;
169
+ if ($page_num == 1) {
170
+ $page_num = 0;
171
  }
172
+ if ($i == $paged) {
173
+ $current_page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $pagenavi_options['current_text']);
174
+ echo '<option value="'.clean_url(get_pagenum_link($page_num)).'" selected="selected" class="current">'.$current_page_text."</option>\n";
175
+ } else {
176
+ $page_text = str_replace("%PAGE_NUMBER%", number_format_i18n($i), $pagenavi_options['page_text']);
177
+ echo '<option value="'.clean_url(get_pagenum_link($page_num)).'">'.$page_text."</option>\n";
 
 
 
 
 
 
 
 
 
 
178
  }
179
+ }
180
+ echo "</select>\n";
181
+ echo "</form>\n";
182
+ break;
 
183
  }
184
+ echo '</div>'.$after."\n";
185
  }
186
  }
187
 
198
  }
199
 
200
 
201
+ ### Function: Filters for Previous and Next Posts Link CSS Class
202
+ add_filter('previous_posts_link_attributes','previous_posts_link_class');
203
+ function previous_posts_link_class() {
204
+ return 'class="previouspostslink"';
205
+ }
206
+ add_filter('next_posts_link_attributes','next_posts_link_class');
207
+ function next_posts_link_class() {
208
+ return 'class="nextpostslink"';
209
+ }
210
+
211
+
212
  ### Function: Page Navigation Options
213
+ register_activation_hook(__FILE__, 'pagenavi_init');
214
  function pagenavi_init() {
215
  pagenavi_textdomain();
216
  // Add Options
217
+ $pagenavi_options = array(
218
+ 'pages_text' => __('Page %CURRENT_PAGE% of %TOTAL_PAGES%','wp-pagenavi'),
219
+ 'current_text' => '%PAGE_NUMBER%',
220
+ 'page_text' => '%PAGE_NUMBER%',
221
+ 'first_text' => __('&laquo; First','wp-pagenavi'),
222
+ 'last_text' => __('Last &raquo;','wp-pagenavi'),
223
+ 'next_text' => __('&raquo;','wp-pagenavi'),
224
+ 'prev_text' => __('&laquo;','wp-pagenavi'),
225
+ 'dotright_text' => __('...','wp-pagenavi'),
226
+ 'dotleft_text' => __('...','wp-pagenavi'),
227
+ 'style' => 1,
228
+ 'num_pages' => 5,
229
+ 'always_show' => 0,
230
+ 'num_larger_page_numbers' => 3,
231
+ 'larger_page_numbers_multiple' => 10,
232
+ 'use_pagenavi_css' => 1,
233
+ );
234
  add_option('pagenavi_options', $pagenavi_options, 'PageNavi Options');
235
  }
236
+
237
+
wp-pagenavi.pot CHANGED
@@ -1,142 +1,136 @@
 
 
 
 
 
 
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: WP-PageNavi 2.50\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2009-06-08 18:58+0800\n"
6
- "PO-Revision-Date: 2009-06-08 18:59+0800\n"
7
- "Last-Translator: Lester Chan <lesterchan@gmail.com>\n"
8
- "Language-Team: Lester Chan <lesterchan@gmail.com>\n"
9
  "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-Language: English\n"
13
- "X-Poedit-Country: SINGAPORE\n"
14
- "X-Poedit-KeywordsList: __;_e;__ngettext:1,2\n"
15
- "X-Poedit-Basepath: .\n"
16
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
17
- "X-Poedit-SearchPath-0: .\n"
18
-
19
- #: pagenavi-options.php:48
20
- #: pagenavi-options.php:110
21
- #: pagenavi-options.php:174
22
  msgid "Page Navigation Options"
23
  msgstr ""
24
 
25
- #: pagenavi-options.php:53
26
  msgid "Updated"
27
  msgstr ""
28
 
29
- #: pagenavi-options.php:58
30
  msgid "No Page Navigation Option Updated"
31
  msgstr ""
32
 
33
- #: pagenavi-options.php:64
34
- #: pagenavi-options.php:265
35
  msgid "UNINSTALL WP-PageNavi"
36
  msgstr ""
37
 
38
- #: pagenavi-options.php:72
39
  #, php-format
40
  msgid "Setting Key '%s' has been deleted."
41
  msgstr ""
42
 
43
- #: pagenavi-options.php:76
44
  #, php-format
45
  msgid "Error deleting Setting Key '%s'."
46
  msgstr ""
47
 
48
- #: pagenavi-options.php:98
49
- #: pagenavi-options.php:233
50
  msgid "Uninstall WP-PageNavi"
51
  msgstr ""
52
 
53
- #: pagenavi-options.php:99
54
  #, php-format
55
- msgid "<a href=\"%s\">Click Here</a> To Finish The Uninstallation And WP-PageNavi Will Be Deactivated Automatically."
 
 
56
  msgstr ""
57
 
58
- #: pagenavi-options.php:111
59
  msgid "Page Navigation Text"
60
  msgstr ""
61
 
62
- #: pagenavi-options.php:114
63
  msgid "Text For Number Of Pages"
64
  msgstr ""
65
 
66
- #: pagenavi-options.php:117
67
  msgid "The current page number."
68
  msgstr ""
69
 
70
- #: pagenavi-options.php:118
71
- #: pagenavi-options.php:139
72
- #: pagenavi-options.php:146
73
  msgid "The total number of pages."
74
  msgstr ""
75
 
76
- #: pagenavi-options.php:122
77
  msgid "Text For Current Page"
78
  msgstr ""
79
 
80
- #: pagenavi-options.php:125
81
- #: pagenavi-options.php:132
82
  msgid "The page number."
83
  msgstr ""
84
 
85
- #: pagenavi-options.php:129
86
  msgid "Text For Page"
87
  msgstr ""
88
 
89
- #: pagenavi-options.php:136
90
- msgid "Text For First Post"
91
  msgstr ""
92
 
93
- #: pagenavi-options.php:143
94
- msgid "Text For Last Post"
95
  msgstr ""
96
 
97
- #: pagenavi-options.php:150
98
- msgid "Text For Next Post"
99
  msgstr ""
100
 
101
- #: pagenavi-options.php:156
102
- msgid "Text For Previous Post"
103
  msgstr ""
104
 
105
- #: pagenavi-options.php:162
106
  msgid "Text For Next ..."
107
  msgstr ""
108
 
109
- #: pagenavi-options.php:168
110
  msgid "Text For Previous ..."
111
  msgstr ""
112
 
113
- #: pagenavi-options.php:177
 
 
 
 
114
  msgid "Page Navigation Style"
115
  msgstr ""
116
 
117
- #: pagenavi-options.php:180
118
  msgid "Normal"
119
  msgstr ""
120
 
121
- #: pagenavi-options.php:181
122
  msgid "Drop Down List"
123
  msgstr ""
124
 
125
- #: pagenavi-options.php:186
126
  msgid "Number Of Pages To Show?"
127
  msgstr ""
128
 
129
- #: pagenavi-options.php:192
130
  msgid "Always Show Page Navigation?"
131
  msgstr ""
132
 
133
- #: pagenavi-options.php:195
134
- #: pagenavi-options.php:264
135
- msgid "Yes"
136
- msgstr ""
137
-
138
- #: pagenavi-options.php:196
139
- msgid "No"
140
  msgstr ""
141
 
142
  #: pagenavi-options.php:201
@@ -144,11 +138,15 @@ msgid "Number Of Larger Page Numbers To Show?"
144
  msgstr ""
145
 
146
  #: pagenavi-options.php:205
147
- msgid "Larger page numbers are in additional to the default page numbers. It is useful for authors who is paginating through many posts."
 
 
148
  msgstr ""
149
 
150
  #: pagenavi-options.php:207
151
- msgid "For example, WP-PageNavi will display: Pages 1, 2, 3, 4, 5, 10, 20, 30, 40, 50"
 
 
152
  msgstr ""
153
 
154
  #: pagenavi-options.php:209
@@ -172,7 +170,10 @@ msgid "Save Changes"
172
  msgstr ""
173
 
174
  #: pagenavi-options.php:235
175
- msgid "Deactivating WP-PageNavi plugin does not remove any data that may have been created, such as the page navigation options. To completely remove this plugin, you can uninstall it here."
 
 
 
176
  msgstr ""
177
 
178
  #: pagenavi-options.php:238
@@ -180,7 +181,9 @@ msgid "WARNING:"
180
  msgstr ""
181
 
182
  #: pagenavi-options.php:239
183
- msgid "Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first."
 
 
184
  msgstr ""
185
 
186
  #: pagenavi-options.php:242
@@ -191,40 +194,56 @@ msgstr ""
191
  msgid "WordPress Options"
192
  msgstr ""
193
 
194
- #: pagenavi-options.php:265
195
  msgid ""
196
- "You Are About To Uninstall WP-PageNavi From WordPress.\\n"
197
- "This Action Is Not Reversible.\\n"
198
- "\\n"
199
- " Choose [Cancel] To Stop, [OK] To Uninstall."
200
  msgstr ""
201
 
202
- #: wp-pagenavi.php:42
203
  msgid "PageNavi"
204
  msgstr ""
205
 
206
- #: wp-pagenavi.php:201
207
  msgid "Page %CURRENT_PAGE% of %TOTAL_PAGES%"
208
  msgstr ""
209
 
210
- #: wp-pagenavi.php:204
211
  msgid "&laquo; First"
212
  msgstr ""
213
 
214
- #: wp-pagenavi.php:205
215
  msgid "Last &raquo;"
216
  msgstr ""
217
 
218
- #: wp-pagenavi.php:206
219
  msgid "&raquo;"
220
  msgstr ""
221
 
222
- #: wp-pagenavi.php:207
223
  msgid "&laquo;"
224
  msgstr ""
225
 
226
- #: wp-pagenavi.php:208
227
- #: wp-pagenavi.php:209
228
  msgid "..."
229
  msgstr ""
230
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Translation of the WordPress plugin WP-PageNavi 2.60 by Lester 'GaMerZ' Chan.
2
+ # Copyright (C) 2010 Lester 'GaMerZ' Chan
3
+ # This file is distributed under the same license as the WP-PageNavi package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
5
+ #
6
+ #, fuzzy
7
  msgid ""
8
  msgstr ""
9
+ "Project-Id-Version: WP-PageNavi 2.60\n"
10
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-pagenavi\n"
11
+ "POT-Creation-Date: 2010-02-07 16:16+0000\n"
12
+ "PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
13
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
+ "Language-Team: LANGUAGE <LL@li.org>\n"
15
  "MIME-Version: 1.0\n"
16
+ "Content-Type: text/plain; charset=utf-8\n"
17
  "Content-Transfer-Encoding: 8bit\n"
18
+
19
+ #: pagenavi-options.php:47 pagenavi-options.php:106 pagenavi-options.php:170
 
 
 
 
 
 
 
 
20
  msgid "Page Navigation Options"
21
  msgstr ""
22
 
23
+ #: pagenavi-options.php:52
24
  msgid "Updated"
25
  msgstr ""
26
 
27
+ #: pagenavi-options.php:57
28
  msgid "No Page Navigation Option Updated"
29
  msgstr ""
30
 
31
+ #: pagenavi-options.php:64 pagenavi-options.php:264
 
32
  msgid "UNINSTALL WP-PageNavi"
33
  msgstr ""
34
 
35
+ #: pagenavi-options.php:71
36
  #, php-format
37
  msgid "Setting Key '%s' has been deleted."
38
  msgstr ""
39
 
40
+ #: pagenavi-options.php:75
41
  #, php-format
42
  msgid "Error deleting Setting Key '%s'."
43
  msgstr ""
44
 
45
+ #: pagenavi-options.php:94 pagenavi-options.php:233
 
46
  msgid "Uninstall WP-PageNavi"
47
  msgstr ""
48
 
49
+ #: pagenavi-options.php:95
50
  #, php-format
51
+ msgid ""
52
+ "<a href=\"%s\">Click Here</a> To Finish The Uninstallation And WP-PageNavi "
53
+ "Will Be Deactivated Automatically."
54
  msgstr ""
55
 
56
+ #: pagenavi-options.php:107
57
  msgid "Page Navigation Text"
58
  msgstr ""
59
 
60
+ #: pagenavi-options.php:110
61
  msgid "Text For Number Of Pages"
62
  msgstr ""
63
 
64
+ #: pagenavi-options.php:113
65
  msgid "The current page number."
66
  msgstr ""
67
 
68
+ #: pagenavi-options.php:114 pagenavi-options.php:135 pagenavi-options.php:142
 
 
69
  msgid "The total number of pages."
70
  msgstr ""
71
 
72
+ #: pagenavi-options.php:118
73
  msgid "Text For Current Page"
74
  msgstr ""
75
 
76
+ #: pagenavi-options.php:121 pagenavi-options.php:128
 
77
  msgid "The page number."
78
  msgstr ""
79
 
80
+ #: pagenavi-options.php:125
81
  msgid "Text For Page"
82
  msgstr ""
83
 
84
+ #: pagenavi-options.php:132
85
+ msgid "Text For First Page"
86
  msgstr ""
87
 
88
+ #: pagenavi-options.php:139
89
+ msgid "Text For Last Page"
90
  msgstr ""
91
 
92
+ #: pagenavi-options.php:146
93
+ msgid "Text For Next Page"
94
  msgstr ""
95
 
96
+ #: pagenavi-options.php:152
97
+ msgid "Text For Previous Page"
98
  msgstr ""
99
 
100
+ #: pagenavi-options.php:158
101
  msgid "Text For Next ..."
102
  msgstr ""
103
 
104
+ #: pagenavi-options.php:164
105
  msgid "Text For Previous ..."
106
  msgstr ""
107
 
108
+ #: pagenavi-options.php:173
109
+ msgid "Use pagenavi.css?"
110
+ msgstr ""
111
+
112
+ #: pagenavi-options.php:179
113
  msgid "Page Navigation Style"
114
  msgstr ""
115
 
116
+ #: pagenavi-options.php:182
117
  msgid "Normal"
118
  msgstr ""
119
 
120
+ #: pagenavi-options.php:183
121
  msgid "Drop Down List"
122
  msgstr ""
123
 
124
+ #: pagenavi-options.php:188
125
  msgid "Number Of Pages To Show?"
126
  msgstr ""
127
 
128
+ #: pagenavi-options.php:194
129
  msgid "Always Show Page Navigation?"
130
  msgstr ""
131
 
132
+ #: pagenavi-options.php:197
133
+ msgid "Show navigation even if there's only one page"
 
 
 
 
 
134
  msgstr ""
135
 
136
  #: pagenavi-options.php:201
138
  msgstr ""
139
 
140
  #: pagenavi-options.php:205
141
+ msgid ""
142
+ "Larger page numbers are in additional to the default page numbers. It is "
143
+ "useful for authors who is paginating through many posts."
144
  msgstr ""
145
 
146
  #: pagenavi-options.php:207
147
+ msgid ""
148
+ "For example, WP-PageNavi will display: Pages 1, 2, 3, 4, 5, 10, 20, 30, 40, "
149
+ "50"
150
  msgstr ""
151
 
152
  #: pagenavi-options.php:209
170
  msgstr ""
171
 
172
  #: pagenavi-options.php:235
173
+ msgid ""
174
+ "Deactivating WP-PageNavi plugin does not remove any data that may have been "
175
+ "created, such as the page navigation options. To completely remove this "
176
+ "plugin, you can uninstall it here."
177
  msgstr ""
178
 
179
  #: pagenavi-options.php:238
181
  msgstr ""
182
 
183
  #: pagenavi-options.php:239
184
+ msgid ""
185
+ "Once uninstalled, this cannot be undone. You should use a Database Backup "
186
+ "plugin of WordPress to back up all the data first."
187
  msgstr ""
188
 
189
  #: pagenavi-options.php:242
194
  msgid "WordPress Options"
195
  msgstr ""
196
 
197
+ #: pagenavi-options.php:264
198
  msgid ""
199
+ "You Are About To Uninstall WP-PageNavi From WordPress.\\nThis Action Is Not "
200
+ "Reversible.\\n\\n Choose [Cancel] To Stop, [OK] To Uninstall."
 
 
201
  msgstr ""
202
 
203
+ #: wp-pagenavi.php:41
204
  msgid "PageNavi"
205
  msgstr ""
206
 
207
+ #: wp-pagenavi.php:217
208
  msgid "Page %CURRENT_PAGE% of %TOTAL_PAGES%"
209
  msgstr ""
210
 
211
+ #: wp-pagenavi.php:220
212
  msgid "&laquo; First"
213
  msgstr ""
214
 
215
+ #: wp-pagenavi.php:221
216
  msgid "Last &raquo;"
217
  msgstr ""
218
 
219
+ #: wp-pagenavi.php:222
220
  msgid "&raquo;"
221
  msgstr ""
222
 
223
+ #: wp-pagenavi.php:223
224
  msgid "&laquo;"
225
  msgstr ""
226
 
227
+ #: wp-pagenavi.php:224 wp-pagenavi.php:225
 
228
  msgid "..."
229
  msgstr ""
230
 
231
+ #. Plugin Name of an extension
232
+ msgid "WP-PageNavi"
233
+ msgstr ""
234
+
235
+ #. Plugin URI of an extension
236
+ msgid "http://lesterchan.net/portfolio/programming/php/"
237
+ msgstr ""
238
+
239
+ #. Description of an extension
240
+ msgid "Adds a more advanced paging navigation to your WordPress blog."
241
+ msgstr ""
242
+
243
+ #. Author of an extension
244
+ msgid "Lester 'GaMerZ' Chan"
245
+ msgstr ""
246
+
247
+ #. Author URI of an extension
248
+ msgid "http://lesterchan.net"
249
+ msgstr ""