WP-Paginate - Version 1.2

Version Description

  • Added RTL language support
  • Fixed comments pagination bug
  • Changed language domain name from wp_paginate to wp-paginate (this will affect translation file names)
Download this release

Release Info

Developer emartin24
Plugin Icon 128x128 WP-Paginate
Version 1.2
Comparing to
See all releases

Code changes from version 1.1.2 to 1.2

Files changed (5) hide show
  1. I18n/wp-paginate.pot +59 -39
  2. readme.txt +12 -5
  3. wp-paginate-rtl.css +9 -0
  4. wp-paginate.css +2 -2
  5. wp-paginate.php +17 -19
I18n/wp-paginate.pot CHANGED
@@ -6,164 +6,184 @@
6
  #, fuzzy
7
  msgid ""
8
  msgstr ""
9
- "Project-Id-Version: WP-Paginate 1.1.2\n"
10
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-paginate\n"
11
- "POT-Creation-Date: 2010-03-27 16:13+0000\n"
12
  "PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
13
- "Last-Translator: FULL NAME \n"
14
- "Language-Team: LANGUAGE \n"
15
  "MIME-Version: 1.0\n"
16
  "Content-Type: text/plain; charset=utf-8\n"
17
  "Content-Transfer-Encoding: 8bit\n"
18
 
19
- #: wp-paginate.php:269
20
  msgid "Settings"
21
  msgstr ""
22
 
23
- #: wp-paginate.php:294
24
  msgid "Success! Your changes were successfully saved!"
25
  msgstr ""
26
 
27
- #: wp-paginate.php:297
28
  msgid "Whoops! There was a problem with the data you posted. Please try again."
29
  msgstr ""
30
 
31
- #: wp-paginate.php:309
32
  msgid "Pagination Label:"
33
  msgstr ""
34
 
35
- #: wp-paginate.php:311
36
  msgid "The text/HTML to display before the list of pages."
37
  msgstr ""
38
 
39
- #: wp-paginate.php:314
40
  msgid "Previous Page:"
41
  msgstr ""
42
 
43
- #: wp-paginate.php:316
44
  msgid "The text/HTML to display for the previous page link."
45
  msgstr ""
46
 
47
- #: wp-paginate.php:319
48
  msgid "Next Page:"
49
  msgstr ""
50
 
51
- #: wp-paginate.php:321
52
  msgid "The text/HTML to display for the next page link."
53
  msgstr ""
54
 
55
- #: wp-paginate.php:325
56
  msgid "Advanced Settings"
57
  msgstr ""
58
 
59
- #: wp-paginate.php:328
60
  msgid "Before Markup:"
61
  msgstr ""
62
 
63
- #: wp-paginate.php:330
64
  msgid "The HTML markup to display before the pagination code."
65
  msgstr ""
66
 
67
- #: wp-paginate.php:333
68
  msgid "After Markup:"
69
  msgstr ""
70
 
71
- #: wp-paginate.php:335
72
  msgid "The HTML markup to display after the pagination code."
73
  msgstr ""
74
 
75
- #: wp-paginate.php:338
76
  msgid "Markup Display:"
77
  msgstr ""
78
 
79
- #: wp-paginate.php:340
80
  msgid "Show Before Markup and After Markup, even if the page list is empty?"
81
  msgstr ""
82
 
83
- #: wp-paginate.php:343
84
  msgid "WP-Paginate CSS File:"
85
  msgstr ""
86
 
87
- #: wp-paginate.php:345
88
- msgid "Include the default stylesheet wp-paginate.css?"
 
 
 
 
89
  msgstr ""
90
 
91
- #: wp-paginate.php:348
92
  msgid "Page Range:"
93
  msgstr ""
94
 
95
- #: wp-paginate.php:355
96
  msgid ""
97
  "The number of page links to show before and after the current page. "
98
  "Recommended value: 3"
99
  msgstr ""
100
 
101
- #: wp-paginate.php:358
102
  msgid "Page Anchors:"
