Version Description
Download this release
Release Info
Developer | GamerZ |
Plugin | WP-Polls |
Version | 2.75.4 |
Comparing to | |
See all releases |
Code changes from version 2.75.3 to 2.75.4
- polls-manager.php +1 -1
- readme.txt +5 -2
- wp-polls.php +6 -6
polls-manager.php
CHANGED
@@ -143,7 +143,7 @@ if(!empty($_POST['do'])) {
|
|
143 |
$text .= '<p style="color: red">'.sprintf(__('Invalid Poll \'%s\'.', 'wp-polls'), removeslashes($pollq_question)).'</p>';
|
144 |
}
|
145 |
// Add Poll Answers (If Needed)
|
146 |
-
$polla_answers_new = isset($_POST['polla_answers_new']) ?
|
147 |
if(!empty($polla_answers_new)) {
|
148 |
$i = 0;
|
149 |
$polla_answers_new_votes = $_POST['polla_answers_new_votes'];
|
143 |
$text .= '<p style="color: red">'.sprintf(__('Invalid Poll \'%s\'.', 'wp-polls'), removeslashes($pollq_question)).'</p>';
|
144 |
}
|
145 |
// Add Poll Answers (If Needed)
|
146 |
+
$polla_answers_new = isset($_POST['polla_answers_new']) ? $_POST['polla_answers_new'] : array();
|
147 |
if(!empty($polla_answers_new)) {
|
148 |
$i = 0;
|
149 |
$polla_answers_new_votes = $_POST['polla_answers_new_votes'];
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://lesterchan.net/site/donation/
|
|
4 |
Tags: poll, polls, polling, vote, booth, democracy, ajax, survey, post, widget
|
5 |
Requires at least: 4.9.6
|
6 |
Tested up to: 5.3
|
7 |
-
Stable tag: 2.75.
|
8 |
|
9 |
Adds an AJAX poll system to your WordPress blog. You can also easily add a poll into your WordPress's blog post/page.
|
10 |
|
@@ -24,7 +24,10 @@ WP-Polls is extremely customizable via templates and css styles and there are to
|
|
24 |
I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks, I will really appreciate it. If not feel free to use it without any obligations.
|
25 |
|
26 |
## Changelog
|
27 |
-
###
|
|
|
|
|
|
|
28 |
* FIXED: Broken filter for templates
|
29 |
* FIXED: Divison by 0 by totalvoters
|
30 |
* FIXED: Add whitelist to sortby poll answers
|
4 |
Tags: poll, polls, polling, vote, booth, democracy, ajax, survey, post, widget
|
5 |
Requires at least: 4.9.6
|
6 |
Tested up to: 5.3
|
7 |
+
Stable tag: 2.75.4
|
8 |
|
9 |
Adds an AJAX poll system to your WordPress blog. You can also easily add a poll into your WordPress's blog post/page.
|
10 |
|
24 |
I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks, I will really appreciate it. If not feel free to use it without any obligations.
|
25 |
|
26 |
## Changelog
|
27 |
+
### Version 2.75.4
|
28 |
+
* FIXED: Unable to edit poll because of class-wp-block-parser.php.
|
29 |
+
|
30 |
+
### Version 2.75.3
|
31 |
* FIXED: Broken filter for templates
|
32 |
* FIXED: Divison by 0 by totalvoters
|
33 |
* FIXED: Add whitelist to sortby poll answers
|
wp-polls.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: WP-Polls
|
4 |
Plugin URI: https://lesterchan.net/portfolio/programming/php/
|
5 |
Description: Adds an AJAX poll system to your WordPress blog. You can easily include a poll into your WordPress's blog post/page. WP-Polls is extremely customizable via templates and css styles and there are tons of options for you to choose to ensure that WP-Polls runs the way you wanted. It now supports multiple selection of answers.
|
6 |
-
Version: 2.75.
|
7 |
Author: Lester 'GaMerZ' Chan
|
8 |
Author URI: https://lesterchan.net
|
9 |
Text Domain: wp-polls
|
@@ -11,7 +11,7 @@ Text Domain: wp-polls
|
|
11 |
|
12 |
|
13 |
/*
|
14 |
-
Copyright
|
15 |
|
16 |
This program is free software; you can redistribute it and/or modify
|
17 |
it under the terms of the GNU General Public License as published by
|
@@ -29,7 +29,7 @@ Text Domain: wp-polls
|
|
29 |
*/
|
30 |
|
31 |
### Version
|
32 |
-
define( 'WP_POLLS_VERSION', '2.75.
|
33 |
|
34 |
|
35 |
### Create Text Domain For Translations
|
@@ -1351,7 +1351,7 @@ function vote_poll_process($poll_id, $poll_aid_array = [])
|
|
1351 |
|
1352 |
$polla_aids = $wpdb->get_col( $wpdb->prepare( "SELECT polla_aid FROM $wpdb->pollsa WHERE polla_qid = %d", $poll_id ) );
|
1353 |
$is_real = count( array_intersect( $poll_aid_array, $polla_aids ) ) === count( $poll_aid_array );
|
1354 |
-
|
1355 |
if( !$is_real ) {
|
1356 |
throw new InvalidArgumentException(sprintf(__('Invalid Answer to Poll ID #%s', 'wp-polls'), $poll_id));
|
1357 |
}
|
@@ -1369,7 +1369,7 @@ function vote_poll_process($poll_id, $poll_aid_array = [])
|
|
1369 |
}
|
1370 |
|
1371 |
$is_poll_open = (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->pollsq WHERE pollq_id = %d AND pollq_active = 1", $poll_id ) );
|
1372 |
-
|
1373 |
if ($is_poll_open === 0) {
|
1374 |
throw new InvalidArgumentException(sprintf(__( 'Poll ID #%s is closed', 'wp-polls' ), $poll_id ));
|
1375 |
}
|
@@ -1481,7 +1481,7 @@ function vote_poll() {
|
|
1481 |
case 'process':
|
1482 |
try {
|
1483 |
$poll_aid_array = array_unique( array_map('intval', array_map('sanitize_key', explode( ',', $_POST["poll_$poll_id"] ) ) ) );
|
1484 |
-
echo vote_poll_process($poll_id, $poll_aid_array);
|
1485 |
} catch (Exception $e) {
|
1486 |
echo $e->getMessage();
|
1487 |
}
|
3 |
Plugin Name: WP-Polls
|
4 |
Plugin URI: https://lesterchan.net/portfolio/programming/php/
|
5 |
Description: Adds an AJAX poll system to your WordPress blog. You can easily include a poll into your WordPress's blog post/page. WP-Polls is extremely customizable via templates and css styles and there are tons of options for you to choose to ensure that WP-Polls runs the way you wanted. It now supports multiple selection of answers.
|
6 |
+
Version: 2.75.4
|
7 |
Author: Lester 'GaMerZ' Chan
|
8 |
Author URI: https://lesterchan.net
|
9 |
Text Domain: wp-polls
|
11 |
|
12 |
|
13 |
/*
|
14 |
+
Copyright 2020 Lester Chan (email : lesterchan@gmail.com)
|
15 |
|
16 |
This program is free software; you can redistribute it and/or modify
|
17 |
it under the terms of the GNU General Public License as published by
|
29 |
*/
|
30 |
|
31 |
### Version
|
32 |
+
define( 'WP_POLLS_VERSION', '2.75.4' );
|
33 |
|
34 |
|
35 |
### Create Text Domain For Translations
|
1351 |
|
1352 |
$polla_aids = $wpdb->get_col( $wpdb->prepare( "SELECT polla_aid FROM $wpdb->pollsa WHERE polla_qid = %d", $poll_id ) );
|
1353 |
$is_real = count( array_intersect( $poll_aid_array, $polla_aids ) ) === count( $poll_aid_array );
|
1354 |
+
|
1355 |
if( !$is_real ) {
|
1356 |
throw new InvalidArgumentException(sprintf(__('Invalid Answer to Poll ID #%s', 'wp-polls'), $poll_id));
|
1357 |
}
|
1369 |
}
|
1370 |
|
1371 |
$is_poll_open = (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->pollsq WHERE pollq_id = %d AND pollq_active = 1", $poll_id ) );
|
1372 |
+
|
1373 |
if ($is_poll_open === 0) {
|
1374 |
throw new InvalidArgumentException(sprintf(__( 'Poll ID #%s is closed', 'wp-polls' ), $poll_id ));
|
1375 |
}
|
1481 |
case 'process':
|
1482 |
try {
|
1483 |
$poll_aid_array = array_unique( array_map('intval', array_map('sanitize_key', explode( ',', $_POST["poll_$poll_id"] ) ) ) );
|
1484 |
+
echo vote_poll_process($poll_id, $poll_aid_array);
|
1485 |
} catch (Exception $e) {
|
1486 |
echo $e->getMessage();
|
1487 |
}
|