WP-Paginate - Version 1.1.1

Version Description

  • Changed output to include wp-paginate and wp-paginate-comments class names on the ol element
  • Changed the before option from <div class="wp-paginate"> to <div class="navigation">
  • Added .wp-paginate-comments styles to wp-paginate.css
  • Changed styles in wp-paginate.css
Download this release

Release Info

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

Code changes from version 1.1 to 1.1.1

Files changed (3) hide show
  1. readme.txt +21 -24
  2. wp-paginate.css +14 -4
  3. wp-paginate.php +6 -5
readme.txt CHANGED
@@ -4,7 +4,7 @@ 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.8.4
7
- Stable tag: 1.1
8
 
9
  WP-Paginate is a simple and flexible pagination plugin which provides users with better navigation on your WordPress site.
10
 
@@ -14,7 +14,7 @@ WP-Paginate is a simple and flexible pagination plugin which provides users with
14
 
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 be used to paginate posts as well as post comments!
18
 
19
  == Installation ==
20
 
@@ -35,6 +35,7 @@ For posts pagination:
35
  wp_paginate();
36
  } ?>
37
 
 
38
  For comments pagination:
39
  1) Open the theme file(s) where you'd like comments pagination to be used. Usually this is the comments.php file.
40
 
@@ -44,6 +45,7 @@ For comments pagination:
44
  wp_paginate_comments();
45
  } ?>
46
 
 
47
  *Configure*
48
 
49
  1) Configure the WP-Paginate settings, if necessary, from the WP-Paginate option in the Settings menu
@@ -54,7 +56,14 @@ For comments pagination:
54
  * Add your custom CSS to your theme's `styles.css`
55
  * Modify the `wp-paginate.css` file in the wp-paginate plugin directory
56
 
57
- *Note:* The first two options will ensure that WP-Paginate updates will not overwrite your custom styles.
 
 
 
 
 
 
 
58
 
59
  == Frequently Asked Questions ==
60
 
@@ -83,31 +92,13 @@ Example (also applies to `wp_paginate_comments()`):
83
  wp_paginate('range=4&anchor=2&nextpage=Next&previouspage=Previous');
84
  } ?>
85
 
86
- = How can I style the comments pagination differently than the posts pagination? =
87
-
88
- There are a number of ways to do this, but basically, you'll want to override the default styles.
89
 
90
- For example, you could do the following:
91
 
92
- 1) Modify the `wp_paginate_comments()` call:
93
 
94
- <?php if(function_exists('wp_paginate_comments')) {
95
- wp_paginate_comments('before=<div class="wp-paginate-comments">');
96
- } ?>
97
-
98
- 2) Add CSS to override the default element styles:
99
-
100
- .wp-paginate-comments {}
101
- .wp-paginate-comments ol {}
102
- .wp-paginate-comments li {}
103
- .wp-paginate-comments a {}
104
- .wp-paginate-comments a:hover, .wp-paginate-comments a:active {}
105
- .wp-paginate-comments .title {}
106
- .wp-paginate-comments .gap {}
107
- .wp-paginate-comments .current {}
108
- .wp-paginate-comments .page {}
109
- .wp-paginate-comments .prev, .wp-paginate .next {}
110
 
 
111
 
112
  == Screenshots ==
113
 
@@ -116,6 +107,12 @@ For example, you could do the following:
116
 
117
  == Changelog ==
118
 
 
 
 
 
 
 
119
  = 1.1 =
120
  * Added `wp_paginate_comments()` function for pagination of post comments
121
 
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.8.4
7
+ Stable tag: 1.1.1
8
 
9
  WP-Paginate is a simple and flexible pagination plugin which provides users with better navigation on your WordPress site.
10
 
14
 
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
 
35
  wp_paginate();
36
  } ?>
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
 
45
  wp_paginate_comments();
46
  } ?>
47
 
48
+
49
  *Configure*
50
 
51
  1) Configure the WP-Paginate settings, if necessary, from the WP-Paginate option in the Settings menu
56
  * Add your custom CSS to your theme's `styles.css`
57
  * Modify the `wp-paginate.css` file in the wp-paginate plugin directory
58
 
59
+ *Note:* The first two options will ensure that WP-Paginate updates will not overwrite your custom styles.
60
+
61
+ *Upgrading*
62
+
63
+ To 1.1.1:
64
+
65
+ * Update WP-Paginate settings, change `Before Markup` to <div class="navigation">
66
+ * Update `wp-paginate.css`, change `.wp-paginate ol` to `.wp-paginate`
67
 
68
  == Frequently Asked Questions ==
69
 
92
  wp_paginate('range=4&anchor=2&nextpage=Next&previouspage=Previous');
93
  } ?>
94
 
 
 
 
95
 
 
96
 
97
+ = How can I style the comments pagination differently than the posts pagination? =
98
 
99
+ When calling `wp_paginate_comments()`, WP-Paginate adds an extra class to the `ol` element, `wp-paginate-comments`.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
 
101
+ This allows you to use the `.wp-paginate-comments` styles, already in `wp-paginate.css`, to override the default styles.
102
 
103
  == Screenshots ==
104
 
107
 
108
  == Changelog ==
109
 
