WP-Paginate - Version 1.2.5

Version Description

  • Remove PHP4 support to resolve PHP Strict warning Github pull request via DeanMarkTaylor
  • Test with latest version of WordPress
Download this release

Release Info

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

Code changes from version 1.2.4 to 1.2.5

Files changed (4) hide show
  1. readme.txt +46 -22
  2. wp-paginate-rtl.css +2 -2
  3. wp-paginate.css +4 -4
  4. wp-paginate.php +5 -10
readme.txt CHANGED
@@ -3,8 +3,10 @@ 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.6.0 (2.7.0 for comments pagination)
6
- Tested up to: 3.2.1
7
- Stable tag: 1.2.4
 
 
8
 
9
  WP-Paginate is a simple and flexible pagination plugin which provides users with better navigation on your WordPress site.
10
 
@@ -29,33 +31,50 @@ Translations: http://plugins.svn.wordpress.org/wp-paginate/I18n (check the versi
29
  *Implement*
30
 
31
  For posts pagination:
32
- 1) Open the theme files where you'd like pagination to be used. Depending on your theme, this may be the `loop.php` file or the `index.php`, `archive.php` and `search.php` files. The `twentyeleven` theme places the pagination code in `functions.php` in the `twentyeleven_content_nav()` function.
33
 
34
- 2) Replace your existing `previous_posts_link()` and `next_posts_link()` code block with the following:
 
 
 
 
 
 
35
 
36
  <?php if(function_exists('wp_paginate')) {
37
  wp_paginate();
38
- } ?>
 
 
 
 
 
 
 
 
 
 
39
 
40
- For the `twentyeleven_content_nav` theme, the new function would look like:
41
-
42
- function twentyeleven_content_nav( $nav_id ) {
43
- global $wp_query;
44
-
45
- if ( function_exists( 'wp_paginate' ) ) {
46
- wp_paginate();
47
- }
48
- else {
49
- if ( $wp_query->max_num_pages > 1 ) : ?>
50
- <nav id="<?php echo $nav_id; ?>">
51
- <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3>
52
- <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentyeleven' ) ); ?></div>
53
- <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?></div>
54
- </nav><!-- #nav-above -->
55
- <?php endif;
56
- }
57
  }
 
 
 
 
 
58
 
 
 
 
 
 
 
 
 
59
 
60
  For comments pagination:
61
  1) Open the theme file(s) where you'd like comments pagination to be used. Usually this is the `comments.php` file.
@@ -132,6 +151,11 @@ N/A
132
 
133
  == Changelog ==
134
 
 
 
 
 
 
135
  = 1.2.4 =
136
  * Ensure pagination of posts when wp_paginate() is called
137
  Github pull request via whacao
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.6.0 (2.7.0 for comments pagination)
6
+ Tested up to: 3.9.1
7
+ Stable tag: 1.2.5
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
  WP-Paginate is a simple and flexible pagination plugin which provides users with better navigation on your WordPress site.
12
 
31
  *Implement*
32
 
33
  For posts pagination:
34
+ * Open the theme files where you'd like pagination to be used. Depending on your theme, this could be in a number of files, such as `index.php`, `archive.php`, `categories.php`, `search.php`, `tag.php`, or the `functions.php` file(s).The `twentyeleven` theme places the pagination code in `functions.php` in the `twentyeleven_content_nav()` function.
35
 
36
+ Examples:
37
+
38
+ For the `twentytwelve` theme, in `index.php`, replace:
39
+
40
+ <?php twentytwelve_content_nav( 'nav-below' ); ?>
41
+
42
+ With:
43
 
44
  <?php if(function_exists('wp_paginate')) {
45
  wp_paginate();
46
+ }
47
+ else {
48
+ twentytwelve_content_nav( 'nav-below' );
49
+ }
50
+ ?>
51
+
52
+ For the `twentythirteen` theme, in `index.php`, replace:
53
+
54
+ <?php twentythirteen_paging_nav(); ?>
55
+
56
+ With:
57
 
58
+ <?php if(function_exists('wp_paginate')) {
59
+ wp_paginate();
60
+ }
61
+ else {
62
+ twentythirteen_paging_nav();
 
 
 
 
 
 
 
 
 
 
 
 
63
  }
