Plugin Directory

Changeset 566388


Ignore:
Timestamp:
07/02/2012 11:45:50 AM (14 years ago)
Author:
paddelboot
Message:

1.3.1b

Location:
3pagination
Files:
4 added
2 edited
6 copied

Legend:

Unmodified
Added
Removed
  • 3pagination/trunk/3pagination.php

    r566153 r566388  
    1616       
    1717        // Upon deactivation
    18         register_deactivation_hook( __FILE__, array( 'threepagination', 'deactivate' ) );
     18        register_uninstall_hook( __FILE__, array( 'threepagination', 'uninstall' ) );
    1919    }
    2020
     
    118118        /**
    119119         * Set frontend vars
     120         *
     121         * @TODO: Pages, Custom post types?
    120122         *
    121123         * @return type
     
    175177         * @since 0.1a
    176178         */
    177         public static function get( $pretty = TRUE, $max_num_pages = FALSE, $labels = TRUE, $css = 'classic' ) {
    178 
    179             global $wp_query, $wp;
    180 
     179        public static function get( $pretty = TRUE, $max_num_pages = FALSE, $labels = TRUE, $css = 'classic', $wp_query = FALSE ) {
     180
     181            global $wp;
     182       
     183            // Set current query object
     184            if ( FALSE == $wp_query || ! is_object( $wp_query ) )
     185                global $wp_query;
     186           
    181187            // Get global settings
    182188            $settings = get_option( '3pagination_settings' );
     
    303309         * @since 0.1a
    304310         */
    305         public static function draw( $pretty = TRUE, $max_num_pages = FALSE, $labels = TRUE, $css = 'classic' ) {
    306 
    307             echo self::get( $pretty, $max_num_pages, $labels, $css );
     311        public static function draw( $pretty = TRUE, $max_num_pages = FALSE, $labels = TRUE, $css = 'classic', $wp_query = FALSE ) {
     312
     313            echo self::get( $pretty, $max_num_pages, $labels, $css, $wp_query );
    308314        }
    309315
     
    381387         * @since 1.3b
    382388         */
    383         public static function deactivate() {
     389        public static function uninstall() {
    384390           
    385391            delete_option( '3pagination_settings' );
  • 3pagination/trunk/readme.txt

    r566157 r566388  
    44Requires at least: 3.3.2
    55Tested up to: 3.4.1
    6 Stable tag: 1.3b
     6Stable tag: 1.3.1b
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1919<li>Modify labels and CSS and preview pagination in backend before using it in your frontend pages!</li>
    2020<li>Both default and pretty permalink structure are supported</li>
    21 <li>So far, this code has been tested on index, archive, category and search pages of some of the most popular WordPress themes.</li>
     21<li>So far, this code has been tested on index, archive, custom post type archive, category and search pages of some of the most popular WordPress themes.</li>
    2222</ul>
    2323Please leave feedback, bug reports or comments at https://github.com/paddelboot/3pagination/issues
     
    9696- Fixed bug with pagination link;
    9797- Contextual help tab
    98 - Fixed bug with default URLs pagination links
     98- Fixed bug with default URLs pagination link
     99
     100= 1.3.1b =
     101- New function parameter $wp_query: support for custom query object
    99102
    100103== A brief Markdown Example ==
Note: See TracChangeset for help on using the changeset viewer.