103
  msgstr ""
104
 
105
- #: wp-paginate.php:365
106
  msgid ""
107
  "The number of links to always show at beginning and end of pagination. "
108
  "Recommended value: 1"
109
  msgstr ""
110
 
111
- #: wp-paginate.php:368
112
  msgid "Page Gap:"
113
  msgstr ""
114
 
115
- #: wp-paginate.php:375
116
  msgid ""
117
  "The minimum number of pages in a gap before an ellipsis (...) is added. "
118
  "Recommended value: 3"
119
  msgstr ""
120
 
121
- #: wp-paginate.php:382
122
  msgid "Need Support?"
123
  msgstr ""
124
 
125
- #: wp-paginate.php:383
126
  #, php-format
127
  msgid ""
128
  "For questions, issues or feature requests, please post them in the %s and "
129
  "make sure to tag the post with wp-paginate."
130
  msgstr ""
131
 
132
- #: wp-paginate.php:384
133
  msgid "Like To Contribute?"
134
  msgstr ""
135
 
136
- #: wp-paginate.php:385
137
  msgid ""
138
  "If you would like to contribute, the following is a list of ways you can "
139
  "help:"
140
  msgstr ""
141
 
142
- #: wp-paginate.php:387
143
  msgid "Translate WP-Paginate into your language"
144
  msgstr ""
145
 
146
- #: wp-paginate.php:388
147
  msgid "Blog about or link to WP-Paginate so others can find out about it"
148
  msgstr ""
149
 
150
- #: wp-paginate.php:389
151
  msgid "Report issues, provide feedback, request features, etc."
152
  msgstr ""
153
 
154
- #: wp-paginate.php:390
155
  msgid "Rate WP-Paginate on the WordPress Plugins Page"
156
  msgstr ""
157
 
158
- #: wp-paginate.php:391
159
  msgid "Make a donation"
160
  msgstr ""
161
 
162
- #: wp-paginate.php:393
163
  msgid "Other Links"
164
  msgstr ""
165
 
 
 
 
 
 
 
 
 
166
  #. Description of the plugin/theme
167
  msgid ""
168
  "A simple and flexible pagination plugin for WordPress posts and comments."
169
  msgstr ""
 
 
 
 
 
 
 
 
6
  #, fuzzy
7
  msgid ""
8
  msgstr ""
9
+ "Project-Id-Version: WP-Paginate 1.2\n"
10
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-paginate\n"
11
+ "POT-Creation-Date: 2010-09-28 21:23+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
+ #: wp-paginate.php:267
20
  msgid "Settings"
21
  msgstr ""
22
 
23
+ #: wp-paginate.php:292
24
  msgid "Success! Your changes were successfully saved!"
25
  msgstr ""
26
 
27
+ #: wp-paginate.php:295
28
  msgid "Whoops! There was a problem with the data you posted. Please try again."
29
  msgstr ""
30
 
31
+ #: wp-paginate.php:307
32
  msgid "Pagination Label:"
33
  msgstr ""
34
 
35
+ #: wp-paginate.php:309
36
  msgid "The text/HTML to display before the list of pages."
37
  msgstr ""
38
 
39
+ #: wp-paginate.php:312
40
  msgid "Previous Page:"
41
  msgstr ""
42
 
43
+ #: wp-paginate.php:314
44
  msgid "The text/HTML to display for the previous page link."
45
  msgstr ""
46
 
47
+ #: wp-paginate.php:317
48
  msgid "Next Page:"
49
  msgstr ""
50
 
51
+ #: wp-paginate.php:319
52
  msgid "The text/HTML to display for the next page link."
53
  msgstr ""
54
 
55
+ #: wp-paginate.php:323
56
  msgid "Advanced Settings"
57
  msgstr ""
58
 
59
+ #: wp-paginate.php:326
60
  msgid "Before Markup:"
61
  msgstr ""
62
 
63
+ #: wp-paginate.php:328
64
  msgid "The HTML markup to display before the pagination code."