110
+ = 1.1.1 =
111
+ * Changed output to include `wp-paginate` and `wp-paginate-comments` class names on the `ol` element
112
+ * Changed the `before` option from `<div class="wp-paginate">` to `<div class="navigation">`
113
+ * Added `.wp-paginate-comments` styles to `wp-paginate.css`
114
+ * Changed styles in `wp-paginate.css`
115
+
116
  = 1.1 =
117
  * Added `wp_paginate_comments()` function for pagination of post comments
118
 
wp-paginate.css CHANGED
@@ -1,10 +1,9 @@
1
  /*
2
  * WP-Paginate - WordPress Pagination Function
3
- * Revision: $Id: wp-paginate.css 153392 2009-09-09 23:28:27Z emartin24 $
4
  * Copyright (c) 2009 Eric Martin http://www.ericmmartin.com/projects/wp-paginate/
5
  */
6
- .wp-paginate {}
7
- .wp-paginate ol {padding:0; margin:0;}
8
  .wp-paginate li {display:inline; list-style:none;}
9
  .wp-paginate a {background:#ddd; border:1px solid #ccc; color:#666; margin-right:4px; padding:3px 6px; text-align:center; text-decoration:none;}
10
  .wp-paginate a:hover, .wp-paginate a:active {background:#ccc; color:#888;}
@@ -12,4 +11,15 @@
12
  .wp-paginate .gap {color:#999; margin-right:4px;}
13
  .wp-paginate .current {color:#fff; background:#5f87ae; border:1px solid #89adcf; margin-right:4px; padding:3px 6px;}
14
  .wp-paginate .page {}
15
- .wp-paginate .prev, .wp-paginate .next {}
 
 
 
 
 
 
 
 
 
 
 
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;}
8
  .wp-paginate a {background:#ddd; border:1px solid #ccc; color:#666; margin-right:4px; padding:3px 6px; text-align:center; text-decoration:none;}
9
  .wp-paginate a:hover, .wp-paginate a:active {background:#ccc; color:#888;}
11
  .wp-paginate .gap {color:#999; margin-right:4px;}
12
  .wp-paginate .current {color:#fff; background:#5f87ae; border:1px solid #89adcf; margin-right:4px; padding:3px 6px;}
13
  .wp-paginate .page {}
14
+ .wp-paginate .prev, .wp-paginate .next {}
15
+
16
+ /* style overrides for comments pagination */
17
+ .wp-paginate-comments {}
18
+ .wp-paginate-comments li {}
19
+ .wp-paginate-comments a {}
20
+ .wp-paginate-comments a:hover, .wp-paginate-comments a:active {}
21
+ .wp-paginate-comments .title {}
22
+ .wp-paginate-comments .gap {}
23
+ .wp-paginate-comments .current {}
24
+ .wp-paginate-comments .page {}
25
+ .wp-paginate-comments .prev, .wp-paginate-comments .next {}
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
8
  Author URI: http://www.ericmmartin.com
9
- Revision: $Id: wp-paginate.php 153392 2009-09-09 23:28:27Z emartin24 $
10
  */
11
 
12
  /* Copyright 2009 Eric Martin (eric@ericmmartin.com)
@@ -40,7 +40,7 @@ if (!defined('WP_PLUGIN_DIR') )
40
 
41
  if (!class_exists('WPPaginate')) {
42
  class WPPaginate {
43
- var $version = '1.1';
44
 
45
  /**
46
  * @var string The options string name for this plugin
@@ -131,7 +131,8 @@ if (!class_exists('WPPaginate')) {
131
 
132
  $output = stripslashes($before);
133
  if ($pages > 1) {
134
- $output .= "<ol><li><span class='title'>$title</span></li>";
 
135
  $ellipsis = "<li><span class='gap'>...</span></li>";
136
 
137
  if ($page > 1 && !empty($previouspage)) {
@@ -220,7 +221,7 @@ if (!class_exists('WPPaginate')) {
220
  'nextpage' => '&raquo;',
221
  'previouspage' => '&laquo;',
222
  'css' => true,
223
- 'before' => '<div class="wp-paginate">',
224
  'after' => '</div>',
225
  'empty' => true,
226
  'range' => 3,
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.1
8
  Author URI: http://www.ericmmartin.com
9
+ Revision: $Id: wp-paginate.php 153537 2009-09-10 13:26:24Z emartin24 $
10
  */
11
 
12
  /* Copyright 2009 Eric Martin (eric@ericmmartin.com)
40
 
41
  if (!class_exists('WPPaginate')) {
42
  class WPPaginate {
43
+ var $version = '1.1.1';
44
 
45
  /**
46
  * @var string The options string name for this plugin
131
 
132
  $output = stripslashes($before);
133
  if ($pages > 1) {
134
+ $output .= sprintf('<ol class="wp-paginate%s">', ($this->type === 'posts') ? '' : ' wp-paginate-comments');
135
+ $output .= "<li><span class='title'>$title</span></li>";
136
  $ellipsis = "<li><span class='gap'>...</span></li>";
137
 
138
  if ($page > 1 && !empty($previouspage)) {
221
  'nextpage' => '&raquo;',
222
  'previouspage' => '&laquo;',
223
  'css' => true,
224
+ 'before' => '<div class="navigation">',
225
  'after' => '</div>',
226
  'empty' => true,
227
  'range' => 3,