WordPress.org

Plugin Directory

Changeset 597475


Ignore:
Timestamp:
09/11/12 13:12:26 (19 months ago)
Author:
Latz
Message:

Fixed: Problem with manual insertion of pagebar and parameter error

Location:
pagebar/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pagebar/trunk/pagebar2.php

    r596959 r597475  
    44Plugin URI: http://www.elektroelch.de/hacks/wp/pagebar 
    55Description: Adds an advanced page navigation to Wordpress. 
    6 Version: 2.60 
     6Version: 2.60.1 
    77Requires at least: 3.3 
    88Tested up to: 3.5 
     
    4646} 
    4747/* -------------------------------------------------------------------------- */ 
    48 function postbar($query) { 
     48function automagic_postbar($query) { 
    4949    global $paged, $wp_query, $pbOptions; 
    5050 
    5151    // no automagic insert if we're not in the main loop 
    52     //if ( $pbOptions['auto'] && ! ($wp_the_query === $array) )  
    5352    if ( $pbOptions['auto'] && ! ($query->is_main_query()) )         
    5453        return; 
     54 
     55    postbar(); 
     56     
     57} 
     58/* -------------------------------------------------------------------------------------------- */ 
     59function postbar() { 
     60    global $paged, $wp_query, $pbOptions; 
    5561 
    5662    require_once('class-postbar.php'); 
     
    5965} 
    6066/* -------------------------------------------------------------------------------------------- */ 
    61 function pagebar($array) {  // for compatibility with pagebar v2.21 
    62     postbar($array); 
    63 } 
    64 /* -------------------------------------------------------------------------------------------- */ 
    65 function wp_pagebar($array) {  // for compatibility with pagebar v2.21 
    66         postbar($array); 
     67function pagebar() {  // for compatibility with pagebar v2.21 
     68    postbar(); 
     69} 
     70/* -------------------------------------------------------------------------------------------- */ 
     71function wp_pagebar() {  // for compatibility with pagebar v2.21 
     72        postbar(); 
    6773} 
    6874/* -------------------------------------------------------------------------------------------- */ 
     
    224230if ($pbOptions ['auto'] && in_array($pagenow, array("index.php"))) { 
    225231    if ($pbOptions ["bef_loop"] == "on") 
    226         add_action ( 'loop_start', 'pagebar' ); 
     232        add_action ( 'loop_start', 'automagic_postbar' ); 
    227233    if ($pbOptions ["aft_loop"] == "on") 
    228         add_action ( 'loop_end', 'pagebar' ); 
     234        add_action ( 'loop_end', 'automagic_postbar' ); 
    229235    if ($pbOptions ["footer"] == "on") 
    230                 add_action ( 'wp_footer', 'pagebar' ); 
     236                add_action ( 'wp_footer', 'automagic_postbar' ); 
    231237    if ($pbOptions ["remove"] == "on") 
    232238        add_action ( 'wp_head', 'pb_remove_nav' ); 
  • pagebar/trunk/readme.txt

    r596959 r597475  
    1 === pagebar === 
     1=== pagebar === 
    22Contributors: Lutz Schroeer 
    33Donate link: http://elektroelch.de 
     
    213213 
    214214== Changelog == 
     215= 2.60.1 = 
     216* Fixed: Problem with manual insertion of pagebar and parameter error 
     217 
    215218= 2.60 = 
    216219+ Added: some actions (*_before, *_after) 
Note: See TracChangeset for help on using the changeset viewer.