64
+ ?>
65
+
66
+ For the `twentyfourteen` theme, in `index.php`, replace:
67
+
68
+ twentyfourteen_paging_nav();
69
 
70
+ With:
71
+
72
+ if(function_exists('wp_paginate')) {
73
+ wp_paginate();
74
+ }
75
+ else {
76
+ twentyfourteen_paging_nav();
77
+ }
78
 
79
  For comments pagination:
80
  1) Open the theme file(s) where you'd like comments pagination to be used. Usually this is the `comments.php` file.
151
 
152
  == Changelog ==
153
 
154
+ = 1.2.5 =
155
+ * Remove PHP4 support to resolve PHP Strict warning
156
+ Github pull request via DeanMarkTaylor
157
+ * Test with latest version of WordPress
158
+
159
  = 1.2.4 =
160
  * Ensure pagination of posts when wp_paginate() is called
161
  Github pull request via whacao
wp-paginate-rtl.css CHANGED
@@ -1,7 +1,7 @@
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
 
1
  /*
2
  * WP-Paginate - WordPress Pagination Function
3
+ * Revision: $Id: wp-paginate-rtl.css 943040 2014-07-03 18:30:39Z emartin24 $
4
+ * Copyright (c) 2014 Eric Martin http://www.ericmmartin.com/projects/wp-paginate/
5
  */
6
  .wp-paginate li {float:right;}
7
 
wp-paginate.css CHANGED
@@ -1,15 +1,15 @@
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;}
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;}
10
  .wp-paginate .title {color:#555; margin-right:4px;}
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
 
1
  /*
2
  * WP-Paginate - WordPress Pagination Function
3
+ * Revision: $Id: wp-paginate.css 943040 2014-07-03 18:30:39Z emartin24 $
4
+ * Copyright (c) 2014 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:4px 8px; text-align:center; text-decoration:none;}
9
  .wp-paginate a:hover, .wp-paginate a:active {background:#ccc; color:#888;}
10
  .wp-paginate .title {color:#555; margin-right:4px;}
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:4px 8px;}
13
  .wp-paginate .page {}
14
  .wp-paginate .prev, .wp-paginate .next {}
15
 
wp-paginate.php CHANGED
@@ -4,12 +4,12 @@ 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.2.4
8
  Author URI: http://www.ericmmartin.com
9
- Revision: $Id: wp-paginate.php 467949 2011-11-26 20:03:29Z emartin24 $
10
  */
11
 
12
- /* Copyright 2011 Eric Martin (eric@ericmmartin.com)
13
 
14
  This program is free software; you can redistribute it and/or modify
15
  it under the terms of the GNU General Public License as published by
@@ -43,7 +43,7 @@ if (!class_exists('WPPaginate')) {
43
  /**
44
  * @var string The plugin version
45
  */
46
- var $version = '1.2.4';
47
 
48
  /**
49
  * @var string The options string name for this plugin
@@ -72,12 +72,7 @@ if (!class_exists('WPPaginate')) {
72
  var $type = 'posts';
73
 
74
  /**
75
- * PHP 4 Compatible Constructor
76
- */
77
- function WPPaginate() {$this->__construct();}
78
-
79
- /**
80
- * PHP 5 Constructor
81
  */
82
  function __construct() {
83
  $name = dirname(plugin_basename(__FILE__));
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.5
8
  Author URI: http://www.ericmmartin.com
9
+ Revision: $Id: wp-paginate.php 943040 2014-07-03 18:30:39Z emartin24 $
10
  */
11
 
12
+ /* Copyright 2014 Eric Martin (eric@ericmmartin.com)
13
 
14
  This program is free software; you can redistribute it and/or modify
15
  it under the terms of the GNU General Public License as published by
43
  /**
44
  * @var string The plugin version
45
  */
46
+ var $version = '1.2.5';
47
 
48
  /**
49
  * @var string The options string name for this plugin
72
  var $type = 'posts';
73
 
74
  /**
75
+ * Constructor
 
 
 
 
 
76
  */
77
  function __construct() {
78
  $name = dirname(plugin_basename(__FILE__));