Version Description
- Fixed sort_answers_by_votes_asc_callback() bug
Download this release
Release Info
Developer | yourownprogrammer |
Plugin | YOP Poll |
Version | 1.5 |
Comparing to | |
See all releases |
Code changes from version 1.4 to 1.5
- inc/yop_poll_model.php +3 -3
- readme.txt +2 -0
- yop_poll.php +3 -3
inc/yop_poll_model.php
CHANGED
@@ -787,8 +787,8 @@
|
|
787 |
}
|
788 |
}
|
789 |
if ( $is_votes_sort ) {
|
790 |
-
$order_dir = ( '' == $order_dir ) ? 'asc' : $order_dir;
|
791 |
-
usort($answers, "
|
792 |
}
|
793 |
return $answers;
|
794 |
}
|
@@ -2244,7 +2244,7 @@
|
|
2244 |
elseif( 'random' == $poll_options['sorting_answers'] ) {
|
2245 |
$answers = self::get_poll_answers( $poll_id, array('default'), 'rand()' );
|
2246 |
}
|
2247 |
-
elseif( 'votes' == $poll_options['
|
2248 |
$order_dir = 'asc';
|
2249 |
if( isset( $poll_options['sorting_answers_direction'] ) )
|
2250 |
$order_dir = ('asc' == $poll_options['sorting_answers_direction']) ? 'asc' : 'desc';
|
787 |
}
|
788 |
}
|
789 |
if ( $is_votes_sort ) {
|
790 |
+
$order_dir = ( '' == $order_dir ) ? 'asc' : $order_dir;
|
791 |
+
usort($answers, array( 'Yop_Poll_Model', "sort_answers_by_votes_".$order_dir."_callback" ) );
|
792 |
}
|
793 |
return $answers;
|
794 |
}
|
2244 |
elseif( 'random' == $poll_options['sorting_answers'] ) {
|
2245 |
$answers = self::get_poll_answers( $poll_id, array('default'), 'rand()' );
|
2246 |
}
|
2247 |
+
elseif( 'votes' == $poll_options['sorting_answers'] ) {
|
2248 |
$order_dir = 'asc';
|
2249 |
if( isset( $poll_options['sorting_answers_direction'] ) )
|
2250 |
$order_dir = ('asc' == $poll_options['sorting_answers_direction']) ? 'asc' : 'desc';
|
readme.txt
CHANGED
@@ -136,6 +136,8 @@ This plugin was especially designed for flexibility and it is very easy to use.
|
|
136 |
|
137 |
== Changelog ==
|
138 |
|
|
|
|
|
139 |
|
140 |
= 1.4 =
|
141 |
* Fixed compatibility issues with other plugins
|
136 |
|
137 |
== Changelog ==
|
138 |
|
139 |
+
= 1.5 =
|
140 |
+
* Fixed sort_answers_by_votes_asc_callback() bug
|
141 |
|
142 |
= 1.4 =
|
143 |
* Fixed compatibility issues with other plugins
|
yop_poll.php
CHANGED
@@ -5,10 +5,10 @@
|
|
5 |
Description: Use a full option polling functionality to get the answers you need. YOP Poll is the perfect, easy to use plugin for your WordPress website.
|
6 |
Author: yourownprogrammer
|
7 |
Author URL: http://www.yourownprogrammer.com
|
8 |
-
Version: 1.
|
9 |
*/
|
10 |
define( 'YOP_POLL_WP_VERSION', '3.4.2' );
|
11 |
-
define( 'YOP_POLL_VERSION', '1.
|
12 |
define( 'YOP_POLL_PATH', plugin_dir_path( __FILE__ ) );
|
13 |
define( 'YOP_POLL_URL', plugins_url( '', __FILE__ ) );
|
14 |
define( 'YOP_POLL_PLUGIN_FILE', plugin_basename( __FILE__ ) );
|
@@ -27,7 +27,7 @@
|
|
27 |
|
28 |
#Yop Poll Tables Name
|
29 |
global $wpdb;
|
30 |
-
$wpdb->yop_poll_version = "1.
|
31 |
$wpdb->yop_polls = $wpdb->prefix . 'yop_polls';
|
32 |
$wpdb->yop_poll_answers = $wpdb->prefix . 'yop_poll_answers';
|
33 |
$wpdb->yop_poll_templates = $wpdb->prefix . 'yop_poll_templates';
|
5 |
Description: Use a full option polling functionality to get the answers you need. YOP Poll is the perfect, easy to use plugin for your WordPress website.
|
6 |
Author: yourownprogrammer
|
7 |
Author URL: http://www.yourownprogrammer.com
|
8 |
+
Version: 1.5
|
9 |
*/
|
10 |
define( 'YOP_POLL_WP_VERSION', '3.4.2' );
|
11 |
+
define( 'YOP_POLL_VERSION', '1.5' );
|
12 |
define( 'YOP_POLL_PATH', plugin_dir_path( __FILE__ ) );
|
13 |
define( 'YOP_POLL_URL', plugins_url( '', __FILE__ ) );
|
14 |
define( 'YOP_POLL_PLUGIN_FILE', plugin_basename( __FILE__ ) );
|
27 |
|
28 |
#Yop Poll Tables Name
|
29 |
global $wpdb;
|
30 |
+
$wpdb->yop_poll_version = "1.5";
|
31 |
$wpdb->yop_polls = $wpdb->prefix . 'yop_polls';
|
32 |
$wpdb->yop_poll_answers = $wpdb->prefix . 'yop_poll_answers';
|
33 |
$wpdb->yop_poll_templates = $wpdb->prefix . 'yop_poll_templates';
|