WooCommerce Products Per Page - Version 1.1.7

Version Description

  • 25/04/2015 =

  • Improvement - Add url escaping

  • Add - Spanish translation

  • Add - Danish translation

Download this release

Release Info

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

Code changes from version 1.1.6 to 1.1.7

includes/class-wppp-dropdown.php CHANGED
@@ -78,9 +78,9 @@ class WPPP_Dropdown {
78
  $query_string = ! empty( $_SERVER['QUERY_STRING'] ) ? '?' . add_query_arg( array( 'wppp_ppp' => false ), $_SERVER['QUERY_STRING'] ) : null;
79
 
80
  if ( isset( $cat->term_id ) && isset( $cat->taxonomy ) && isset( $this->settings['behaviour'] ) && true == $this->settings['behaviour'] ) :
81
- $action = ' action="' . get_term_link( $cat->term_id, $cat->taxonomy ) . $query_string . '"';
82
  elseif ( isset( $this->settings['behaviour'] ) && true == $this->settings['behaviour'] ) :
83
- $action = 'action="' . get_permalink( woocommerce_get_page_id( 'shop' ) ) . $query_string . '"';
84
  endif;
85
 
86
  $method = 'post'; // default
@@ -93,20 +93,19 @@ class WPPP_Dropdown {
93
 
94
  do_action( 'wppp_before_dropdown_form' );
95
 
96
- ?><form method="<?php echo $method; ?>" <?php echo $action; ?> style='float: right; margin-left: 5px;' class="form-wppp-select products-per-page"><?php
97
 
98
  do_action( 'wppp_before_dropdown' );
99
 
100
  ?><select name="wppp_ppp" onchange="this.form.submit()" class="select wppp-select"><?php
101
 
102
-
103
  foreach( $products_per_page_options as $key => $value ) :
104
 
105
  // Get the right match for the selected option
106
  $ppp_session = WC()->session->get( 'products_per_page' );
107
- if( isset( $_POST['wppp_ppp'] ) ) :
108
  $selected_match = $_POST['wppp_ppp'];
109
- elseif( isset( $_GET['wppp_ppp'] ) ):
110
  $selected_match = $_GET['wppp_ppp'];
111
  elseif ( ! empty( $ppp_session ) ) :
112
  $selected_match = $ppp_session;
@@ -114,15 +113,13 @@ class WPPP_Dropdown {
114
  $selected_match = $this->settings['default_ppp'];
115
  endif;
116
 
 
117
 
118
- ?><option value="<?php echo $value; ?>" <?php selected( $value, $selected_match ); ?>>
119
- <?php
120
  $ppp_text = apply_filters( 'wppp_ppp_text', __( '%s products per page', 'woocommerce-products-per-page' ), $value );
121
  printf( $ppp_text, $value == -1 ? __( 'All', 'woocommerce-products-per-page' ) : $value ); // Set to 'All' when value is -1
122
 
123
  ?></option><?php
124
 
125
-
126
  endforeach;
127
 
128
  ?></select><?php
78
  $query_string = ! empty( $_SERVER['QUERY_STRING'] ) ? '?' . add_query_arg( array( 'wppp_ppp' => false ), $_SERVER['QUERY_STRING'] ) : null;
79
 
80
  if ( isset( $cat->term_id ) && isset( $cat->taxonomy ) && isset( $this->settings['behaviour'] ) && true == $this->settings['behaviour'] ) :
81
+ $action = get_term_link( $cat->term_id, $cat->taxonomy ) . $query_string;
82
  elseif ( isset( $this->settings['behaviour'] ) && true == $this->settings['behaviour'] ) :
83
+ $action = get_permalink( woocommerce_get_page_id( 'shop' ) ) . $query_string;
84
  endif;
85
 
86
  $method = 'post'; // default
93
 
94
  do_action( 'wppp_before_dropdown_form' );
95
 
96
+ ?><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
97
 
98
  do_action( 'wppp_before_dropdown' );
99
 
100
  ?><select name="wppp_ppp" onchange="this.form.submit()" class="select wppp-select"><?php
101
 
 
102
  foreach( $products_per_page_options as $key => $value ) :
103
 
104
  // Get the right match for the selected option
105
  $ppp_session = WC()->session->get( 'products_per_page' );
106
+ if ( isset( $_POST['wppp_ppp'] ) ) :
107
  $selected_match = $_POST['wppp_ppp'];
108
+ elseif ( isset( $_GET['wppp_ppp'] ) ):
109
  $selected_match = $_GET['wppp_ppp'];
110
  elseif ( ! empty( $ppp_session ) ) :
111
  $selected_match = $ppp_session;
113
  $selected_match = $this->settings['default_ppp'];
114
  endif;
115
 
116
+ ?><option value="<?php echo esc_attr( $value ); ?>" <?php selected( $value, $selected_match ); ?>><?php
117
 
 
 
118
  $ppp_text = apply_filters( 'wppp_ppp_text', __( '%s products per page', 'woocommerce-products-per-page' ), $value );
119
  printf( $ppp_text, $value == -1 ? __( 'All', 'woocommerce-products-per-page' ) : $value ); // Set to 'All' when value is -1
120
 
121
  ?></option><?php
122
 
 
123
  endforeach;
124
 
125
  ?></select><?php
languages/woocommerce-products-per-page-da_DK.mo ADDED
Binary file
languages/woocommerce-products-per-page-da_DK.po ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Woocommerce Products Per Page v1.1.6\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: \n"
6
+ "PO-Revision-Date: 2015-03-25 09:30:11+0000\n"
7
+ "Last-Translator: kelderkold <keld@slotworld.dk>\n"
8
+ "Language-Team: \n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
+ "X-Generator: CSL v1.x\n"
14
+ "X-Poedit-Language: Danish\n"
15
+ "X-Poedit-Country: DENMARK\n"
16
+ "X-Poedit-SourceCharset: utf-8\n"
17
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
18
+ "X-Poedit-Basepath: ../\n"
19
+ "X-Poedit-Bookmarks: \n"
20
+ "X-Poedit-SearchPath-0: .\n"
21
+ "X-Textdomain-Support: yes"
22
+
23
+ #: includes/class-wppp-dropdown.php:120
24
+ #, php-format
25
+ #@ woocommerce-products-per-page
26
+ msgid "%s products per page"
27
+ msgstr "%s produkter pr. side"
28
+
29
+ #: includes/class-wppp-dropdown.php:121
30
+ #@ woocommerce-products-per-page
31
+ msgid "All"
32
+ msgstr "Alle"
33
+
34
+ #: includes/class-wppp-settings.php:55
35
+ #@ woocommerce-products-per-page
36
+ msgid "Dropdown location"
37
+ msgstr "Rullemenu lokation"
38
+
39
+ #: includes/class-wppp-settings.php:63
40
+ #@ woocommerce-products-per-page
41
+ msgid "List of dropdown options"
42
+ msgstr "Valg muligheder i rullemenuen"
43
+
44
+ #: includes/class-wppp-settings.php:71
45
+ #@ woocommerce-products-per-page
46
+ msgid "Default products per page"
47
+ msgstr "Standard antal produkter pr. side"
48
+
49
+ #: includes/class-wppp-settings.php:79
50
+ #@ woocommerce-products-per-page
51
+ msgid "Shop columns"
52
+ msgstr "Butik kolonner"
53
+
54
+ #: includes/class-wppp-settings.php:87
55
+ #@ woocommerce-products-per-page
56
+ msgid "First category page"
57
+ msgstr "Første kategori side"
58
+
59
+ #: includes/class-wppp-settings.php:95
60
+ #@ woocommerce-products-per-page
61
+ msgid "HTTP method"
62
+ msgstr "HTTP metode"
63
+
64
+ #: includes/class-wppp-settings.php:115
65
+ #@ woocommerce-products-per-page
66
+ msgid "WooCommerce Products Per Page"
67
+ msgstr "WooCommerce produkter pr. side"
68
+
69
+ #: includes/class-wppp-settings.php:142
70
+ #@ woocommerce-products-per-page
71
+ msgid "Top"
72
+ msgstr "Top"
73
+
74
+ #: includes/class-wppp-settings.php:145
75
+ #@ woocommerce-products-per-page
76
+ msgid "Bottom"
77
+ msgstr "Bund"
78
+
79
+ #: includes/class-wppp-settings.php:148
80
+ #@ woocommerce-products-per-page
81
+ msgid "Top/Bottom"
82
+ msgstr "Top/Bund"
83
+
84
+ #: includes/class-wppp-settings.php:151
85
+ #@ woocommerce-products-per-page
86
+ msgid "None"
87
+ msgstr "Ingen"
88
+
89
+ #: includes/class-wppp-settings.php:170
90
+ #@ woocommerce-products-per-page
91
+ msgid "Seperated by spaces <em>(-1 for all products)</em>"
92
+ msgstr "Separeret af mellemrum <em>(-1 for alle produkter)</em>"
93
+
94
+ #: includes/class-wppp-settings.php:186
95
+ #@ woocommerce-products-per-page
96
+ msgid "-1 for all products"
97
+ msgstr "-1 for alle produkter"
98
+
99
+ #: includes/class-wppp-settings.php:219
100
+ #@ woocommerce-products-per-page
101
+ msgid "When checked and a new number of PPP is selected, the visitor will be send to the first page of the product category"
102
+ msgstr "Hvis afkrydset og et nyt antal af produkter pr. side er valgt, vil den besøgende blive sendt til den første side i den valgte produkt kategori"
103
+
104
+ #: includes/class-wppp-settings.php:273
105
+ #@ woocommerce-products-per-page
106
+ msgid "POST"
107
+ msgstr "SEND"
108
+
109
+ #: includes/class-wppp-settings.php:274
110
+ #@ woocommerce-products-per-page
111
+ msgid "GET"
112
+ msgstr "HENT"
113
+
114
+ #: includes/class-wppp-settings.php:276
115
+ #@ woocommerce-products-per-page
116
+ msgid "GET sends the products per page via the url, POST does this on the background"
117
+ msgstr "HENT sender produkter pr. side via url, SEND gør dette i baggrunden"
118
+
119
+ #: includes/class-wppp-settings.php:289
120
+ #@ woocommerce-products-per-page
121
+ msgid "Configure the WooCommerce Product Per Page settings here."
122
+ msgstr "Konfigurer WooCommerce produkter pr. side indstillinger her."
123
+
languages/woocommerce-products-per-page-es_ES.mo ADDED
Binary file
languages/woocommerce-products-per-page-es_ES.po ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: WooCommerce Products Per Page 1.0.1\n"
4
+ "POT-Creation-Date: 2014-03-15 14:13+0100\n"
5
+ "PO-Revision-Date: \n"
6
+ "Last-Translator: \n"
7
+ "Language-Team: Jeroen Sormani <jeroen.sormani@gmail.com>\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "X-Generator: Poedit 1.6.4\n"
12
+ "X-Poedit-KeywordsList: __;_e\n"
13
+ "X-Poedit-Basepath: /Users/Jeroen/plugins/woocommerce-products-per-page/"
14
+ "trunk/\n"
15
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
+ "X-Poedit-SourceCharset: UTF-8\n"
17
+ "Language: es_ES\n"
18
+ "X-Poedit-SearchPath-0: /Users/Jeroen/plugins/woocommerce-products-per-page/"
19
+ "trunk\n"
20
+
21
+ #: /Users/Jeroen/plugins/woocommerce-products-per-page/trunk/admin/options-page.php:27
22
+ msgid "Dropdown location"
23
+ msgstr "Ubicación del selector"
24
+
25
+ #: /Users/Jeroen/plugins/woocommerce-products-per-page/trunk/admin/options-page.php:35
26
+ msgid "List of dropdown options"
27
+ msgstr "Lista de opciones del selector"
28
+
29
+ #: /Users/Jeroen/plugins/woocommerce-products-per-page/trunk/admin/options-page.php:43
30
+ msgid "Default products per page"
31
+ msgstr "Productos por página por defecto"
32
+
33
+ #: /Users/Jeroen/plugins/woocommerce-products-per-page/trunk/admin/options-page.php:51
34
+ msgid "Shop columns"
35
+ msgstr "Columnas de la tienda"
36
+
37
+ #: /Users/Jeroen/plugins/woocommerce-products-per-page/trunk/admin/options-page.php:59
38
+ msgid "First category page"
39
+ msgstr "Primera página de categoría"
40
+
41
+ #: /Users/Jeroen/plugins/woocommerce-products-per-page/trunk/admin/options-page.php:73
42
+ msgid "WooCommerce Products Per Page"
43
+ msgstr "Productos por página de Woocommerce"
44
+
45
+ #: /Users/Jeroen/plugins/woocommerce-products-per-page/trunk/admin/options-page.php:92
46
+ msgid "Top"
47
+ msgstr "Arriba"
48
+
49
+ #: /Users/Jeroen/plugins/woocommerce-products-per-page/trunk/admin/options-page.php:93
50
+ msgid "Bottom"
51
+ msgstr "Abajo"
52
+
53
+ #: /Users/Jeroen/plugins/woocommerce-products-per-page/trunk/admin/options-page.php:94
54
+ msgid "Top/Bottom"
55
+ msgstr "Arriba y abajo"
56
+
57
+ #: /Users/Jeroen/plugins/woocommerce-products-per-page/trunk/admin/options-page.php:95
58
+ msgid "None"
59
+ msgstr "Ninguna"
60
+
61
+ #: /Users/Jeroen/plugins/woocommerce-products-per-page/trunk/admin/options-page.php:107
62
+ msgid "Seperated by spaces <em>(-1 for all products)</em>"
63
+ msgstr "Separado por espacios <em>(-1 para todos los productos)</em>"
64
+
65
+ #: /Users/Jeroen/plugins/woocommerce-products-per-page/trunk/admin/options-page.php:118
66
+ msgid "-1 for all products"
67
+ msgstr "-1 para todos los productos"
68
+
69
+ #: /Users/Jeroen/plugins/woocommerce-products-per-page/trunk/admin/options-page.php:140
70
+ msgid ""
71
+ "When checked and a new number of PPP is selected, the visitor will be send "
72
+ "to the first page of the product category"
73
+ msgstr ""
74
+ "Cuando esté seleccionado y se modifique el numero de productos por página, "
75
+ "se enviará al visitante a la primera página de la categoría de productos"
76
+
77
+ #: /Users/Jeroen/plugins/woocommerce-products-per-page/trunk/admin/options-page.php:187
78
+ msgid "Configure the WooCommerce Product Per Page settings here."
79
+ msgstr "Configure los ajustes de Product Per Page para Woocommerce aqui"
80
+
81
+ #: /Users/Jeroen/plugins/woocommerce-products-per-page/trunk/objects/wppp-dropdown.php:49
82
+ #, php-format
83
+ msgid "%s products per page"
84
+ msgstr "%s productos por página"
85
+
86
+ #: /Users/Jeroen/plugins/woocommerce-products-per-page/trunk/objects/wppp-dropdown.php:50
87
+ msgid "All"
88
+ msgstr "Todos los"
readme.txt CHANGED
@@ -3,8 +3,8 @@ 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.6.0
6
- Tested up to: 4.1
7
- Stable tag: 1.1.6
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -27,6 +27,8 @@ Options like:
27
  - French [(whoaloic)](http://profiles.wordpress.org/whoaloic)
28
  - Persian [(amir_tara67)](http://profiles.wordpress.org/amir_tara67)
29
  - Deutsch [(Michael)](http://profiles.wordpress.org/blogprofis/)
 
 
30
 
31
 
32
  == Installation ==
@@ -44,6 +46,12 @@ Options like:
44
 
45
  == Changelog ==
46
 
 
 
 
 
 
 
47
  = 1.1.6 - 20/03/2015 =
48
 
49
  * Improvement/fix - Setting the per_page query object. Preventing/fixing notices.
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.6.0
6
+ Tested up to: 4.2
7
+ Stable tag: 1.1.7
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
27
  - French [(whoaloic)](http://profiles.wordpress.org/whoaloic)
28
  - Persian [(amir_tara67)](http://profiles.wordpress.org/amir_tara67)
29
  - Deutsch [(Michael)](http://profiles.wordpress.org/blogprofis/)
30
+ - Danish [(Keld)](https://profiles.wordpress.org/kelderkold/)
31
+ - Spanish
32
 
33
 
34
  == Installation ==
46
 
47
  == Changelog ==
48
 
49
+ = 1.1.7 - 25/04/2015 =
50
+
51
+ * Improvement - Add url escaping
52
+ * Add - Spanish translation
53
+ * Add - Danish translation
54
+
55
  = 1.1.6 - 20/03/2015 =
56
 
57
  * Improvement/fix - Setting the per_page query object. Preventing/fixing notices.
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.1.6
7
  * Author: Jeroen Sormani
8
  * Author URI: http://www.jeroensormani.com
9
 
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.1.7
7
  * Author: Jeroen Sormani
8
  * Author URI: http://www.jeroensormani.com
9