WP-PageNavi - Version 2.30

Version Description

Download this release

Release Info

Developer GamerZ
Plugin Icon WP-PageNavi
Version 2.30
Comparing to
See all releases

Code changes from version 2.20 to 2.30

pagenavi/pagenavi-css.css → pagenavi-css.css RENAMED
@@ -1,8 +1,8 @@
1
  /*
2
  +----------------------------------------------------------------+
3
  | |
4
- | WordPress 2.1 Plugin: WP-PageNavi 2.20 |
5
- | Copyright (c) 2007 Lester "GaMerZ" Chan |
6
  | |
7
  | File Written By: |
8
  | - Lester "GaMerZ" Chan |
@@ -10,13 +10,21 @@
10
  | |
11
  | File Information: |
12
  | - Page Navigation CSS Style |
13
- | - wp-content/plugins/pagenavi/pagenavi-css.css |
14
  | |
15
  +----------------------------------------------------------------+
16
  */
17
 
18
 
19
- .wp-pagenavi a, .wp-pagenavi a:link, .wp-pagenavi a:active {
 
 
 
 
 
 
 
 
20
  padding: 2px 4px 2px 4px;
21
  margin: 2px;
22
  text-decoration: none;
@@ -25,10 +33,18 @@
25
  background-color: #FFFFFF;
26
  }
27
  .wp-pagenavi a:hover {
28
- border: 1px solid #114477;
29
- color: #114477;
30
  background-color: #FFFFFF;
31
  }
 
 
 
 
 
 
 
 
