From 7f0e6d023ad79c99ad809b5aa8a17cddbd74d300 Mon Sep 17 00:00:00 2001
From: Kathy Darling
Date: Sat, 24 Jan 2015 12:27:06 +0100
Subject: [PATCH 1/2] add per_row to widget
---
classes/class-woothemes-widget-our-team.php | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/classes/class-woothemes-widget-our-team.php b/classes/class-woothemes-widget-our-team.php
index c43a8a6..9699513 100755
--- a/classes/class-woothemes-widget-our-team.php
+++ b/classes/class-woothemes-widget-our-team.php
@@ -103,6 +103,10 @@ public function widget( $args, $instance ) {
$args['size'] = intval( $instance['size'] );
}
+ if ( isset( $instance['per_row'] ) && ( 0 < count( $instance['per_row'] ) ) ) {
+ $args['per_row'] = intval( $instance['per_row'] );
+ }
+
if ( isset( $instance['category'] ) && is_numeric( $instance['category'] ) ) {
$args['category'] = intval( $instance['category'] );
}
@@ -169,6 +173,7 @@ public function update ( $new_instance, $old_instance ) {
$instance['limit'] = intval( $new_instance['limit'] );
$instance['specific_id'] = intval( $new_instance['specific_id'] );
$instance['size'] = intval( $new_instance['size'] );
+ $instance['per_row'] = intval( $new_instance['per_row'] );
$instance['category'] = intval( $new_instance['category'] );
/* The select box is returning a text value, so we escape it. */
@@ -211,6 +216,7 @@ public function form( $instance ) {
'effect' => 'fade', // Options: 'fade', 'none'
'pagination' => false,
'size' => 50,
+ 'per_row' => 3,
'category' => 0
);
@@ -227,6 +233,12 @@ public function form( $instance ) {
+
+
+
+
+
+
From db3eb2077535c4344f10a56038b07d9c55d4f1c4 Mon Sep 17 00:00:00 2001
From: Kathy Darling
Date: Sat, 24 Jan 2015 14:55:28 +0100
Subject: [PATCH 2/2] convert inputs to number inputs
---
classes/class-woothemes-widget-our-team.php | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/classes/class-woothemes-widget-our-team.php b/classes/class-woothemes-widget-our-team.php
index 9699513..a94f9cb 100755
--- a/classes/class-woothemes-widget-our-team.php
+++ b/classes/class-woothemes-widget-our-team.php
@@ -227,12 +227,11 @@ public function form( $instance ) {
-
+
-
+
-
@@ -241,7 +240,7 @@ public function form( $instance ) {
-
+