WooCommerce Products Per Page - Version 1.2.1

Version Description

  • 05/08/2015 =

  • Fix - GET method remembers query parameter strings

Download this release

Release Info

Developer sormano
Plugin Icon 128x128 WooCommerce Products Per Page
Version 1.2.1
Comparing to
See all releases

Code changes from version 1.2.0 to 1.2.1

includes/class-wppp-front-end.php CHANGED
@@ -71,7 +71,7 @@ class WPPP_Front_End {
71
 
72
  // Set action url if option behaviour is true
73
  // Paste QUERY string after for filter and orderby support
74
- $query_string = ! empty( $_SERVER['QUERY_STRING'] ) ? '?' . add_query_arg( array( 'wppp_ppp' => false ), $_SERVER['QUERY_STRING'] ) : null;
75
 
76
  if ( isset( $cat->term_id ) && isset( $cat->taxonomy ) && 'yes' == get_option( 'wppp_return_to_first', 'no' ) ) :
77
  $action = get_term_link( $cat->term_id, $cat->taxonomy ) . $query_string;
@@ -86,7 +86,7 @@ class WPPP_Front_End {
86
 
87
  do_action( 'wppp_before_dropdown_form' );
88
 
89
- ?><form method="<?php echo $method; ?>" action="<?php echo esc_url( $action ); ?>" style='float: right; margin-left: 5px;' class="form-wppp-select products-per-page"><?php
90
 
91
  do_action( 'wppp_before_dropdown' );
92
 
@@ -103,6 +103,21 @@ class WPPP_Front_End {
103
 
104
  ?></select><?php
105
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  do_action( 'wppp_after_dropdown' );
107
 
108
  ?></form><?php
71
 
72
  // Set action url if option behaviour is true
73
  // Paste QUERY string after for filter and orderby support
74
+ $query_string = ! empty( $_SERVER['QUERY_STRING'] ) ? '?' . add_query_arg( array( 'ppp' => false ), $_SERVER['QUERY_STRING'] ) : null;
75
 
76
  if ( isset( $cat->term_id ) && isset( $cat->taxonomy ) && 'yes' == get_option( 'wppp_return_to_first', 'no' ) ) :
77
  $action = get_term_link( $cat->term_id, $cat->taxonomy ) . $query_string;
86
 
87
  do_action( 'wppp_before_dropdown_form' );
88
 
89
+ ?><form method="<?php echo esc_attr( $method ); ?>" action="<?php echo esc_url( $action ); ?>" style='float: right; margin-left: 5px;' class="form-wppp-select products-per-page"><?php
90
 
91
  do_action( 'wppp_before_dropdown' );
92
 
103
 
104
  ?></select><?php
105
 
106
+ // Keep query string vars intact
107
+ foreach ( $_GET as $key => $val ) :
108
+
109
+ if ( 'ppp' === $key || 'submit' === $key ) :
110
+ continue;
111
+ endif;
112
+ if ( is_array( $val ) ) :
113
+ foreach( $val as $inner_val ) :
114
+ ?><input type="hidden" name="<?php echo esc_attr( $key ); ?>[]" value="<?php echo esc_attr( $inner_val ); ?>" /><?php
115
+ endforeach;
116
+ else :
117
+ ?><input type="hidden" name="<?php echo esc_attr( $key ); ?>" value="<?php echo esc_attr( $val ); ?>" /><?php
118
+ endif;
119
+ endforeach;
120
+
121
  do_action( 'wppp_after_dropdown' );
122
 
123
  ?></form><?php
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: sormano
3
  Donate link: http://www.jeroensormani.com/donate/
4
  Tags: Products per page, woocommerce products, woocommerce products per page, woocommerce displayed products, woocommerce quantity products, woocommerce amount of products, woocommerce number of products, woocommerce shown products
5
- Requires at least: 3.7.0
6
- Tested up to: 4.2.2
7
- Stable tag: 1.2.0
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -47,6 +47,10 @@ Options like:
47
 
48
  == Changelog ==
49
 
 
 
 
 
50
  = 1.2.0 - 12/06/2015 =
51
 
52
  * Improvement - Structural changes to the plugin
2
  Contributors: sormano
3
  Donate link: http://www.jeroensormani.com/donate/
4
  Tags: Products per page, woocommerce products, woocommerce products per page, woocommerce displayed products, woocommerce quantity products, woocommerce amount of products, woocommerce number of products, woocommerce shown products
5
+ Requires at least: 3.8.0
6
+ Tested up to: 4.3
7
+ Stable tag: 1.2.1
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
47
 
48
  == Changelog ==
49
 
50
+ = 1.2.1 - 05/08/2015 =
51
+
52
+ * Fix - GET method remembers query parameter strings
53
+
54
  = 1.2.0 - 12/06/2015 =
55
 
56
  * Improvement - Structural changes to the plugin
screenshot-1.png CHANGED
Binary file
screenshot-3.png CHANGED
Binary file
woocommerce-products-per-page.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Woocommerce Products Per Page
4
  * Plugin URI: http://www.jeroensormani.com/
5
  * Description: Integrate a 'products per page' dropdown on your WooCommerce website! Set-up in <strong>seconds</strong>!
6
- * Version: 1.2.0
7
  * Author: Jeroen Sormani
8
  * Author URI: http://www.jeroensormani.com
9
 
@@ -47,7 +47,7 @@ class Woocommerce_Products_Per_Page {
47
  * @since 1.2.0
48
  * @var string $version Plugin version number.
49
  */
50
- public $version = '1.2.0';
51
 
52
 
53
  /**
3
  * Plugin Name: Woocommerce Products Per Page
4
  * Plugin URI: http://www.jeroensormani.com/
5
  * Description: Integrate a 'products per page' dropdown on your WooCommerce website! Set-up in <strong>seconds</strong>!
6
+ * Version: 1.2.1
7
  * Author: Jeroen Sormani
8
  * Author URI: http://www.jeroensormani.com
9
 
47
  * @since 1.2.0
48
  * @var string $version Plugin version number.
49
  */
50
+ public $version = '1.2.1';
51
 
52
 
53
  /**