32
  .wp-pagenavi span.pages {
33
  padding: 2px 4px 2px 4px;
34
  margin: 2px 2px 2px 2px;
1
  /*
2
  +----------------------------------------------------------------+
3
  | |
4
+ | WordPress 2.5 Plugin: WP-PageNavi 2.30 |
5
+ | Copyright (c) 2008 Lester "GaMerZ" Chan |
6
  | |
7
  | File Written By: |
8
  | - Lester "GaMerZ" Chan |
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;
24
+ color: #0066cc;
25
+ background-color: #FFFFFF;
26
+ }
27
+ .wp-pagenavi a:visited {
28
  padding: 2px 4px 2px 4px;
29
  margin: 2px;
30
  text-decoration: none;
33
  background-color: #FFFFFF;
34
  }
35
  .wp-pagenavi a:hover {
36
+ border: 1px solid #000000;
37
+ color: #000000;
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;
45
+ color: #0066cc;
46
+ background-color: #FFFFFF;
47
+ }
48
  .wp-pagenavi span.pages {
49
  padding: 2px 4px 2px 4px;
50
  margin: 2px 2px 2px 2px;
pagenavi-options.php ADDED
@@ -0,0 +1,246 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ +----------------------------------------------------------------+
4
+ | |
5
+ | WordPress 2.5 Plugin: WP-PageNavi 2.30 |
6
+ | Copyright (c) 2008 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
+ $update_pagenavi_queries = array();
44
+ $update_pagenavi_text = array();
45
+ $update_pagenavi_queries[] = update_option('pagenavi_options', $pagenavi_options);
46
+ $update_pagenavi_text[] = __('Page Navigation Options', 'wp-pagenavi');
47
+ $i=0;
48
+ $text = '';
49
+ foreach($update_pagenavi_queries as $update_pagenavi_query) {
50
+ if($update_pagenavi_query) {
51
+ $text .= '<font color="green">'.$update_pagenavi_text[$i].' '.__('Updated', 'wp-pagenavi').'</font><br />';
52
+ }
53
+ $i++;
54
+ }
55
+ if(empty($text)) {
56
+ $text = '<font color="red">'.__('No Page Navigation Option Updated', 'wp-pagenavi').'</font>';
57
+ }
58
+ }
59
+ // Uninstall WP-PageNavi
60
+ if(!empty($_POST['do'])) {
61
+ switch($_POST['do']) {
62
+ case __('UNINSTALL WP-PageNavi', 'wp-pagenavi') :
63
+ if(trim($_POST['uninstall_pagenavi_yes']) == 'yes') {
64
+ echo '<div id="message" class="updated fade">';
65
+ echo '<p>';
66
+ foreach($pagenavi_settings as $setting) {
67
+ $delete_setting = delete_option($setting);
68
+ if($delete_setting) {
69
+ echo '<font color="green">';
70
+ printf(__('Setting Key \'%s\' has been deleted.', 'wp-pagenavi'), "<strong><em>{$setting}</em></strong>");
71
+ echo '</font><br />';
72
+ } else {
73
+ echo '<font color="red">';
74
+ printf(__('Error deleting Setting Key \'%s\'.', 'wp-pagenavi'), "<strong><em>{$setting}</em></strong>");
75
+ echo '</font><br />';
76
+ }
77
+ }
78
+ echo '</p>';
79
+ echo '</div>';
80
+ $mode = 'end-UNINSTALL';
81
+ }
82
+ break;
83
+ }
84
+ }
85
+
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
+ if(function_exists('wp_nonce_url')) {
93
+ $deactivate_url = wp_nonce_url($deactivate_url, 'deactivate-plugin_wp-pagenavi/wp-pagenavi.php');
94
+ }
95
+ echo '<div class="wrap">';
96
+ echo '<h2>'.__('Uninstall WP-PageNavi', 'wp-pagenavi').'</h2>';
97
+ 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>';
98
+ echo '</div>';
99
+ break;
100
+ // Main Page
101
+ default:
102
+ $pagenavi_options = get_option('pagenavi_options');
103
+ ?>
104
+ <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
105
+ <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
106
+ <div class="wrap">
107
+ <h2><?php _e('Page Navigation Options', 'wp-pagenavi'); ?></h2>
108
+ <h3><?php _e('Page Navigation Text', 'wp-pagenavi'); ?></h3>
109
+ <table class="form-table">
110
+ <tr>
111
+ <th scope="row" valign="top"><?php _e('Text For Number Of Pages', 'wp-pagenavi'); ?></th>
112
+ <td>
113
+ <input type="text" name="pagenavi_pages_text" value="<?php echo stripslashes($pagenavi_options['pages_text']); ?>" size="50" /><br />
114
+ %CURRENT_PAGE% - <?php _e('The current page number.', 'wp-pagenavi'); ?><br />
115
+ %TOTAL_PAGES% - <?php _e('The total number of pages.', 'wp-pagenavi'); ?>
116
+ </td>
117
+ </tr>
118
+ <tr>
119
+ <th scope="row" valign="top"><?php _e('Text For Current Page', 'wp-pagenavi'); ?></th>
120
+ <td>
121
+ <input type="text" name="pagenavi_current_text" value="<?php echo stripslashes(htmlspecialchars($pagenavi_options['current_text'])); ?>" size="30" /><br />
122
+ %PAGE_NUMBER% - <?php _e('The page number.', 'wp-pagenavi'); ?><br />
123
+ </td>
124
+ </tr>
125
+ <tr>
126
+ <th scope="row" valign="top"><?php _e('Text For Page', 'wp-pagenavi'); ?></th>
127
+ <td>
128
+ <input type="text" name="pagenavi_page_text" value="<?php echo stripslashes(htmlspecialchars($pagenavi_options['page_text'])); ?>" size="30" /><br />
129
+ %PAGE_NUMBER% - <?php _e('The page number.', 'wp-pagenavi'); ?><br />
130
+ </td>
131
+ </tr>
132
+ <tr>
133
+ <th scope="row" valign="top"><?php _e('Text For First Post', 'wp-pagenavi'); ?></th>
134
+ <td>
135
+ <input type="text" name="pagenavi_first_text" value="<?php echo stripslashes(htmlspecialchars($pagenavi_options['first_text'])); ?>" size="30" /><br />
136
+ %TOTAL_PAGES% - <?php _e('The total number of pages.', 'wp-pagenavi'); ?>
137
+ </td>
138
+ </tr>
139
+ <tr>
140
+ <th scope="row" valign="top"><?php _e('Text For Last Post', 'wp-pagenavi'); ?></th>
141
+ <td>
142
+ <input type="text" name="pagenavi_last_text" value="<?php echo stripslashes(htmlspecialchars($pagenavi_options['last_text'])); ?>" size="30" /><br />
143
+ %TOTAL_PAGES% - <?php _e('The total number of pages.', 'wp-pagenavi'); ?>
144
+ </td>
145
+ </tr>
146
+ <tr>
147
+ <th scope="row" valign="top"><?php _e('Text For Next Post', 'wp-pagenavi'); ?></th>
148
+ <td>
149
+ <input type="text" name="pagenavi_next_text" value="<?php echo stripslashes(htmlspecialchars($pagenavi_options['next_text'])); ?>" size="30" />
150
+ </td>
151
+ </tr>
152
+ <tr>
153
+ <th scope="row" valign="top"><?php _e('Text For Previous Post', 'wp-pagenavi'); ?></th>
154
+ <td>
155
+ <input type="text" name="pagenavi_prev_text" value="<?php echo stripslashes(htmlspecialchars($pagenavi_options['prev_text'])); ?>" size="30" />
156
+ </td>
157
+ </tr>
158
+ <tr>
159
+ <th scope="row" valign="top"><?php _e('Text For Next ...', 'wp-pagenavi'); ?></th>
160
+ <td>
161
+ <input type="text" name="pagenavi_dotright_text" value="<?php echo stripslashes(htmlspecialchars($pagenavi_options['dotright_text'])); ?>" size="30" />
162
+ </td>
163
+ </tr>
164
+ <tr>
165
+ <th scope="row" valign="top"><?php _e('Text For Previous ...', 'wp-pagenavi'); ?></th>
166
+ <td>
167
+ <input type="text" name="pagenavi_dotleft_text" value="<?php echo stripslashes(htmlspecialchars($pagenavi_options['dotright_text'])); ?>" size="30" />
168
+ </td>
169
+ </tr>
170
+ </table>
171
+ <h3><?php _e('Page Navigation Options', 'wp-pagenavi'); ?></h3>
172
+ <table class="form-table">
173
+ <tr>
174
+ <th scope="row" valign="top"><?php _e('Page Navigation Style', 'wp-pagenavi'); ?></th>
175
+ <td>
176
+ <select name="pagenavi_style" size="1">
177
+ <option value="1"<?php selected('1', $pagenavi_options['style']); ?>><?php _e('Normal', 'wp-pagenavi'); ?></option>
178
+ <option value="2"<?php selected('2', $pagenavi_options['style']); ?>><?php _e('Drop Down List', 'wp-pagenavi'); ?></option>
179
+ </select>
180
+ </td>
181
+ </tr>
182
+ <tr>
183
+ <th scope="row" valign="top"><?php _e('Number Of Pages To Show?', 'wp-pagenavi'); ?></th>
184
+ <td>
185
+ <input type="text" name="pagenavi_num_pages" value="<?php echo stripslashes($pagenavi_options['num_pages']); ?>" size="4" />
186
+ </td>
187
+ </tr>
188
+ <tr>
189
+ <th scope="row" valign="top"><?php _e('Always Show Page Navigation?', 'wp-pagenavi'); ?></th>
190
+ <td>
191
+ <select name="pagenavi_always_show" size="1">
192
+ <option value="1"<?php selected('1', $pagenavi_options['always_show']); ?>><?php _e('Yes', 'wp-pagenavi'); ?></option>
193
+ <option value="0"<?php selected('0', $pagenavi_options['always_show']); ?>><?php _e('No', 'wp-pagenavi'); ?></option>
194
+ </select>
195
+ </td>
196
+ </tr>
197
+ </table>
198
+ <p class="submit">
199
+ <input type="submit" name="Submit" class="button" value="<?php _e('Save Changes', 'wp-pagenavi'); ?>" />
200
+ </p>
201
+ </div>
202
+ </form>
203
+ <p>&nbsp;</p>
204
+
205
+ <!-- Uninstall WP-PageNavi -->
206
+ <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
207
+ <div class="wrap">
208
+ <h2><?php _e('Uninstall WP-PageNavi', 'wp-pagenavi'); ?></h2>
209
+ <p style="text-align: left;">
210
+ <?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'); ?>
211
+ </p>
212
+ <p style="text-align: left; color: red">
213
+ <strong><?php _e('WARNING:', 'wp-pagenavi'); ?></strong><br />
214
+ <?php _e('Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first.', 'wp-pagenavi'); ?>
215
+ </p>
216
+ <p style="text-align: left; color: red">
217
+ <strong><?php _e('The following WordPress Options will be DELETED:', 'wp-pagenavi'); ?></strong><br />
218
+ </p>
219
+ <table class="widefat">
220
+ <thead>
221
+ <tr>
222
+ <th><?php _e('WordPress Options', 'wp-pagenavi'); ?></th>
223
+ </tr>
224
+ </thead>
225
+ <tr>
226
+ <td valign="top">
227
+ <ol>
228
+ <?php
229
+ foreach($pagenavi_settings as $settings) {
230
+ echo '<li>'.$settings.'</li>'."\n";
231
+ }
232
+ ?>
233
+ </ol>
234
+ </td>
235
+ </tr>
236
+ </table>
237
+ <p>&nbsp;</p>
238
+ <p style="text-align: center;">
239
+ <input type="checkbox" name="uninstall_pagenavi_yes" value="yes" />&nbsp;<?php _e('Yes', 'wp-pagenavi'); ?><br /><br />
240
+ <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'); ?>')" />
241
+ </p>
242
+ </div>
243
+ </form>
244
+ <?php
245
+ } // End switch($mode)
246
+ ?>
pagenavi/pagenavi-options.php DELETED
@@ -1,245 +0,0 @@
1
- <?php
2
- /*
3
- +----------------------------------------------------------------+
4
- | |
5
- | WordPress 2.1 Plugin: WP-PageNavi 2.20 |
6
- | Copyright (c) 2007 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/pagenavi/pagenavi-options.php |
15
- | |
16
- +----------------------------------------------------------------+
17
- */
18
-
19
-
20
- ### Variables Variables Variables
21
- $base_name = plugin_basename('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
- if(!empty($_POST['do'])) {
29
- // Decide What To Do
30
- switch($_POST['do']) {
31
- case __('Update Options', 'wp-pagenavi'):
32
- $pagenavi_options = array();
33
- $pagenavi_options['pages_text'] = addslashes($_POST['pagenavi_pages_text']);
34
- $pagenavi_options['current_text'] = addslashes($_POST['pagenavi_current_text']);
35
- $pagenavi_options['page_text'] = addslashes($_POST['pagenavi_page_text']);
36
- $pagenavi_options['first_text'] = addslashes($_POST['pagenavi_first_text']);
37
- $pagenavi_options['last_text'] = addslashes($_POST['pagenavi_last_text']);
38
- $pagenavi_options['next_text'] = addslashes($_POST['pagenavi_next_text']);
39
- $pagenavi_options['prev_text'] = addslashes($_POST['pagenavi_prev_text']);
40
- $pagenavi_options['dotright_text'] = addslashes($_POST['pagenavi_dotright_text']);
41
- $pagenavi_options['dotleft_text'] = addslashes($_POST['pagenavi_dotleft_text']);
42
- $pagenavi_options['style'] = intval(trim($_POST['pagenavi_style']));
43
- $pagenavi_options['num_pages'] = intval(trim($_POST['pagenavi_num_pages']));
44
- $pagenavi_options['always_show'] = intval(trim($_POST['pagenavi_always_show']));
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
- break;
61
- // Uninstall WP-PageNavi
62
- case __('UNINSTALL WP-PageNavi', 'wp-pagenavi') :
63
- if(trim($_POST['uninstall_pagenavi_yes']) == 'yes') {
64
- echo '<div id="message" class="updated fade">';
65
- echo '<p>';
66
- foreach($pagenavi_settings as $setting) {
67
- $delete_setting = delete_option($setting);
68
- if($delete_setting) {
69
- echo '<font color="green">';
70
- printf(__('Setting Key \'%s\' has been deleted.', 'wp-pagenavi'), "<strong><em>{$setting}</em></strong>");
71
- echo '</font><br />';
72
- } else {
73
- echo '<font color="red">';
74
- printf(__('Error deleting Setting Key \'%s\'.', 'wp-pagenavi'), "<strong><em>{$setting}</em></strong>");
75
- echo '</font><br />';
76
- }
77
- }
78
- echo '</p>';
79
- echo '</div>';
80
- $mode = 'end-UNINSTALL';
81
- }
82
- break;
83
- }
84
- }
85
-
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=pagenavi/pagenavi.php';
92
- if(function_exists('wp_nonce_url')) {
93
- $deactivate_url = wp_nonce_url($deactivate_url, 'deactivate-plugin_pagenavi/pagenavi.php');
94
- }
95
- echo '<div class="wrap">';
96
- echo '<h2>'.__('Uninstall WP-PageNavi', 'wp-pagenavi').'</h2>';
97
- 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>';
98
- echo '</div>';
99
- break;
100
- // Main Page
101
- default:
102
- $pagenavi_options = get_option('pagenavi_options');
103
- ?>
104
- <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
105
- <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
106
- <div class="wrap">
107
- <h2><?php _e('Page Navigation Options', 'wp-pagenavi'); ?></h2>
108
- <fieldset class="options">
109
- <legend><?php _e('Page Navigation Text', 'wp-pagenavi'); ?></legend>
110
- <table width="100%" border="0" cellspacing="3" cellpadding="3">
111
- <tr valign="top">
112
- <th align="left" width="30%"><?php _e('Text For Number Of Pages', 'wp-pagenavi'); ?></th>
113
- <td align="left">
114
- <input type="text" name="pagenavi_pages_text" value="<?php echo stripslashes($pagenavi_options['pages_text']); ?>" size="50" /><br />
115
- %CURRENT_PAGE% - <?php _e('The current page number.', 'wp-pagenavi'); ?><br />
116
- %TOTAL_PAGES% - <?php _e('The total number of pages.', 'wp-pagenavi'); ?>
117
- </td>
118
- </tr>
119
- <tr valign="top">
120
- <th align="left" width="30%"><?php _e('Text For Current Page', 'wp-pagenavi'); ?></th>
121
- <td align="left">
122
- <input type="text" name="pagenavi_current_text" value="<?php echo stripslashes(htmlspecialchars($pagenavi_options['current_text'])); ?>" size="30" /><br />
123
- %PAGE_NUMBER% - <?php _e('The page number.', 'wp-pagenavi'); ?><br />
124
- </td>
125
- </tr>
126
- <tr valign="top">
127
- <th align="left" width="30%"><?php _e('Text For Page', 'wp-pagenavi'); ?></th>
128
- <td align="left">
129
- <input type="text" name="pagenavi_page_text" value="<?php echo stripslashes(htmlspecialchars($pagenavi_options['page_text'])); ?>" size="30" /><br />
130
- %PAGE_NUMBER% - <?php _e('The page number.', 'wp-pagenavi'); ?><br />
131
- </td>
132
- </tr>
133
- <tr valign="top">
134
- <th align="left" width="30%"><?php _e('Text For First Post', 'wp-pagenavi'); ?></th>
135
- <td align="left">
136
- <input type="text" name="pagenavi_first_text" value="<?php echo stripslashes(htmlspecialchars($pagenavi_options['first_text'])); ?>" size="30" />
137
- </td>
138
- </tr>
139
- <tr valign="top">
140
- <th align="left" width="30%"><?php _e('Text For Last Post', 'wp-pagenavi'); ?></th>
141
- <td align="left">
142
- <input type="text" name="pagenavi_last_text" value="<?php echo stripslashes(htmlspecialchars($pagenavi_options['last_text'])); ?>" size="30" />
143
- </td>
144
- </tr>
145
- <tr valign="top">
146
- <th align="left" width="30%"><?php _e('Text For Next Post', 'wp-pagenavi'); ?></th>
147
- <td align="left">
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 valign="top">
152
- <th align="left" width="30%"><?php _e('Text For Previous Post', 'wp-pagenavi'); ?></th>
153
- <td align="left">
154
- <input type="text" name="pagenavi_prev_text" value="<?php echo stripslashes(htmlspecialchars($pagenavi_options['prev_text'])); ?>" size="30" />
155
- </td>
156
- </tr>
157
- <tr valign="top">
158
- <th align="left" width="30%"><?php _e('Text For Next ...', 'wp-pagenavi'); ?></th>
159
- <td align="left">
160
- <input type="text" name="pagenavi_dotright_text" value="<?php echo stripslashes(htmlspecialchars($pagenavi_options['dotright_text'])); ?>" size="30" />
161
- </td>
162
- </tr>
163
- <tr valign="top">
164
- <th align="left" width="30%"><?php _e('Text For Previous ...', 'wp-pagenavi'); ?></th>
165
- <td align="left">
166
- <input type="text" name="pagenavi_dotleft_text" value="<?php echo stripslashes(htmlspecialchars($pagenavi_options['dotright_text'])); ?>" size="30" />
167
- </td>
168
- </tr>
169
- </table>
170
- </fieldset>
171
- <fieldset class="options">
172
- <legend><?php _e('Page Navigation Options', 'wp-pagenavi'); ?></legend>
173
- <table width="100%" border="0" cellspacing="3" cellpadding="3">
174
- <tr valign="top">
175
- <th align="left" width="30%"><?php _e('Page Navigation Style', 'wp-pagenavi'); ?></th>
176
- <td align="left">
177
- <select name="pagenavi_style" size="1">
178
- <option value="1"<?php selected('1', $pagenavi_options['style']); ?>><?php _e('Normal', 'wp-pagenavi'); ?></option>
179
- <option value="2"<?php selected('2', $pagenavi_options['style']); ?>><?php _e('Drop Down List', 'wp-pagenavi'); ?></option>
180
- </select>
181
- </td>
182
- </tr>
183
- <tr valign="top">
184
- <th align="left" width="30%"><?php _e('Number Of Many Pages To Show?', 'wp-pagenavi'); ?></th>
185
- <td align="left">
186
- <input type="text" name="pagenavi_num_pages" value="<?php echo stripslashes($pagenavi_options['num_pages']); ?>" size="4" />
187
- </td>
188
- </tr>
189
- <tr valign="top">
190
- <th align="left" width="30%"><?php _e('Always Show Page Navigation?', 'wp-pagenavi'); ?></th>
191
- <td align="left">
192
- <select name="pagenavi_always_show" size="1">
193
- <option value="1"<?php selected('1', $pagenavi_options['always_show']); ?>><?php _e('Yes', 'wp-pagenavi'); ?></option>
194
- <option value="0"<?php selected('0', $pagenavi_options['always_show']); ?>><?php _e('No', 'wp-pagenavi'); ?></option>
195
- </select>
196
- </td>
197
- </tr>
198
- </table>
199
- </fieldset>
200
- <div align="center">
201
- <input type="submit" name="do" class="button" value="<?php _e('Update Options', 'wp-pagenavi'); ?>" />&nbsp;&nbsp;<input type="button" name="cancel" value="<?php _e('Cancel', 'wp-pagenavi'); ?>" class="button" onclick="javascript:history.go(-1)" />
202
- </div>
203
- </div>
204
- </form>
205
-
206
- <!-- Uninstall WP-PageNavi -->
207
- <form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
208
- <div class="wrap">
209
- <h2><?php _e('Uninstall WP-PageNavi', 'wp-pagenavi'); ?></h2>
210
- <p style="text-align: left;">
211
- <?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'); ?>
212
- </p>
213
- <p style="text-align: left; color: red">
214
- <strong><?php _e('WARNING:', 'wp-pagenavi'); ?></strong><br />
215
- <?php _e('Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first.', 'wp-pagenavi'); ?>
216
- </p>
217
- <p style="text-align: left; color: red">
218
- <strong><?php _e('The following WordPress Options will be DELETED:', 'wp-pagenavi'); ?></strong><br />
219
- </p>
220
- <table width="70%" border="0" cellspacing="3" cellpadding="3">
221
- <tr class="thead">
222
- <td align="center"><strong><?php _e('WordPress Options', 'wp-pagenavi'); ?></strong></td>
223
- </tr>
224
- <tr>
225
- <td valign="top" style="background-color: #eee;">
226
- <ol>
227
- <?php
228
- foreach($pagenavi_settings as $settings) {
229
- echo '<li>'.$settings.'</li>'."\n";
230
- }
231
- ?>
232
- </ol>
233
- </td>
234
- </tr>
235
- </table>
236
- <p>&nbsp;</p>
237
- <p style="text-align: center;">
238
- <input type="checkbox" name="uninstall_pagenavi_yes" value="yes" />&nbsp;<?php _e('Yes', 'wp-pagenavi'); ?><br /><br />
239
- <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'); ?>')" />
240
- </p>
241
- </div>
242
- </form>
243
- <?php
244
- } // End switch($mode)
245
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
pagenavi/wp-pagenavi.mo DELETED
Binary file
readme.html CHANGED
@@ -2,7 +2,7 @@
2
  <html>
