Skip to content

Commit

Permalink
Minor update v1.9.3
Browse files Browse the repository at this point in the history
Fixed bug with beer-list shortcode pagination not working on index pages
  • Loading branch information
ErinMorelli committed Sep 14, 2013
1 parent 8b79f7d commit d6f045f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ This plugin allows beer creators from home brewers to professional breweries to
### Latest Release ###


#### [Version 1.9.2 - Major Bug Fix](https://github.com/ErinMorelli/em-beer-manager/releases/tag/v1.9.2) ###
* Fixed major issue with comments setting overriding site-wide comments
#### [Version 1.9.3 - Minor Bug Fix](https://github.com/ErinMorelli/em-beer-manager/releases/tag/v1.9.3) ###
* Fixed bug with beer-list shortcode pagination not working on index pages



Expand Down
7 changes: 5 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Contributors: ErinMorelli
Donate link: http://erinmorelli.com/wordpress/
Tags: beer, beers, brewery, untappd
Requires at least: 3.0.1
Tested up to: 3.6.0
Stable tag: 1.9.2
Tested up to: 3.6.1
Stable tag: 1.9.3
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -148,6 +148,9 @@ Try refreshing your permalinks by going to "Settings" -> "Permalinks" and clicki

== Changelog ==

= 1.9.3 =
* Fixed bug with beer-list shortcode pagination not working on index pages

= 1.9.2 =
* Fixed major issue with comments setting overriding site-wide comments

Expand Down
4 changes: 2 additions & 2 deletions em-beer-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: EM Beer Manager
* Plugin URI: http://erinmorelli.com/wordpress/em-beer-manager
* Description: Catalog and display your beers with WordPress. Integrates very simply with Untappd for individual beer checkins. Great for everyone from home brewers to professional breweries!
* Version: 1.9.2
* Version: 1.9.3
* Author: Erin Morelli
* Author URI: http://erinmorelli.com/
* License: GPLv2 or later
Expand Down Expand Up @@ -45,7 +45,7 @@ function embm_plugin_load(){

function embm_plugin_activation() {
// Check for new version
$embm_curr_version = '1.9.2';
$embm_curr_version = '1.9.3';

if (!defined('EMBM_VERSION_KEY')) {
// Define new version option
Expand Down
12 changes: 10 additions & 2 deletions includes/output.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,16 @@ function embm_beer_list_output ($beers) {
$output = '';

// Set up new loop data
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
global $post;

if ( get_query_var('paged') ) {
$paged = get_query_var('paged');
} else if ( get_query_var('page') ) {
$paged = get_query_var('page');
} else {
$paged = 1;
}

$wp_query = new WP_Query();

// The query
Expand Down Expand Up @@ -188,7 +196,7 @@ function embm_beer_list_output ($beers) {
$output .= paginate_links( array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?paged=%#%',
'current' => max( 1, get_query_var('paged') ),
'current' => max( 1, $paged ),
'total' => $wp_query->max_num_pages
) );

Expand Down

0 comments on commit d6f045f

Please sign in to comment.