65
  msgstr ""
66
 
67
+ #: wp-paginate.php:331
68
  msgid "After Markup:"
69
  msgstr ""
70
 
71
+ #: wp-paginate.php:333
72
  msgid "The HTML markup to display after the pagination code."
73
  msgstr ""
74
 
75
+ #: wp-paginate.php:336
76
  msgid "Markup Display:"
77
  msgstr ""
78
 
79
+ #: wp-paginate.php:338
80
  msgid "Show Before Markup and After Markup, even if the page list is empty?"
81
  msgstr ""
82
 
83
+ #: wp-paginate.php:341
84
  msgid "WP-Paginate CSS File:"
85
  msgstr ""
86
 
87
+ #: wp-paginate.php:343
88
+ #, php-format
89
+ msgid ""
90
+ "Include the default stylesheet wp-paginate.css? WP-Paginate will first look "
91
+ "for <code>wp-paginate.css</code> in your theme directory (<code>themes/%s</"
92
+ "code>)."
93
  msgstr ""
94
 
95
+ #: wp-paginate.php:346
96
  msgid "Page Range:"
97
  msgstr ""
98
 
99
+ #: wp-paginate.php:353
100
  msgid ""
101
  "The number of page links to show before and after the current page. "
102
  "Recommended value: 3"
103
  msgstr ""
104
 
105
+ #: wp-paginate.php:356
106
  msgid "Page Anchors:"
107
  msgstr ""
108
 
109
+ #: wp-paginate.php:363
110
  msgid ""
111
  "The number of links to always show at beginning and end of pagination. "
112
  "Recommended value: 1"
113
  msgstr ""
114
 
115
+ #: wp-paginate.php:366
116
  msgid "Page Gap:"
117
  msgstr ""
118
 
119
+ #: wp-paginate.php:373
120
  msgid ""
121
  "The minimum number of pages in a gap before an ellipsis (...) is added. "
122
  "Recommended value: 3"
123
  msgstr ""
124
 
125
+ #: wp-paginate.php:380
126
  msgid "Need Support?"
127
  msgstr ""
128
 
129
+ #: wp-paginate.php:381
130
  #, php-format
131
  msgid ""
132
  "For questions, issues or feature requests, please post them in the %s and "
133
  "make sure to tag the post with wp-paginate."
134
  msgstr ""
135
 
136
+ #: wp-paginate.php:382
137
  msgid "Like To Contribute?"
138
  msgstr ""
139
 
140
+ #: wp-paginate.php:383
141
  msgid ""
142
  "If you would like to contribute, the following is a list of ways you can "
143
  "help:"
144
  msgstr ""
145
 
146
+ #: wp-paginate.php:385
147
  msgid "Translate WP-Paginate into your language"
148
  msgstr ""
149
 
150
+ #: wp-paginate.php:386
151
  msgid "Blog about or link to WP-Paginate so others can find out about it"
152
  msgstr ""
153
 
154
+ #: wp-paginate.php:387
155
  msgid "Report issues, provide feedback, request features, etc."
156
  msgstr ""
157
 
158
+ #: wp-paginate.php:388
159
  msgid "Rate WP-Paginate on the WordPress Plugins Page"
160
  msgstr ""
161
 
162
+ #: wp-paginate.php:389
163
  msgid "Make a donation"
164
  msgstr ""
165
 
166
+ #: wp-paginate.php:391
167
  msgid "Other Links"
168
  msgstr ""
169
 
170
+ #. Plugin Name of the plugin/theme
171
+ msgid "WP-Paginate"
172
+ msgstr ""
173
+
174
+ #. Plugin URI of the plugin/theme
175
+ msgid "http://www.ericmmartin.com/projects/wp-paginate/"
176
+ msgstr ""
177
+
178
  #. Description of the plugin/theme
179
  msgid ""
180
  "A simple and flexible pagination plugin for WordPress posts and comments."
181
  msgstr ""
