WordPress.org

Plugin Directory

Changeset 555219


Ignore:
Timestamp:
06/09/12 05:39:29 (23 months ago)
Author:
coffee2code
Message:
  • Update to v1.7.1
  • Use string instead of variable to specify translation textdomain
  • Re-license as GPLv2 or later (from X11)
  • Add 'License' and 'License URI' header tags to readme.txt and plugin file
  • Add banner image for plugin page
  • Remove ending PHP close tag
  • Minor documentation tweaks
  • Note compatibility through WP 3.4+
Location:
admin-post-navigation
Files:
2 added
2 edited
6 copied

Legend:

Unmodified
Added
Removed
  • admin-post-navigation/tags/1.7.1/admin-post-navigation.php

    r476207 r555219  
    33 * @package Admin_Post_Navigation 
    44 * @author Scott Reilly 
    5  * @version 1.7 
     5 * @version 1.7.1 
    66 */ 
    77/* 
    88Plugin Name: Admin Post Navigation 
    9 Version: 1.7 
     9Version: 1.7.1 
    1010Plugin URI: http://coffee2code.com/wp-plugins/admin-post-navigation/ 
    1111Author: Scott Reilly 
    12 Author URI: http://coffee2code.com 
     12Author URI: http://coffee2code.com/ 
    1313Text Domain: admin-post-navigation 
    1414Domain Path: /lang/ 
     15License: GPLv2 or later 
     16License URI: http://www.gnu.org/licenses/gpl-2.0.html 
    1517Description: Adds links to navigate to the next and previous posts when editing a post in the WordPress admin. 
    1618 
    17 Compatible with WordPress 3.0+, 3.1+, 3.2+, 3.3+. 
     19Compatible with WordPress 3.0 through 3.4+. 
    1820 
    1921=>> Read the accompanying readme.txt file for instructions and documentation. 
    2022=>> Also, visit the plugin's homepage for additional information and updates. 
    2123=>> Or visit: http://wordpress.org/extend/plugins/admin-post-navigation/ 
     24 
     25TODO: 
     26    * Add screen option allowing user selection of post navigation order 
    2227*/ 
    2328 
    2429/* 
    25 Copyright (c) 2008-2012 by Scott Reilly (aka coffee2code) 
    26  
    27 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation 
    28 files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, 
    29 modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the 
    30 Software is furnished to do so, subject to the following conditions: 
    31  
    32 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 
    33  
    34 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 
    35 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 
    36 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 
    37 IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
     30    Copyright (c) 2008-2012 by Scott Reilly (aka coffee2code) 
     31 
     32    This program is free software; you can redistribute it and/or 
     33    modify it under the terms of the GNU General Public License 
     34    as published by the Free Software Foundation; either version 2 
     35    of the License, or (at your option) any later version. 
     36 
     37    This program is distributed in the hope that it will be useful, 
     38    but WITHOUT ANY WARRANTY; without even the implied warranty of 
     39    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     40    GNU General Public License for more details. 
     41 
     42    You should have received a copy of the GNU General Public License 
     43    along with this program; if not, write to the Free Software 
     44    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA. 
    3845*/ 
    3946 
     
    4653    private static $post_statuses     = array( 'draft', 'future', 'pending', 'private', 'publish' ); // Filterable later 
    4754    private static $post_statuses_sql = ''; 
    48     private static $textdomain        = 'admin-post-navigation'; 
    4955 
    5056    /** 
     
    5460     */ 
    5561    public static function version() { 
    56         return '1.7'; 
     62        return '1.7.1'; 
    5763    } 
    5864 
     
    7177     */ 
    7278    public static function register_post_page_hooks() { 
    73         load_plugin_textdomain( self::$textdomain, false, basename( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR . 'lang' ); 
    74  
    75         self::$prev_text = __( '← Previous', self::$textdomain ); 
    76         self::$next_text = __( 'Next →', self::$textdomain ); 
     79        load_plugin_textdomain( 'admin-post-navigation', false, basename( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR . 'lang' ); 
     80 
     81        self::$prev_text = __( '← Previous', 'admin-post-navigation' ); 
     82        self::$next_text = __( 'Next →', 'admin-post-navigation' ); 
    7783 
    7884        add_action( 'admin_enqueue_scripts',      array( __CLASS__, 'add_css' ) ); 
     
    101107        $label = self::_get_post_type_label( $post_type ); 
    102108        if ( in_array( $post->post_status, $post_statuses ) ) 
    103             add_meta_box( 'adminpostnav', sprintf( __( '%s Navigation', self::$textdomain ), ucfirst( $post_type ) ), array( __CLASS__, 'add_meta_box' ), $post_type, 'side', 'core' ); 
     109            add_meta_box( 'adminpostnav', sprintf( __( '%s Navigation', 'admin-post-navigation' ), ucfirst( $post_type ) ), array( __CLASS__, 'add_meta_box' ), $post_type, 'side', 'core' ); 
    104110    } 
    105111 
     
    121127            $post_title = strip_tags( get_the_title( $prev->ID ) ); /* If only the_title_attribute() accepted post ID as arg */ 
    122128            $display .= '<a href="' . get_edit_post_link( $prev->ID ) . '" id="admin-post-nav-prev" title="' . 
    123                 esc_attr( sprintf( __( 'Previous %1$s: %2$s', self::$textdomain ), $context, $post_title ) ) . 
     129                esc_attr( sprintf( __( 'Previous %1$s: %2$s', 'admin-post-navigation' ), $context, $post_title ) ) . 
    124130                '" class="admin-post-nav-prev add-new-h2">' . self::$prev_text . '</a>'; 
    125131        } 
     
    132138            $display .= '<a href="' . get_edit_post_link( $next->ID ) . 
    133139                '" id="admin-post-nav-next" title="' . 
    134                 esc_attr( sprintf( __( 'Next %1$s: %2$s', self::$textdomain ), $context, $post_title ) ). 
     140                esc_attr( sprintf( __( 'Next %1$s: %2$s', 'admin-post-navigation' ), $context, $post_title ) ). 
    135141                '" class="admin-post-nav-next add-new-h2">' . self::$next_text . '</a>'; 
    136142        } 
     
    275281 
    276282endif; // end if !class_exists() 
    277  
    278 ?> 
  • admin-post-navigation/tags/1.7.1/readme.txt

    r476207 r555219  
    33Donate link: http://coffee2code.com/donate 
    44Tags: admin, navigation, post, next, previous, edit, post types, coffee2code 
     5License: GPLv2 or later 
     6License URI: http://www.gnu.org/licenses/gpl-2.0.html 
    57Requires at least: 3.0 
    6 Tested up to: 3.3 
    7 Stable tag: 1.7 
    8 Version: 1.7 
     8Tested up to: 3.4 
     9Stable tag: 1.7.1 
     10Version: 1.7.1 
    911 
    1012Adds links to navigate to the next and previous posts when editing a post in the WordPress admin. 
     
    1517Adds links to navigate to the next and previous posts when editing a post in the WordPress admin. 
    1618 
    17 This plugin adds "<< Previous" and "Next >>" 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. 
    18  
    19 Currently, 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. 
     19This 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 
     21By 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). 
    2022 
    2123NOTE: Be sure to save the post currently being edited before navigating away to the previous/next post. 
     
    131133== Changelog == 
    132134 
     135= 1.7.1 = 
     136* Use string instead of variable to specify translation textdomain 
     137* Re-license as GPLv2 or later (from X11) 
     138* Add 'License' and 'License URI' header tags to readme.txt and plugin file 
     139* Add banner image for plugin page 
     140* Remove ending PHP close tag 
     141* Minor documentation tweaks 
     142* Note compatibility through WP 3.4+ 
     143 
    133144= 1.7 = 
    134145* Add support for localization 
    135 * Change to use post type label instead of post type name, when possible, in link title attribute 
    136 * Change to use larr and rarr characters to denote direction of navigation 
     146* Use post type label instead of post type name, when possible, in link title attribute 
     147* Use larr/rarr characters to denote direction of navigation instead of larquo/rarquo 
    137148* Enhanced styling of navigation links 
    138149* Hook 'admin_enqueue_scripts' action instead of 'admin_head' to output CSS 
     
    145156* Drop compatibility with versions of WP older than 3.0 
    146157* Update screenshots for WP 3.3 
     158* Tweak plugin description 
    147159* Add link to plugin directory page to readme.txt 
    148160* Minor code reformatting 
     
    215227== Upgrade Notice == 
    216228 
     229= 1.7.1 = 
     230Trivial update: noted compatibility through WP 3.4+; explicitly stated license 
     231 
     232= 1.7 = 
     233Recommended update: enhanced styling of navigation links; added support for localization; noted compatibility through WP 3.3+; and more 
     234 
    217235= 1.6.1 = 
    218236Trivial update: noted compatibility through WP 3.2+ 
  • admin-post-navigation/trunk/admin-post-navigation.php

    r476207 r555219  
    33 * @package Admin_Post_Navigation 
    44 * @author Scott Reilly 
    5  * @version 1.7 
     5 * @version 1.7.1 
    66 */ 
    77/* 
    88Plugin Name: Admin Post Navigation 
    9 Version: 1.7 
     9Version: 1.7.1 
    1010Plugin URI: http://coffee2code.com/wp-plugins/admin-post-navigation/ 
    1111Author: Scott Reilly 
    12 Author URI: http://coffee2code.com 
     12Author URI: http://coffee2code.com/ 
    1313Text Domain: admin-post-navigation 
    1414Domain Path: /lang/ 
     15License: GPLv2 or later 
     16License URI: http://www.gnu.org/licenses/gpl-2.0.html 
    1517Description: Adds links to navigate to the next and previous posts when editing a post in the WordPress admin. 
    1618 
    17 Compatible with WordPress 3.0+, 3.1+, 3.2+, 3.3+. 
     19Compatible with WordPress 3.0 through 3.4+. 
    1820 
    1921=>> Read the accompanying readme.txt file for instructions and documentation. 
    2022=>> Also, visit the plugin's homepage for additional information and updates. 
    2123=>> Or visit: http://wordpress.org/extend/plugins/admin-post-navigation/ 
     24 
     25TODO: 
     26    * Add screen option allowing user selection of post navigation order 
    2227*/ 
    2328 
    2429/* 
    25 Copyright (c) 2008-2012 by Scott Reilly (aka coffee2code) 
    26  
    27 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation 
    28 files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, 
    29 modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the 
    30 Software is furnished to do so, subject to the following conditions: 
    31  
    32 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 
    33  
    34 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 
    35 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 
    36 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 
    37 IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
     30    Copyright (c) 2008-2012 by Scott Reilly (aka coffee2code) 
     31 
     32    This program is free software; you can redistribute it and/or 
     33    modify it under the terms of the GNU General Public License 
     34    as published by the Free Software Foundation; either version 2 
     35    of the License, or (at your option) any later version. 
     36 
     37    This program is distributed in the hope that it will be useful, 
     38    but WITHOUT ANY WARRANTY; without even the implied warranty of 
     39    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     40    GNU General Public License for more details. 
     41 
     42    You should have received a copy of the GNU General Public License 
     43    along with this program; if not, write to the Free Software 
     44    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA. 
    3845*/ 
    3946 
     
    4653    private static $post_statuses     = array( 'draft', 'future', 'pending', 'private', 'publish' ); // Filterable later 
    4754    private static $post_statuses_sql = ''; 
    48     private static $textdomain        = 'admin-post-navigation'; 
    4955 
    5056    /** 
     
    5460     */ 
    5561    public static function version() { 
    56         return '1.7'; 
     62        return '1.7.1'; 
    5763    } 
    5864 
     
    7177     */ 
    7278    public static function register_post_page_hooks() { 
    73         load_plugin_textdomain( self::$textdomain, false, basename( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR . 'lang' ); 
    74  
    75         self::$prev_text = __( '&larr; Previous', self::$textdomain ); 
    76         self::$next_text = __( 'Next &rarr;', self::$textdomain ); 
     79        load_plugin_textdomain( 'admin-post-navigation', false, basename( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR . 'lang' ); 
     80 
     81        self::$prev_text = __( '&larr; Previous', 'admin-post-navigation' ); 
     82        self::$next_text = __( 'Next &rarr;', 'admin-post-navigation' ); 
    7783 
    7884        add_action( 'admin_enqueue_scripts',      array( __CLASS__, 'add_css' ) ); 
     
    101107        $label = self::_get_post_type_label( $post_type ); 
    102108        if ( in_array( $post->post_status, $post_statuses ) ) 
    103             add_meta_box( 'adminpostnav', sprintf( __( '%s Navigation', self::$textdomain ), ucfirst( $post_type ) ), array( __CLASS__, 'add_meta_box' ), $post_type, 'side', 'core' ); 
     109            add_meta_box( 'adminpostnav', sprintf( __( '%s Navigation', 'admin-post-navigation' ), ucfirst( $post_type ) ), array( __CLASS__, 'add_meta_box' ), $post_type, 'side', 'core' ); 
    104110    } 
    105111 
     
    121127            $post_title = strip_tags( get_the_title( $prev->ID ) ); /* If only the_title_attribute() accepted post ID as arg */ 
    122128            $display .= '<a href="' . get_edit_post_link( $prev->ID ) . '" id="admin-post-nav-prev" title="' . 
    123                 esc_attr( sprintf( __( 'Previous %1$s: %2$s', self::$textdomain ), $context, $post_title ) ) . 
     129                esc_attr( sprintf( __( 'Previous %1$s: %2$s', 'admin-post-navigation' ), $context, $post_title ) ) . 
    124130                '" class="admin-post-nav-prev add-new-h2">' . self::$prev_text . '</a>'; 
    125131        } 
     
    132138            $display .= '<a href="' . get_edit_post_link( $next->ID ) . 
    133139                '" id="admin-post-nav-next" title="' . 
    134                 esc_attr( sprintf( __( 'Next %1$s: %2$s', self::$textdomain ), $context, $post_title ) ). 
     140                esc_attr( sprintf( __( 'Next %1$s: %2$s', 'admin-post-navigation' ), $context, $post_title ) ). 
    135141                '" class="admin-post-nav-next add-new-h2">' . self::$next_text . '</a>'; 
    136142        } 
     
    275281 
    276282endif; // end if !class_exists() 
    277  
    278 ?> 
  • admin-post-navigation/trunk/readme.txt

    r476207 r555219  
    33Donate link: http://coffee2code.com/donate 
    44Tags: admin, navigation, post, next, previous, edit, post types, coffee2code 
     5License: GPLv2 or later 
     6License URI: http://www.gnu.org/licenses/gpl-2.0.html 
    57Requires at least: 3.0 
    6 Tested up to: 3.3 
    7 Stable tag: 1.7 
    8 Version: 1.7 
     8Tested up to: 3.4 
     9Stable tag: 1.7.1 
     10Version: 1.7.1 
    911 
    1012Adds links to navigate to the next and previous posts when editing a post in the WordPress admin. 
     
    1517Adds links to navigate to the next and previous posts when editing a post in the WordPress admin. 
    1618 
    17 This plugin adds "<< Previous" and "Next >>" 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. 
    18  
    19 Currently, 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. 
     19This 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 
     21By 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). 
    2022 
    2123NOTE: Be sure to save the post currently being edited before navigating away to the previous/next post. 
     
    131133== Changelog == 
    132134 
     135= 1.7.1 = 
     136* Use string instead of variable to specify translation textdomain 
     137* Re-license as GPLv2 or later (from X11) 
     138* Add 'License' and 'License URI' header tags to readme.txt and plugin file 
     139* Add banner image for plugin page 
     140* Remove ending PHP close tag 
     141* Minor documentation tweaks 
     142* Note compatibility through WP 3.4+ 
     143 
    133144= 1.7 = 
    134145* Add support for localization 
    135 * Change to use post type label instead of post type name, when possible, in link title attribute 
    136 * Change to use larr and rarr characters to denote direction of navigation 
     146* Use post type label instead of post type name, when possible, in link title attribute 
     147* Use larr/rarr characters to denote direction of navigation instead of larquo/rarquo 
    137148* Enhanced styling of navigation links 
    138149* Hook 'admin_enqueue_scripts' action instead of 'admin_head' to output CSS 
     
    145156* Drop compatibility with versions of WP older than 3.0 
    146157* Update screenshots for WP 3.3 
     158* Tweak plugin description 
    147159* Add link to plugin directory page to readme.txt 
    148160* Minor code reformatting 
     
    215227== Upgrade Notice == 
    216228 
     229= 1.7.1 = 
     230Trivial update: noted compatibility through WP 3.4+; explicitly stated license 
     231 
     232= 1.7 = 
     233Recommended update: enhanced styling of navigation links; added support for localization; noted compatibility through WP 3.3+; and more 
     234 
    217235= 1.6.1 = 
    218236Trivial update: noted compatibility through WP 3.2+ 
Note: See TracChangeset for help on using the changeset viewer.