3
  <head>
4
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
5
- <title>WP-PageNavi 2.20 Readme</title>
6
  <style type="text/css" media="screen">
7
  /* Default Style */
8
  BODY {
@@ -203,7 +203,7 @@
203
  <body>
204
  <div id="Container">
205
  <!-- Title -->
206
- <div id="Title">WP-PageNavi 2.20&nbsp;&nbsp;&nbsp;<span style="color: #aaaaaa;">Readme</span></div>
207
 
208
  <!-- Tabs -->
209
  <ul id="Tabs">
@@ -224,15 +224,6 @@
224
  <strong>Author:</strong><br />
225
  <strong>&raquo;</strong> Lester 'GaMerZ' Chan
226
  </p>
227
- <p>
228
- <strong>EMail:</strong><br />
229
- <strong>&raquo;</strong>
230
- <script type="text/javascript">
231
- /* <![CDATA[*/
232
- document.write(' <a href="mailto:gamerz84@hotmail.com?Subject=WP-PageNavi%202.20%20Support" title="EMail To gamerz84@hotmail.com">gamerz84@hotmail.com</a>');
233
- /* ]]> */
234
- </script>
235
- </p>
236
  <p>
237
  <strong>Website:</strong><br />
238
  <strong>&raquo;</strong> <a href="http://lesterchan.net/" title="http://lesterchan.net/">http://lesterchan.net/</a>
@@ -243,9 +234,9 @@
243
  </p>
244
  <p>
245
  <strong>Download:</strong><br />
246
- <strong>&raquo;</strong> <a href="http://lesterchan.net/others/downloads.php?id=11" title="http://lesterchan.net/others/downloads.php?id=11">WP-PageNavi 2.20 For WordPress 2.1.x And Above</a><br />
247
- <strong>&raquo;</strong> <a href="http://lesterchan.net/others/downloads/wp-pagenavi203.zip" title="http://lesterchan.net/others/downloads/wp-pagenavi203.zip">WP-PageNavi 2.03 For WordPress 2.0.x</a><br />
248
- <strong>&raquo;</strong> <a href="http://lesterchan.net/others/downloads/wp-pagenavi.zip" title="http://lesterchan.net/others/downloads/wp-pagenavi.zip">WP-PageNavi 1.00 For WordPress 1.5.2</a>
249
  </p>
250
  <p>
251
  <strong>Screenshots:</strong><br />
@@ -266,10 +257,6 @@
266
  <p><strong>Support Forums:</strong><br />
267
  <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>
268
  </p>
269
- <p>
270
- <strong>Updated:</strong><br />
271
- <strong>&raquo;</strong> 1st October 2007
272
- </p>
273
  <p>
274
  <strong>Note:</strong><br />
275
  <strong>&raquo;</strong> The <strong>Changelog</strong>, <strong>Installation</strong>, <strong>Upgrade</strong>, <strong>Usage</strong> Tab at the top of the page.
@@ -279,7 +266,7 @@
279
  <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
280
  <script type="text/javascript">
281
  /* <![CDATA[*/
282
- document.write(' <strong>gamerz84@hotmail.com</strong>.');
283
  /* ]]> */
284
  </script>
285
  </p>
@@ -289,6 +276,18 @@
289
  <div id="Changelog" style="display: none;">
290
  <div class="SubTitle">&raquo; Changelog</div>
291
  <ul>
 
 
 
 
 
 
 
 
 
 
 
 
292
  <li>
293
  <strong>Version 2.20 (01-10-2007)</strong>
294
  <ul>
@@ -301,7 +300,7 @@
301
  <ul>
302
  <li>NEW: Page Navigation Now Is Customizable Via <strong>'WP-Admin -> Options -> PageNavi'</strong> And pagenavi-css.css</li>
303
  <li>NEW: Default Style Navigation Is Now Boxed Navigation (Similar To <a href="http://www.digg.com/">Digg.com</a>)</li>
304
- <li>FIXED: Fix For Ultimate Tag Warrior By Oliver Kastler & Stephan (<a href="http://www.netconcepts.com">Netconcepts</a>)</li>
305
  </ul>
306
  </li>
307
  <li>
@@ -348,7 +347,7 @@
348
  </li>
349
  <li>
350
  Put:
351
- <blockquote>Folder: pagenavi</blockquote>
352
  </li>
353
  <li>
354
  <strong>Activate</strong> WP-PageNavi Plugin
@@ -362,7 +361,7 @@
362
  <!-- Upgrade Instructions -->
363
  <div id="Upgrade" style="display: none;">
364
  <div class="SubTitle">&raquo; Upgrade Instructions</div>
365
- <div class="SubSubTitle">From v1.0x To v2.20</div>
366
  <ol>
367
  <li>
368
  <strong>Deactivate</strong> WP-PageNavi Plugin
@@ -372,11 +371,13 @@
372
  </li>
373
  <li>
374
  Put/Overwrite:
375
- <blockquote>Folder: pagenavi</blockquote>
376
  </li>
377
  <li>
378
- Delete:
379
- <blockquote>File: pagenavi.php</blockquote>
 
 
380
  </li>
381
  <li>
382
  <strong>Activate</strong> WP-PageNavi Plugin
@@ -402,18 +403,28 @@
402
  </blockquote>
403
  </li>
404
  <li>
405
- Go to <strong>'WP-Admin -> Options -> PageNavi'</strong> to configure WP-PageNavi.
406
  </li>
407
  <li>
408
  If you need to configure the CSS style of WP-PageNavi, open and edit:
409
  <blockquote>
410
- /wp-content/plugins/pagenavi/pagenavi-css.css
411
  </blockquote>
412
  </li>
413
  </ol>
 
 
 
 
 
 
 
 
 
 
414
  </div>
415
  </div>
416
  </div>
417
- <p id="Copyright">WP-PageNavi 2.20<br />Copyright &copy; 2007 Lester 'GaMerZ' Chan. All Rights Reserved.</p>
418
  </body>
419
  </html>
2
  <html>
3
  <head>
4
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
5
+ <title>WP-PageNavi 2.30 Readme</title>
6
  <style type="text/css" media="screen">
7
  /* Default Style */
8
  BODY {
203
  <body>
204
  <div id="Container">
205
  <!-- Title -->
206
+ <div id="Title">WP-PageNavi 2.30&nbsp;&nbsp;&nbsp;<span style="color: #aaaaaa;">Readme</span></div>
207
 
208
  <!-- Tabs -->
209
  <ul id="Tabs">
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>
234
  </p>
235
  <p>
236
  <strong>Download:</strong><br />
237
+ <strong>&raquo;</strong> <a href="http://downloads.wordpress.org/plugin/wp-pagenavi.2.30.zip" title="http://downloads.wordpress.org/plugin/wp-pagenavi.2.30.zip">WP-PageNavi 2.30 For WordPress 2.1.x And Above</a><br />
238
+ <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 />
239
+ <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>
240
  </p>
241
  <p>
242
  <strong>Screenshots:</strong><br />
257
  <p><strong>Support Forums:</strong><br />
258
  <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>
259
  </p>
 
 
 
 
260
  <p>
261
  <strong>Note:</strong><br />
262
  <strong>&raquo;</strong> The <strong>Changelog</strong>, <strong>Installation</strong>, <strong>Upgrade</strong>, <strong>Usage</strong> Tab at the top of the page.
266
  <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
267
  <script type="text/javascript">
268
  /* <![CDATA[*/
269
+ document.write(' <strong>lesterchan@gmail.com</strong>.');
270
  /* ]]> */
271
  </script>
272
  </p>
276
  <div id="Changelog" style="display: none;">
277
  <div class="SubTitle">&raquo; Changelog</div>
278
  <ul>
279
+ <li>
280
+ <strong>Version 2.30 (01-06-2008)</strong>
281
+ <ul>
282
+ <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>
283
+ <li>NEW: Uses /wp-pagenavi/ Folder Instead Of /pagenavi/</li>
284
+ <li>NEW: Uses wp-pagenavi.php Instead Of pagenavi.php</li>
285
+ <li>NEW: Added "wp-pagenavi a:visited" Style In pagenavi-css.css</li>
286
+ <li>NEW: Added $before And $after Function Arguments To wp_pagenavi();</li>
287
+ <li>FIXED: Rearranged CSS Classes In pagenavi-css.css</li>
288
+ <li>FIXED: "First" Text Does Not Always Appear If Page 1 Is Not Shown</li>
289
+ </ul>
290
+ </li>
291
  <li>
292
  <strong>Version 2.20 (01-10-2007)</strong>
293
  <ul>
300
  <ul>
301
  <li>NEW: Page Navigation Now Is Customizable Via <strong>'WP-Admin -> Options -> PageNavi'</strong> And pagenavi-css.css</li>
302
  <li>NEW: Default Style Navigation Is Now Boxed Navigation (Similar To <a href="http://www.digg.com/">Digg.com</a>)</li>
303
+ <li>FIXED: Fix For Ultimate Tag Warrior By Oliver Kastler &amp; Stephan (<a href="http://www.netconcepts.com">Netconcepts</a>)</li>
304
  </ul>
305
  </li>
306
  <li>
347
  </li>
348
  <li>
349
  Put:
350
+ <blockquote>Folder: wp-pagenavi</blockquote>
351
  </li>
352
  <li>
353
  <strong>Activate</strong> WP-PageNavi Plugin
361
  <!-- Upgrade Instructions -->
362
  <div id="Upgrade" style="display: none;">
363
  <div class="SubTitle">&raquo; Upgrade Instructions</div>
364
+ <div class="SubSubTitle">From v2.0x To v2.30</div>
365
  <ol>
366
  <li>
367
  <strong>Deactivate</strong> WP-PageNavi Plugin
371
  </li>
372
  <li>
373
  Put/Overwrite:
374
+ <blockquote>Folder: wp-pagenavi</blockquote>
375
  </li>
376
  <li>
377
+ Delete this folder if exists:
378
+ <blockquote>
379
+ Folder: pagenavi
380
+ </blockquote>
381
  </li>
382
  <li>
383
  <strong>Activate</strong> WP-PageNavi Plugin
403
  </blockquote>
404
  </li>
405
  <li>
406
+ Go to <strong>'WP-Admin -> Settings -> PageNavi'</strong> to configure WP-PageNavi.
407
  </li>
408
  <li>
409
  If you need to configure the CSS style of WP-PageNavi, open and edit:
410
  <blockquote>
411
+ /wp-content/plugins/wp-pagenavi/pagenavi-css.css
412
  </blockquote>
413
  </li>
414
  </ol>
415
+ <div class="SubSubTitle">Note</div>
416
+ <ul>
417
+ <li>
418
+ WP-PageNavi will load '<strong>pagenavi-css.css</strong>' from your theme's directory if it exists.
419
+ <ul>
420
+ <li>If it doesn't exists, it will just load the default 'pagenavi-css.css' that comes with WP-PageNavi.</li>
421
+ <li>This will allow you to upgrade WP-PageNavi without worrying about overwriting your page navigation styles that you have created.</li>
422
+ </ul>
423
+ </li>
424
+ </ul>
425
  </div>
426
  </div>
427
  </div>
428
+ <p id="Copyright">WP-PageNavi 2.30<br />Copyright &copy; 2008 Lester 'GaMerZ' Chan. All Rights Reserved.</p>
429
  </body>
430
  </html>
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: GamerZ
3
  Donate link: http://lesterchan.net/wordpress
4
  Tags: pagenavi, navi, navigation, wp-pagenavi, page
5
- Requires at least: 2.1.0
6
- Stable tag: 2.20
7
 
8
  Adds a more advanced paging navigation your WordPress blog.
9
 
2
  Contributors: GamerZ
3
  Donate link: http://lesterchan.net/wordpress
4
  Tags: pagenavi, navi, navigation, wp-pagenavi, page
5
+ Requires at least: 2.5.0
6
+ Stable tag: 2.30
7
 
8
  Adds a more advanced paging navigation your WordPress blog.
9
 
wp-pagenavi.mo ADDED
Binary file
pagenavi/pagenavi.php → wp-pagenavi.php RENAMED
@@ -1,16 +1,16 @@
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.20
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: http://lesterchan.net
9
  */
10
 
11
 
12
  /*
13
- Copyright 2007 Lester Chan (email : gamerz84@hotmail.com)
14
 
15
  This program is free software; you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ Author URI: http://lesterchan.net
31
  ### Create Text Domain For Translations
32
  add_action('init', 'pagenavi_textdomain');
33
  function pagenavi_textdomain() {
34
- load_plugin_textdomain('wp-pagenavi', 'wp-content/plugins/pagenavi');
35
  }
36
 
37
 
@@ -39,7 +39,7 @@ function pagenavi_textdomain() {
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', 'pagenavi/pagenavi-options.php') ;
43
  }
44
  }
45
 
@@ -47,14 +47,18 @@ function pagenavi_menu() {
47
  ### Function: Page Navigation CSS
48
  add_action('wp_head', 'pagenavi_css');
49
  function pagenavi_css() {
50
- echo "\n".'<!-- Start Of Script Generated By WP-PageNavi 2.20 -->'."\n";
51
- echo '<link rel="stylesheet" href="'.get_option('siteurl').'/wp-content/plugins/pagenavi/pagenavi-css.css" type="text/css" media="screen" />'."\n";
52
- echo '<!-- End Of Script Generated By WP-PageNavi 2.20 -->'."\n";
 
 
 
 
53
  }
54
 
55
 
56
  ### Function: Page Navigation: Boxed Style Paging
57
- function wp_pagenavi() {
58
  global $wpdb, $wp_query;
59
  if (!is_single()) {
60
  $request = $wp_query->request;
@@ -102,12 +106,15 @@ function wp_pagenavi() {
102
  if($max_page > 1 || intval($pagenavi_options['always_show']) == 1) {
103
  $pages_text = str_replace("%CURRENT_PAGE%", $paged, $pagenavi_options['pages_text']);
104
  $pages_text = str_replace("%TOTAL_PAGES%", $max_page, $pages_text);
105
- echo '<div class="wp-pagenavi">'."\n";
106
  switch(intval($pagenavi_options['style'])) {
107
  case 1:
108
- echo '<span class="pages">'.$pages_text.'</span>';
109
- if ($paged >= $pages_to_show_minus_1 && $pages_to_show < $max_page) {
110
- echo '<a href="'.get_pagenum_link().'" title="'.$pagenavi_options['first_text'].'">'.$pagenavi_options['first_text'].'</a>';
 
 
 
111
  if(!empty($pagenavi_options['dotleft_text'])) {
112
  echo '<span class="extend">'.$pagenavi_options['dotleft_text'].'</span>';
113
  }
@@ -119,7 +126,7 @@ function wp_pagenavi() {
119
  echo '<span class="current">'.$current_page_text.'</span>';
120
  } else {
121
  $page_text = str_replace("%PAGE_NUMBER%", $i, $pagenavi_options['page_text']);
122
- echo '<a href="'.get_pagenum_link($i).'" title="'.$page_text.'">'.$page_text.'</a>';
123
  }
124
  }
125
  next_posts_link($pagenavi_options['next_text'], $max_page);
@@ -127,7 +134,8 @@ function wp_pagenavi() {
127
  if(!empty($pagenavi_options['dotright_text'])) {
128
  echo '<span class="extend">'.$pagenavi_options['dotright_text'].'</span>';
129
  }
130
- echo '<a href="'.get_pagenum_link($max_page).'" title="'.$pagenavi_options['last_text'].'">'.$pagenavi_options['last_text'].'</a>';
 
131
  }
132
  break;
133
  case 2;
@@ -140,17 +148,17 @@ function wp_pagenavi() {
140
  }
141
  if($i == $paged) {
142
  $current_page_text = str_replace("%PAGE_NUMBER%", $i, $pagenavi_options['current_text']);
143
- echo '<option value="'.get_pagenum_link($page_num).'" selected="selected" class="current">'.$current_page_text."</option>\n";
144
  } else {
145
  $page_text = str_replace("%PAGE_NUMBER%", $i, $pagenavi_options['page_text']);
146
- echo '<option value="'.get_pagenum_link($page_num).'">'.$page_text."</option>\n";
147
  }
148
  }
149
  echo "</select>\n";
150
  echo "</form>\n";
151
  break;
152
  }
153
- echo '</div>'."\n";
154
  }
155
  }
156
  }
@@ -163,7 +171,7 @@ function wp_pagenavi_dropdown() {
163
 
164
 
165
  ### Function: Page Navigation Options
166
- add_action('activate_pagenavi/pagenavi.php', 'pagenavi_init');
167
  function pagenavi_init() {
168
  // Add Options
169
  $pagenavi_options = array();
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.30
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: http://lesterchan.net
9
  */
10
 
11
 
12
  /*
13
+ Copyright 2008 Lester Chan (email : lesterchan@gmail.com)
14
 
15
  This program is free software; you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License as published by
31
  ### Create Text Domain For Translations
32
  add_action('init', 'pagenavi_textdomain');
33
  function pagenavi_textdomain() {
34
+ load_plugin_textdomain('wp-pagenavi', 'wp-content/plugins/wp-pagenavi');
35
  }
36
 
37
 
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
 
47
  ### Function: Page Navigation CSS
48
  add_action('wp_head', 'pagenavi_css');
49
  function pagenavi_css() {
50
+ echo "\n".'<!-- Start Of Script Generated By WP-PageNavi 2.30 -->'."\n";
51
+ if(@file_exists(TEMPLATEPATH.'/pagenavi-css.css')) {
52
+ echo '<link rel="stylesheet" href="'.get_stylesheet_directory_uri().'/pagenavi-css.css" type="text/css" media="screen" />'."\n";
53
+ } else {
54
+ echo '<link rel="stylesheet" href="'.get_option('siteurl').'/wp-content/plugins/wp-pagenavi/pagenavi-css.css" type="text/css" media="screen" />'."\n";
55
+ }
56
+ echo '<!-- End Of Script Generated By WP-PageNavi 2.30 -->'."\n";
57
  }
58
 
59
 
60
  ### Function: Page Navigation: Boxed Style Paging
61
+ function wp_pagenavi($before = '', $after = '') {
62
  global $wpdb, $wp_query;
63
  if (!is_single()) {
64
  $request = $wp_query->request;
106
  if($max_page > 1 || intval($pagenavi_options['always_show']) == 1) {
107
  $pages_text = str_replace("%CURRENT_PAGE%", $paged, $pagenavi_options['pages_text']);
108
  $pages_text = str_replace("%TOTAL_PAGES%", $max_page, $pages_text);
109
+ echo $before.'<div class="wp-pagenavi">'."\n";
110
  switch(intval($pagenavi_options['style'])) {
111
  case 1:
112
+ if(!empty($pages_text)) {
113
+ echo '<span class="pages">'.$pages_text.'</span>';
114
+ }
115
+ if ($start_page >= 2 && $pages_to_show < $max_page) {
116
+ $first_page_text = str_replace("%TOTAL_PAGES%", $max_page, $pagenavi_options['first_text']);
117
+ echo '<a href="'.clean_url(get_pagenum_link()).'" title="'.$first_page_text.'">'.$first_page_text.'</a>';
118
  if(!empty($pagenavi_options['dotleft_text'])) {
119
  echo '<span class="extend">'.$pagenavi_options['dotleft_text'].'</span>';
120
  }
126
  echo '<span class="current">'.$current_page_text.'</span>';
127
  } else {
128
  $page_text = str_replace("%PAGE_NUMBER%", $i, $pagenavi_options['page_text']);
129
+ echo '<a href="'.clean_url(get_pagenum_link($i)).'" title="'.$page_text.'">'.$page_text.'</a>';
130
  }
131
  }
132
  next_posts_link($pagenavi_options['next_text'], $max_page);
134
  if(!empty($pagenavi_options['dotright_text'])) {
135
  echo '<span class="extend">'.$pagenavi_options['dotright_text'].'</span>';
136
  }
137
+ $last_page_text = str_replace("%TOTAL_PAGES%", $max_page, $pagenavi_options['last_text']);
138
+ echo '<a href="'.clean_url(get_pagenum_link($max_page)).'" title="'.$last_page_text.'">'.$last_page_text.'</a>';
139
  }
140
  break;
141
  case 2;
148
  }
149
  if($i == $paged) {
150
  $current_page_text = str_replace("%PAGE_NUMBER%", $i, $pagenavi_options['current_text']);
151
+ echo '<option value="'.clean_url(get_pagenum_link($page_num)).'" selected="selected" class="current">'.$current_page_text."</option>\n";
152
  } else {
153
  $page_text = str_replace("%PAGE_NUMBER%", $i, $pagenavi_options['page_text']);
154
+ echo '<option value="'.clean_url(get_pagenum_link($page_num)).'">'.$page_text."</option>\n";
155
  }
156
  }
157
  echo "</select>\n";
158
  echo "</form>\n";
159
  break;
160
  }
161
+ echo '</div>'.$after."\n";
162
  }
163
  }
164
  }
171
 
172
 
173
  ### Function: Page Navigation Options
174
+ add_action('activate_wp-pagenavi/wp-pagenavi.php', 'pagenavi_init');
175
  function pagenavi_init() {
176
  // Add Options
177
  $pagenavi_options = array();
pagenavi/wp-pagenavi.pot → wp-pagenavi.pot RENAMED
@@ -1,12 +1,13 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: WP-PageNavi 2.20\n"
4
- "POT-Creation-Date: \n"
5
- "PO-Revision-Date: 2007-09-30 16:05+0800\n"
6
- "Last-Translator: Lester 'GaMerZ' Chan <gamerz84@hotmail.com>\n"
7
- "Language-Team: Lester Chan <gamerz84@hotmail.com>\n"
 
8
  "MIME-Version: 1.0\n"
9
- "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
  "X-Poedit-Language: English\n"
12
  "X-Poedit-Country: SINGAPORE\n"
@@ -14,27 +15,22 @@ msgstr ""
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-SearchPath-0: .\n"
16
 
17
- #: pagenavi-options.php:31
18
- #: pagenavi-options.php:201
19
- msgid "Update Options"
20
- msgstr ""
21
-
22
- #: pagenavi-options.php:48
23
  #: pagenavi-options.php:107
24
- #: pagenavi-options.php:172
25
  msgid "Page Navigation Options"
26
  msgstr ""
27
 
28
- #: pagenavi-options.php:53
29
  msgid "Updated"
30
  msgstr ""
31
 
32
- #: pagenavi-options.php:58
33
  msgid "No Page Navigation Option Updated"
34
  msgstr ""
35
 
36
  #: pagenavi-options.php:62
37
- #: pagenavi-options.php:239
38
  msgid "UNINSTALL WP-PageNavi"
39
  msgstr ""
40
 
@@ -49,7 +45,7 @@ msgid "Error deleting Setting Key '%s'."
49
  msgstr ""
50
 
51
  #: pagenavi-options.php:96
52
- #: pagenavi-options.php:209
53
  msgid "Uninstall WP-PageNavi"
54
  msgstr ""
55
 
@@ -58,36 +54,38 @@ msgstr ""
58
  msgid "<a href=\"%s\">Click Here</a> To Finish The Uninstallation And WP-PageNavi Will Be Deactivated Automatically."
59
  msgstr ""
60
 
61
- #: pagenavi-options.php:109
62
  msgid "Page Navigation Text"
63
  msgstr ""
64
 
65
- #: pagenavi-options.php:112
66
  msgid "Text For Number Of Pages"
67
  msgstr ""
68
 
69
- #: pagenavi-options.php:115
70
  msgid "The current page number."
71
  msgstr ""
72
 
73
- #: pagenavi-options.php:116
 
 
74
  msgid "The total number of pages."
75
  msgstr ""
76
 
77
- #: pagenavi-options.php:120
78
  msgid "Text For Current Page"
79
  msgstr ""
80
 
81
- #: pagenavi-options.php:123
82
- #: pagenavi-options.php:130
83
  msgid "The page number."
84
  msgstr ""
85
 
86
- #: pagenavi-options.php:127
87
  msgid "Text For Page"
88
  msgstr ""
89
 
90
- #: pagenavi-options.php:134
91
  msgid "Text For First Post"
92
  msgstr ""
93
 
@@ -95,68 +93,68 @@ msgstr ""
95
  msgid "Text For Last Post"
96
  msgstr ""
97
 
98
- #: pagenavi-options.php:146
99
  msgid "Text For Next Post"
100
  msgstr ""
101
 
102
- #: pagenavi-options.php:152
103
  msgid "Text For Previous Post"
104
  msgstr ""
105
 
106
- #: pagenavi-options.php:158
107
  msgid "Text For Next ..."
108
  msgstr ""
109
 
110
- #: pagenavi-options.php:164
111
  msgid "Text For Previous ..."
112
  msgstr ""
113
 
114
- #: pagenavi-options.php:175
115
  msgid "Page Navigation Style"
116
  msgstr ""
117
 
118
- #: pagenavi-options.php:178
119
  msgid "Normal"
120
  msgstr ""
121
 
122
- #: pagenavi-options.php:179
123
  msgid "Drop Down List"
124
  msgstr ""
125
 
126
- #: pagenavi-options.php:184
127
- msgid "Number Of Many Pages To Show?"
128
  msgstr ""
129
 
130
- #: pagenavi-options.php:190
131
  msgid "Always Show Page Navigation?"
132
  msgstr ""
133
 
134
- #: pagenavi-options.php:193
135
- #: pagenavi-options.php:238
136
  msgid "Yes"
137
  msgstr ""
138
 
139
- #: pagenavi-options.php:194
140
  msgid "No"
141
  msgstr ""
142
 
143
- #: pagenavi-options.php:201
144
- msgid "Cancel"
145
  msgstr ""
146
 
147
- #: pagenavi-options.php:211
148
  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."
149
  msgstr ""
150
 
151
- #: pagenavi-options.php:214
152
  msgid "WARNING:"
153
  msgstr ""
154
 
155
- #: pagenavi-options.php:215
156
  msgid "Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first."
157
  msgstr ""
158
 
159
- #: pagenavi-options.php:218
160
  msgid "The following WordPress Options will be DELETED:"
161
  msgstr ""
162
 
@@ -164,7 +162,7 @@ msgstr ""
164
  msgid "WordPress Options"
165
  msgstr ""
166
 
167
- #: pagenavi-options.php:239
168
  msgid ""
169
  "You Are About To Uninstall WP-PageNavi From WordPress.\\n"
170
  "This Action Is Not Reversible.\\n"
@@ -172,32 +170,32 @@ msgid ""
172
  " Choose [Cancel] To Stop, [OK] To Uninstall."
173
  msgstr ""
174
 
175
- #: pagenavi.php:42
176
  msgid "PageNavi"
177
  msgstr ""
178
 
179
- #: pagenavi.php:170
180
  msgid "Page %CURRENT_PAGE% of %TOTAL_PAGES%"
181
  msgstr ""
182
 
183
- #: pagenavi.php:173
184
  msgid "&laquo; First"
185
  msgstr ""
186
 
187
- #: pagenavi.php:174
188
  msgid "Last &raquo;"
189
  msgstr ""
190
 
191
- #: pagenavi.php:175
192
  msgid "&raquo;"
193
  msgstr ""
194
 
195
- #: pagenavi.php:176
196
  msgid "&laquo;"
197
  msgstr ""
198
 
199
- #: pagenavi.php:177
200
- #: pagenavi.php:178
201
  msgid "..."
202
  msgstr ""
203
 
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: WP-PageNavi 2.30\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2008-05-13 01:18+0800\n"
6
+ "PO-Revision-Date: 2008-05-13 01:18+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"
15
  "X-Poedit-Basepath: .\n"
16
  "X-Poedit-SearchPath-0: .\n"
17
 
18
+ #: pagenavi-options.php:46
 
 
 
 
 
19
  #: pagenavi-options.php:107
20
+ #: pagenavi-options.php:171
21
  msgid "Page Navigation Options"
22
  msgstr ""
23
 
24
+ #: pagenavi-options.php:51
25
  msgid "Updated"
26
  msgstr ""
27
 
28
+ #: pagenavi-options.php:56
29
  msgid "No Page Navigation Option Updated"
30
  msgstr ""
31
 
32
  #: pagenavi-options.php:62
33
+ #: pagenavi-options.php:240
34
  msgid "UNINSTALL WP-PageNavi"
35
  msgstr ""
36
 
45
  msgstr ""
46
 
47
  #: pagenavi-options.php:96
48
+ #: pagenavi-options.php:208
49
  msgid "Uninstall WP-PageNavi"
50
  msgstr ""
51
 
54
  msgid "<a href=\"%s\">Click Here</a> To Finish The Uninstallation And WP-PageNavi Will Be Deactivated Automatically."
55
  msgstr ""
56
 
57
+ #: pagenavi-options.php:108
58
  msgid "Page Navigation Text"
59
  msgstr ""
60
 
61
+ #: pagenavi-options.php:111
62
  msgid "Text For Number Of Pages"
63
  msgstr ""
64
 
65
+ #: pagenavi-options.php:114
66
  msgid "The current page number."
67
  msgstr ""
68
 
69
+ #: pagenavi-options.php:115
70
+ #: pagenavi-options.php:136
71
+ #: pagenavi-options.php:143
72
  msgid "The total number of pages."
73
  msgstr ""
74
 
75
+ #: pagenavi-options.php:119
76
  msgid "Text For Current Page"
77
  msgstr ""
78
 
79
+ #: pagenavi-options.php:122
80
+ #: pagenavi-options.php:129
81
  msgid "The page number."
82
  msgstr ""
83
 
84
+ #: pagenavi-options.php:126
85
  msgid "Text For Page"
86
  msgstr ""
87
 
88
+ #: pagenavi-options.php:133
89
  msgid "Text For First Post"
90
  msgstr ""
91
 
93
  msgid "Text For Last Post"
94
  msgstr ""
95
 
96
+ #: pagenavi-options.php:147
97
  msgid "Text For Next Post"
98
  msgstr ""
99
 
100
+ #: pagenavi-options.php:153
101
  msgid "Text For Previous Post"
102
  msgstr ""
103
 
104
+ #: pagenavi-options.php:159
105
  msgid "Text For Next ..."
106
  msgstr ""
107
 
108
+ #: pagenavi-options.php:165
109
  msgid "Text For Previous ..."
110
  msgstr ""
111
 
112
+ #: pagenavi-options.php:174
113
  msgid "Page Navigation Style"
114
  msgstr ""
115
 
116
+ #: pagenavi-options.php:177
117
  msgid "Normal"
118
  msgstr ""
119
 
120
+ #: pagenavi-options.php:178
121
  msgid "Drop Down List"
122
  msgstr ""
123
 
124
+ #: pagenavi-options.php:183
125
+ msgid "Number Of Pages To Show?"
126
  msgstr ""
127
 
128
+ #: pagenavi-options.php:189
129
  msgid "Always Show Page Navigation?"
130
  msgstr ""
131
 
132
+ #: pagenavi-options.php:192
133
+ #: pagenavi-options.php:239
134
  msgid "Yes"
135
  msgstr ""
136
 
137
+ #: pagenavi-options.php:193
138
  msgid "No"
139
  msgstr ""
140
 
141
+ #: pagenavi-options.php:199
142
+ msgid "Save Changes"
143
  msgstr ""
144
 
145
+ #: pagenavi-options.php:210
146
  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."
147
  msgstr ""
148
 
149
+ #: pagenavi-options.php:213
150
  msgid "WARNING:"
151
  msgstr ""
152
 
153
+ #: pagenavi-options.php:214
154
  msgid "Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first."
155
  msgstr ""
156
 
157
+ #: pagenavi-options.php:217
158
  msgid "The following WordPress Options will be DELETED:"
159
  msgstr ""
160
 
162
  msgid "WordPress Options"
163
  msgstr ""
164
 
165
+ #: pagenavi-options.php:240
166
  msgid ""
167
  "You Are About To Uninstall WP-PageNavi From WordPress.\\n"
168
  "This Action Is Not Reversible.\\n"
170
  " Choose [Cancel] To Stop, [OK] To Uninstall."
171
  msgstr ""
172
 
173
+ #: wp-pagenavi.php:42
174
  msgid "PageNavi"
175
  msgstr ""
176
 
177
+ #: wp-pagenavi.php:178
178
  msgid "Page %CURRENT_PAGE% of %TOTAL_PAGES%"
179
  msgstr ""
180
 
181
+ #: wp-pagenavi.php:181
182
  msgid "&laquo; First"
183
  msgstr ""
184
 
185
+ #: wp-pagenavi.php:182
186
  msgid "Last &raquo;"
187
  msgstr ""
188
 
189
+ #: wp-pagenavi.php:183
190
  msgid "&raquo;"
191
  msgstr ""
192
 
193
+ #: wp-pagenavi.php:184
194
  msgid "&laquo;"
195
  msgstr ""
196
 
197
+ #: wp-pagenavi.php:185
198
+ #: wp-pagenavi.php:186
199
  msgid "..."
200
  msgstr ""
201