182
+
183
+ #. Author of the plugin/theme
184
+ msgid "Eric Martin"
185
+ msgstr ""
186
+
187
+ #. Author URI of the plugin/theme
188
+ msgid "http://www.ericmmartin.com"
189
+ msgstr ""
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === WP-Paginate ===
2
  Contributors: emartin24
3
  Donate link: http://www.ericmmartin.com/donate/
4
- Tags: paginate, pagination, navigation, page, wp-paginate, comments
5
  Requires at least: 2.2.0 (2.7.0 for comments pagination)
6
- Tested up to: 2.9.2
7
- Stable tag: 1.1.2
8
 
9
  WP-Paginate is a simple and flexible pagination plugin which provides users with better navigation on your WordPress site.
10
 
@@ -15,6 +15,8 @@ WP-Paginate is a simple and flexible pagination plugin which provides users with
15
  In addition to increasing the user experience for your visitors, it has also been widely reported that pagination increases the SEO of your site by providing more links to your content.
16
 
17
  Starting in version 1.1, WP-Paginate can also be used to paginate post comments!
 
 
18
 
19
  == Installation ==
20
 
@@ -27,7 +29,7 @@ Starting in version 1.1, WP-Paginate can also be used to paginate post comments!
27
  *Implement*
28
 
29
  For posts pagination:
30
- 1) Open the theme files where you'd like pagination to be used. Usually this is the index.php, archive.php and search.php files.
31
 
32
  2) Replace your existing `previous_posts_link()` and `next_posts_link()` code block with the following:
33
 
@@ -37,7 +39,7 @@ For posts pagination:
37
 
38
 
39
  For comments pagination:
40
- 1) Open the theme file(s) where you'd like comments pagination to be used. Usually this is the comments.php file.
41
 
42
  2) Replace your existing `previous_comments_link()` and `next_comments_link()` code block with the following:
43
 
