Admin Post Navigation - Version 1.8

Version Description

Minor update: hid screen options checkbox when JS is enabled since metabox is hidden; improved metabox spacing; noted compatibility through WP 3.8+

Download this release

Release Info

Developer coffee2code
Plugin Icon 128x128 Admin Post Navigation
Version 1.8
Comparing to
See all releases

Code changes from version 1.7.2 to 1.8

Files changed (2) hide show
  1. admin-post-navigation.php +13 -8
  2. readme.txt +22 -12
admin-post-navigation.php CHANGED
@@ -2,11 +2,11 @@
2
  /**
3
  * @package Admin_Post_Navigation
4
  * @author Scott Reilly
5
- * @version 1.7.2
6
  */
7
  /*
8
  Plugin Name: Admin Post Navigation
9
- Version: 1.7.2
10
  Plugin URI: http://coffee2code.com/wp-plugins/admin-post-navigation/
11
  Author: Scott Reilly
12
  Author URI: http://coffee2code.com/
@@ -16,20 +16,24 @@ License: GPLv2 or later
16
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
17
  Description: Adds links to navigate to the next and previous posts when editing a post in the WordPress admin.
18
 
19
- Compatible with WordPress 3.0 through 3.5+.
20
 
21
  =>> Read the accompanying readme.txt file for instructions and documentation.
22
  =>> Also, visit the plugin's homepage for additional information and updates.
23
- =>> Or visit: http://wordpress.org/extend/plugins/admin-post-navigation/
24
 
25
  TODO:
 
26
  * Add screen option allowing user selection of post navigation order
 
27
  * Put CSS into enqueuable .css file
28
  * Put JS into enqueueable .js file
 
 
29
  */
30
 
31
  /*
32
- Copyright (c) 2008-2013 by Scott Reilly (aka coffee2code)
33
 
34
  This program is free software; you can redistribute it and/or
35
  modify it under the terms of the GNU General Public License
@@ -38,7 +42,7 @@ TODO:
38
 
39
  This program is distributed in the hope that it will be useful,
40
  but WITHOUT ANY WARRANTY; without even the implied warranty of
41
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
42
  GNU General Public License for more details.
43
 
44
  You should have received a copy of the GNU General Public License
@@ -63,7 +67,7 @@ class c2c_AdminPostNavigation {
63
  * @since 1.7
64
  */
65
  public static function version() {
66
- return '1.7.2';
67
  }
68
 
69
  /**
@@ -179,6 +183,7 @@ class c2c_AdminPostNavigation {
179
  #admin-post-nav {margin-left:20px;}
180
  #adminpostnav #admin-post-nav {margin-left:0;}
181
  h2 #admin-post-nav {font-size:0.6em;}
 
182
  </style>
183
 
184
  HTML;
@@ -197,7 +202,7 @@ HTML;
197
  <script type="text/javascript">
198
  jQuery(document).ready(function($) {
199
  $('#admin-post-nav').appendTo($('h2'));
200
- $('#adminpostnav').hide();
201
  });
202
  </script>
203
 
2
  /**
3
  * @package Admin_Post_Navigation
4
  * @author Scott Reilly
5
+ * @version 1.8
6
  */
7
  /*
8
  Plugin Name: Admin Post Navigation
9
+ Version: 1.8
10
  Plugin URI: http://coffee2code.com/wp-plugins/admin-post-navigation/
11
  Author: Scott Reilly
12
  Author URI: http://coffee2code.com/
16
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
17
  Description: Adds links to navigate to the next and previous posts when editing a post in the WordPress admin.
18
 
19
+ Compatible with WordPress 3.0 through 3.8+.
20
 
21
  =>> Read the accompanying readme.txt file for instructions and documentation.
22
  =>> Also, visit the plugin's homepage for additional information and updates.
23
+ =>> Or visit: http://wordpress.org/plugins/admin-post-navigation/
24
 
25
  TODO:
26
+ * Hide screen option checkbox for metabox if metabox is being hidden
27
  * Add screen option allowing user selection of post navigation order
28
+ * Add unit tests
29
  * Put CSS into enqueuable .css file
30
  * Put JS into enqueueable .js file
31
+ * Add dropdown to post nav links to allow selecting different types of things
32
+ to navigate to (e.g. next draft (if looking at a draft), next in category X)
33
  */
34
 