@@ -107,6 +109,11 @@ This allows you to use the `.wp-paginate-comments` styles, already in `wp-pagina
107
 
108
  == Changelog ==
109
 
 
 
 
 
 
110
  = 1.1.2 =
111
  * Fixed comment pagination bug (nested comments caused blank page)
112
  * Enabled HTML for Pagination Label, Previous Page, and Next Page
1
  === WP-Paginate ===
2
  Contributors: emartin24
3
  Donate link: http://www.ericmmartin.com/donate/
4
+ Tags: paginate, pagination, navigation, page, wp-paginate, comments, rtl, seo, usability
5
  Requires at least: 2.2.0 (2.7.0 for comments pagination)
6
+ Tested up to: 3.0.1
7
+ Stable tag: 1.2
8
 
9
  WP-Paginate is a simple and flexible pagination plugin which provides users with better navigation on your WordPress site.
10
 
15
  In addition to increasing the user experience for your visitors, it has also been widely reported that pagination increases the SEO of your site by providing more links to your content.
16
 
17
  Starting in version 1.1, WP-Paginate can also be used to paginate post comments!
18
+
19
+ Translations: http://plugins.svn.wordpress.org/wp-paginate/I18n (check the version number for the correct file)
20
 
21
  == Installation ==
22
 
29
  *Implement*
30
 
31
  For posts pagination:
32
+ 1) Open the theme files where you'd like pagination to be used. Usually this is the `loop.php` file. For older version of WordPress, you may need to update the `index.php`, `archive.php` and `search.php` files.
33
 
34
  2) Replace your existing `previous_posts_link()` and `next_posts_link()` code block with the following:
35
 
39
 
40
 
41
  For comments pagination:
42
+ 1) Open the theme file(s) where you'd like comments pagination to be used. Usually this is the `comments.php` file.
43
 
44
  2) Replace your existing `previous_comments_link()` and `next_comments_link()` code block with the following:
45
 
109
 
110
  == Changelog ==
111
 
112
+ = 1.2 =
113
+ * Added RTL language support
114
+ * Fixed comments pagination bug
115
+ * Changed language domain name from wp_paginate to wp-paginate (this will affect translation file names)
116
+
117
  = 1.1.2 =
118
  * Fixed comment pagination bug (nested comments caused blank page)
119
  * Enabled HTML for Pagination Label, Previous Page, and Next Page
wp-paginate-rtl.css ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * WP-Paginate - WordPress Pagination Function
3
+ * Revision: $Id: wp-paginate-rtl.css 286636 2010-09-08 00:11:23Z emartin24 $
4
+ * Copyright (c) 2010 Eric Martin http://www.ericmmartin.com/projects/wp-paginate/
5
+ */
6
+ .wp-paginate li {float:right;}
7
+
8
+ /* style overrides for comments pagination */
9
+ .wp-paginate-comments li {float:right}
wp-paginate.css CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
  * WP-Paginate - WordPress Pagination Function
3
- * Revision: $Id: wp-paginate.css 153537 2009-09-10 13:26:24Z emartin24 $
4
- * Copyright (c) 2009 Eric Martin http://www.ericmmartin.com/projects/wp-paginate/
5
  */
6
  .wp-paginate {padding:0; margin:0;}
7
  .wp-paginate li {display:inline; list-style:none;}
1
  /*
2
  * WP-Paginate - WordPress Pagination Function
3
+ * Revision: $Id: wp-paginate.css 286636 2010-09-08 00:11:23Z emartin24 $
4
+ * Copyright (c) 2010 Eric Martin http://www.ericmmartin.com/projects/wp-paginate/
5
  */
6
  .wp-paginate {padding:0; margin:0;}
7
  .wp-paginate li {display:inline; list-style:none;}
wp-paginate.php CHANGED
@@ -4,9 +4,9 @@ Plugin Name: WP-Paginate
4
  Plugin URI: http://www.ericmmartin.com/projects/wp-paginate/
5
  Description: A simple and flexible pagination plugin for WordPress posts and comments.
6
  Author: Eric Martin
7
- Version: 1.1.2
8
  Author URI: http://www.ericmmartin.com
9
- Revision: $Id: wp-paginate.php 222066 2010-03-27 15:07:41Z emartin24 $
10
  */
11
 
12
  /* Copyright 2010 Eric Martin (eric@ericmmartin.com)
@@ -43,7 +43,7 @@ if (!class_exists('WPPaginate')) {
43
  /**
44
  * @var string The plugin version
45
  */
46
- var $version = '1.1.2';
47
 
48
  /**
49
  * @var string The options string name for this plugin
@@ -53,7 +53,7 @@ if (!class_exists('WPPaginate')) {
53
  /**
54
  * @var string $localizationDomain Domain used for localization
55
  */
56
- var $localizationDomain = 'wp_paginate';
57
 
58
  /**
59
  * @var string $pluginurl The url to this plugin
@@ -118,21 +118,9 @@ if (!class_exists('WPPaginate')) {
118
  $pages = intval(ceil($wp_query->found_posts / $posts_per_page));
119
  }
120
  else {
121
- global $post, $wpdb;
122
- /*
123
- * Do not include nested comments
124
- * Thanks to jeffreyalew for the patch
125
- */
126
- $comments = $wpdb->get_var("
127
- SELECT COUNT(*)
128
- FROM $wpdb->comments
129
- WHERE comment_approved = '1'
130
- AND comment_parent = '0'
131
- AND comment_post_ID = $post->ID
132
- ");
133
  $page = get_query_var('cpage');
134
  $comments_per_page = get_option('comments_per_page');
135
- $pages = intval(ceil($comments / $comments_per_page));
136
  }
137
  $page = !empty($page) ? intval($page) : 1;
138
  }
@@ -214,7 +202,6 @@ if (!class_exists('WPPaginate')) {
214
  }
215
 
216
  function wp_paginate_css() {
217
- $css = "";
218
  $name = "wp-paginate.css";
219
  if (false !== @file_exists(TEMPLATEPATH . "/$name")) {
220
  $css = get_template_directory_uri() . "/$name";
@@ -223,6 +210,17 @@ if (!class_exists('WPPaginate')) {
223
  $css = $this->pluginurl . $name;
224
  }
225
  wp_enqueue_style('wp-paginate', $css, false, $this->version, 'screen');
 
 
 
 
 
 
 
 
 
 
 
226
  }
227
 
228
  /**
@@ -342,7 +340,7 @@ if (!class_exists('WPPaginate')) {
342
  <tr valign="top">
343
  <th scope="row"><?php _e('WP-Paginate CSS File:', $this->localizationDomain); ?></th>
344
  <td><label for="css">
345
- <input type="checkbox" id="css" name="css" <?php echo ($this->options['css'] === true) ? "checked='checked'" : ""; ?>/> <?php _e('Include the default stylesheet wp-paginate.css?', $this->localizationDomain); ?></label></td>
346
  </tr>
347
  <tr valign="top">
348
  <th scope="row"><?php _e('Page Range:', $this->localizationDomain); ?></th>
4
  Plugin URI: http://www.ericmmartin.com/projects/wp-paginate/
5
  Description: A simple and flexible pagination plugin for WordPress posts and comments.
6
  Author: Eric Martin
7
+ Version: 1.2
8
  Author URI: http://www.ericmmartin.com
9
+ Revision: $Id: wp-paginate.php 294730 2010-09-28 21:17:23Z emartin24 $
10
  */
11
 
12
  /* Copyright 2010 Eric Martin (eric@ericmmartin.com)
43
  /**
44
  * @var string The plugin version
45
  */
46
+ var $version = '1.2';
47
 
48
  /**
49
  * @var string The options string name for this plugin
53
  /**
54
  * @var string $localizationDomain Domain used for localization
55
  */
56
+ var $localizationDomain = 'wp-paginate';
57
 
58
  /**
59
  * @var string $pluginurl The url to this plugin
118
  $pages = intval(ceil($wp_query->found_posts / $posts_per_page));
119
  }
120
  else {
 
 
 
 
 
 
 
 
 
 
 
 
121
  $page = get_query_var('cpage');
122
  $comments_per_page = get_option('comments_per_page');
123
+ $pages = get_comment_pages_count();
124
  }
125
  $page = !empty($page) ? intval($page) : 1;
126
  }
202
  }
203
 
204
  function wp_paginate_css() {
 
205
  $name = "wp-paginate.css";
206
  if (false !== @file_exists(TEMPLATEPATH . "/$name")) {
207
  $css = get_template_directory_uri() . "/$name";
210
  $css = $this->pluginurl . $name;
211
  }
212
  wp_enqueue_style('wp-paginate', $css, false, $this->version, 'screen');
213
+
214
+ if (is_rtl()) {
215
+ $name = "wp-paginate-rtl.css";
216
+ if (false !== @file_exists(TEMPLATEPATH . "/$name")) {
217
+ $css = get_template_directory_uri() . "/$name";
218
+ }
219
+ else {
220
+ $css = $this->pluginurl . $name;
221
+ }
222
+ wp_enqueue_style('wp-paginate-rtl', $css, false, $this->version, 'screen');
223
+ }
224
  }
225
 
226
  /**
340
  <tr valign="top">
341
  <th scope="row"><?php _e('WP-Paginate CSS File:', $this->localizationDomain); ?></th>
342
  <td><label for="css">
343
+ <input type="checkbox" id="css" name="css" <?php echo ($this->options['css'] === true) ? "checked='checked'" : ""; ?>/> <?php printf(__('Include the default stylesheet wp-paginate.css? WP-Paginate will first look for <code>wp-paginate.css</code> in your theme directory (<code>themes/%s</code>).', $this->localizationDomain), get_template()); ?></label></td>
344
  </tr>
345
  <tr valign="top">
346
  <th scope="row"><?php _e('Page Range:', $this->localizationDomain); ?></th>