35
  /*
36
+ Copyright (c) 2008-2014 by Scott Reilly (aka coffee2code)
37
 
38
  This program is free software; you can redistribute it and/or
39
  modify it under the terms of the GNU General Public License
42
 
43
  This program is distributed in the hope that it will be useful,
44
  but WITHOUT ANY WARRANTY; without even the implied warranty of
45
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46
  GNU General Public License for more details.
47
 
48
  You should have received a copy of the GNU General Public License
67
  * @since 1.7
68
  */
69
  public static function version() {
70
+ return '1.8';
71
  }
72
 
73
  /**
183
  #admin-post-nav {margin-left:20px;}
184
  #adminpostnav #admin-post-nav {margin-left:0;}
185
  h2 #admin-post-nav {font-size:0.6em;}
186
+ .inside #admin-post-nav a {top:0;margin-top:4px;display:inline-block;}
187
  </style>
188
 
189
  HTML;
202
  <script type="text/javascript">
203
  jQuery(document).ready(function($) {
204
  $('#admin-post-nav').appendTo($('h2'));
205
+ $('#adminpostnav, label[for="adminpostnav-hide"]').hide();
206
  });
207
  </script>
208
 
readme.txt CHANGED
@@ -1,28 +1,25 @@
1
  === Admin Post Navigation ===
2
  Contributors: coffee2code
3
- Donate link: http://coffee2code.com/donate
4
  Tags: admin, navigation, post, next, previous, edit, post types, coffee2code
5
  License: GPLv2 or later
6
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
  Requires at least: 3.0
8
- Tested up to: 3.5
9
- Stable tag: 1.7.2
10
- Version: 1.7.2
11
 
12
  Adds links to navigate to the next and previous posts when editing a post in the WordPress admin.
13
 
14
 
15
  == Description ==
16
 
17
- Adds links to navigate to the next and previous posts when editing a post in the WordPress admin.
18
-
19
- This plugin adds "&larr; Previous" and "Next &rarr;" links to the "Edit Post" admin page if a previous and next post are present, respectively. The link titles (visible when hovering over the links) reveal the title of the previous/next post. The links link to the "Edit Post" admin page for the previous/next posts so that you may edit them.
20
 
21
- By default, a previous/next post is determined by the next lower/higher valid post based on relative sequential post ID and which the user can edit. Other post criteria such as post type (draft, pending, etc), publish date, post author, category, etc, are not taken into consideration when determining the previous or next post. How posts are navigated, and post types and post statuses to restrict navigation can be customized via filters (see Filters section).
22
 
23
  NOTE: Be sure to save the post currently being edited before navigating away to the previous/next post.
24
 
25
- Links: [Plugin Homepage](http://coffee2code.com/wp-plugins/admin-post-navigation/) | [Plugin Directory Page](http://wordpress.org/extend/plugins/admin-post-navigation/) | [Author Homepage](http://coffee2code.com)
26
 
27
 
28
  == Installation ==
@@ -51,7 +48,7 @@ The plugin is further customizable via four filters. Typically, these customizat
51
 
52
  = c2c_admin_post_navigation_orderby (filter) =
53
 
54
- The 'c2c_admin_post_navigation_orderby' filter allows you to change the post field used in the ORDER BY clause for the SQL to find the previous/next post. By default this is 'ID' for non-hierarchical post types (such as posts) and 'post_title' for hierarchical post types (such as pages). If you wish to change this, hook this filter. This is not typical usage for most users.
55
 
56
  Arguments:
57
 
@@ -66,7 +63,7 @@ function order_apn_by_post_date( $field ) {
66
 
67
  = c2c_admin_post_navigation_post_statuses (filter) =
68
 
69
- The 'c2c_admin_post_navigation_post_statuses' filter allows you to modify the list of post_statuses used as part of the search for the prev/next post. By default this array includes 'draft', 'future', 'pending', 'private', and 'publish'. If you wish to change this, hook this filter. This is not typical usage for most users.
70
 
71
  Arguments:
72
 
@@ -85,7 +82,7 @@ function change_apn_post_status( $post_statuses ) {
85
 
86
  = c2c_admin_post_navigation_post_types (filter) =
87
 
88
- The 'c2c_admin_post_navigation_post_types' filter allows you to modify the list of post_types used as part of the search for the prev/next post. By default this array includes all available post types. If you wish to change this, hook this filter.
89
 
90
  Arguments:
91
 
@@ -132,6 +129,16 @@ function override_apn_display( $text ) {
132
 
133
  == Changelog ==
134
 
 
 
 
 
 
 
 
 
 
 
135
  = 1.7.2 =
136
  * Add check to prevent execution of code if file is directly accessed
137
  * Note compatibility through WP 3.5+
@@ -232,6 +239,9 @@ function override_apn_display( $text ) {
232
 
233
  == Upgrade Notice ==
234
 
 
 
 
235
  = 1.7.2 =
236
  Trivial update: noted compatibility through WP 3.5+
237
 
1
  === Admin Post Navigation ===
2
  Contributors: coffee2code
3
+ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6ARCFJ9TX3522
4
  Tags: admin, navigation, post, next, previous, edit, post types, coffee2code
5
  License: GPLv2 or later
6
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
  Requires at least: 3.0
8
+ Tested up to: 3.8
9
+ Stable tag: 1.8
 
10
 
11
  Adds links to navigate to the next and previous posts when editing a post in the WordPress admin.
12
 
13
 
14
  == Description ==
15
 
16
+ This plugin adds "&larr; Previous" and "Next &rarr;" links to the "Edit Post" admin page if a previous and next post are present, respectively. The link titles (visible when hovering over the links) reveal the title of the previous/next post. The links link to the "Edit Post" admin page for the previous/next posts so that you may edit them.
 
 
17
 
18
+ By default, a previous/next post is determined by the next lower/higher valid post based on relative sequential post ID and which the user can edit. Other post criteria such as post type (draft, pending, etc), publish date, post author, category, etc, are not taken into consideration when determining the previous or next post. How posts are navigated, and post types and post statuses to restrict navigation can be customized via filters (see Filters section).
19
 
20
  NOTE: Be sure to save the post currently being edited before navigating away to the previous/next post.
21
 
22
+ Links: [Plugin Homepage](http://coffee2code.com/wp-plugins/admin-post-navigation/) | [Plugin Directory Page](http://wordpress.org/plugins/admin-post-navigation/) | [Author Homepage](http://coffee2code.com)
23
 
24
 
25
  == Installation ==
48
 
49
  = c2c_admin_post_navigation_orderby (filter) =
50
 
51
+ The 'c2c_admin_post_navigation_orderby' filter allows you to change the post field used in the ORDER BY clause for the SQL to find the previous/next post. By default this is 'ID' for non-hierarchical post types (such as posts) and 'post_title' for hierarchical post types (such as pages). If you wish to change this, hook this filter. This is not typical usage for most users.
52
 
53
  Arguments:
54
 
63
 
64
  = c2c_admin_post_navigation_post_statuses (filter) =
65
 
66
+ The 'c2c_admin_post_navigation_post_statuses' filter allows you to modify the list of post_statuses used as part of the search for the prev/next post. By default this array includes 'draft', 'future', 'pending', 'private', and 'publish'. If you wish to change this, hook this filter. This is not typical usage for most users.
67
 
68
  Arguments:
69
 
82
 
83
  = c2c_admin_post_navigation_post_types (filter) =
84
 
85
+ The 'c2c_admin_post_navigation_post_types' filter allows you to modify the list of post_types used as part of the search for the prev/next post. By default this array includes all available post types. If you wish to change this, hook this filter.
86
 
87
  Arguments:
88
 
129
 
130
  == Changelog ==
131
 
132
+ = 1.8 (2013-12-29) =
133
+ * Hide screen option checkbox for metabox if JS hides metabox for inline use
134
+ * Improve spacing within its metabox (when shown if JS is disabled)
135
+ * Note compatibility through WP 3.8+
136
+ * Update copyright date (2014)
137
+ * Change donate link
138
+ * Minor readme.txt tweaks (mostly spacing)
139
+ * Update banner
140
+ * Update screenshots
141
+
142
  = 1.7.2 =
143
  * Add check to prevent execution of code if file is directly accessed
144
  * Note compatibility through WP 3.5+
239
 
240
  == Upgrade Notice ==
241
 
242
+ = 1.8 =
243
+ Minor update: hid screen options checkbox when JS is enabled since metabox is hidden; improved metabox spacing; noted compatibility through WP 3.8+
244
+
245
  = 1.7.2 =
246
  Trivial update: noted compatibility through WP 3.5+
247