WP-Polls - Version 2.73.1

Version Description

N/A

Download this release

Release Info

Developer GamerZ
Plugin Icon WP-Polls
Version 2.73.1
Comparing to
See all releases

Code changes from version 2.73 to 2.73.1

Files changed (4) hide show
  1. polls-logs.php +1 -1
  2. polls-options.php +58 -42
  3. readme.txt +7 -257
  4. wp-polls.php +4 -4
polls-logs.php CHANGED
@@ -369,7 +369,7 @@ if(!empty($_POST['do'])) {
369
  <?php if($poll_logs_count) { ?>
370
  <strong><?php _e('Are You Sure You Want To Delete Logs For This Poll Only?', 'wp-polls'); ?></strong><br /><br />
371
  <input type="checkbox" id="delete_logs_yes" name="delete_logs_yes" value="yes" />&nbsp;<label for="delete_logs_yes"><?php _e('Yes', 'wp-polls'); ?></label><br /><br />
372
- <input type="button" name="do" value="<?php _e('Delete Logs For This Poll Only', 'wp-polls'); ?>" class="button" onclick="delete_this_poll_logs(<?php echo $poll_id; ?>, '<?php printf(esc_js(__('You are about to delete poll logs for this poll \'%s\' ONLY. This action is not reversible.', 'wp-polls')), htmlspecialchars( $poll_question ) ); ?>', '<?php echo wp_create_nonce('wp-polls_delete-poll-logs'); ?>');" />
373
  <?php
374
  } else {
375
  _e('No poll logs available for this poll.', 'wp-polls');
369
  <?php if($poll_logs_count) { ?>
370
  <strong><?php _e('Are You Sure You Want To Delete Logs For This Poll Only?', 'wp-polls'); ?></strong><br /><br />
371
  <input type="checkbox" id="delete_logs_yes" name="delete_logs_yes" value="yes" />&nbsp;<label for="delete_logs_yes"><?php _e('Yes', 'wp-polls'); ?></label><br /><br />
372
+ <input type="button" name="do" value="<?php _e('Delete Logs For This Poll Only', 'wp-polls'); ?>" class="button" onclick="delete_this_poll_logs(<?php echo $poll_id; ?>, '<?php printf( esc_js( __( 'You are about to delete poll logs for this poll \'%s\' ONLY. This action is not reversible.', 'wp-polls' ) ), esc_js( esc_attr( $poll_question ) ) ); ?>', '<?php echo wp_create_nonce('wp-polls_delete-poll-logs'); ?>');" />
373
  <?php
374
  } else {
375
  _e('No poll logs available for this poll.', 'wp-polls');
polls-options.php CHANGED
@@ -18,38 +18,61 @@
18
 
19
 
20
  ### Check Whether User Can Manage Polls
21
- if(!current_user_can('manage_polls')) {
22
- die('Access Denied');
23
  }
24
 
25
 
26
  ### Variables Variables Variables
27
- $base_name = plugin_basename('wp-polls/polls-options.php');
28
- $base_page = 'admin.php?page='.$base_name;
29
- $id = (isset($_GET['id']) ? intval($_GET['id']) : 0);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
 
31
  ### If Form Is Submitted
32
  if( isset($_POST['Submit']) && $_POST['Submit'] ) {
33
  check_admin_referer('wp-polls_options');
34
- $poll_bar_style = strip_tags(trim($_POST['poll_bar_style']));
35
- $poll_bar_background = substr( strip_tags( trim( $_POST['poll_bar_bg'] ) ), 0, 6 );
36
- $poll_bar_border = substr( strip_tags( trim( $_POST['poll_bar_border'] ) ), 0, 6 );
37
- $poll_bar_height = intval($_POST['poll_bar_height']);
38
- $poll_bar = array('style' => $poll_bar_style, 'background' => $poll_bar_background, 'border' => $poll_bar_border, 'height' => $poll_bar_height);
39
- $poll_ajax_style = array('loading' => intval($_POST['poll_ajax_style_loading']), 'fading' => intval($_POST['poll_ajax_style_fading']));
40
- $poll_ans_sortby = strip_tags(trim($_POST['poll_ans_sortby']));
41
- $poll_ans_sortorder = strip_tags(trim($_POST['poll_ans_sortorder']));
42
- $poll_ans_result_sortby = strip_tags(trim($_POST['poll_ans_result_sortby']));
43
- $poll_ans_result_sortorder = strip_tags(trim($_POST['poll_ans_result_sortorder']));
44
- $poll_archive_perpage = intval($_POST['poll_archive_perpage']);
45
- $poll_archive_displaypoll = intval($_POST['poll_archive_displaypoll']);
46
- $poll_archive_url = esc_url_raw( strip_tags( trim( $_POST['poll_archive_url'] ) ) );
47
- $poll_currentpoll = intval($_POST['poll_currentpoll']);
48
- $poll_close = intval($_POST['poll_close']);
49
- $poll_logging_method = intval($_POST['poll_logging_method']);
50
- $poll_cookielog_expiry = intval($_POST['poll_cookielog_expiry']);
51
- $poll_allowtovote = intval($_POST['poll_allowtovote']);
52
- $update_poll_queries = array();
 
 
 
 
 
 
 
 
53
  $update_poll_text = array();
54
  $update_poll_queries[] = update_option('poll_bar', $poll_bar);
55
  $update_poll_queries[] = update_option('poll_ajax_style', $poll_ajax_style);
@@ -133,26 +156,19 @@ if( isset($_POST['Submit']) && $_POST['Submit'] ) {
133
  <?php
134
  $pollbar = get_option('poll_bar');
135
  $pollbar_url = plugins_url('wp-polls/images');
136
- $pollbar_path = WP_PLUGIN_DIR.'/wp-polls/images';
137
- if($handle = @opendir($pollbar_path)) {
138
- while (false !== ($filename = readdir($handle))) {
139
- if (substr($filename, 0, 1) != '.' && substr($filename, 0, 2) != '..') {
140
- if(is_dir($pollbar_path.'/'.$filename)) {
141
- echo '<p>'."\n";
142
- $pollbar_info = getimagesize($pollbar_path.'/'.$filename.'/pollbg.gif');
143
- if($pollbar['style'] == $filename) {
144
- echo '<input type="radio" id="poll_bar_style-'.$filename.'" name="poll_bar_style" value="'.$filename.'" checked="checked" onclick="set_pollbar_height('.$pollbar_info[1].'); update_pollbar(\'style\');" />';
145
- } else {
146
- echo '<input type="radio" id="poll_bar_style-'.$filename.'" name="poll_bar_style" value="'.$filename.'" onclick="set_pollbar_height('.$pollbar_info[1].'); update_pollbar(\'style\');" />';
147
- }
148
- echo '<label for="poll_bar_style-'.$filename.'">&nbsp;&nbsp;&nbsp;';
149
- echo '<img src="'.$pollbar_url.'/'.$filename.'/pollbg.gif" height="'.$pollbar_info[1].'" width="100" alt="pollbg.gif" />';
150
- echo '&nbsp;&nbsp;&nbsp;('.$filename.')</label>';
151
- echo '</p>'."\n";
152
- }
153
  }
 
 
 
 
154
  }
155
- closedir($handle);
156
  }
157
  ?>
158
  <input type="radio" id="poll_bar_style-use_css" name="poll_bar_style" value="use_css"<?php checked('use_css', $pollbar['style']); ?> onclick="update_pollbar('style');" /><label for="poll_bar_style-use_css"> <?php _e('Use CSS Style', 'wp-polls'); ?></label>
18
 
19
 
20
  ### Check Whether User Can Manage Polls
21
+ if( ! current_user_can( 'manage_polls' ) ) {
22
+ die( 'Access Denied' );
23
  }
24
 
25
 
26
  ### Variables Variables Variables
27
+ $base_name = plugin_basename( 'wp-polls/polls-options.php' );
28
+ $base_page = 'admin.php?page=' . $base_name;
29
+ $id = isset( $_GET['id'] ) ? intval( $_GET['id'] ) : 0;
30
+
31
+
32
+ ### Get Poll Bar Images
33
+ $pollbar_path = WP_PLUGIN_DIR . '/wp-polls/images';
34
+ $poll_bars = array();
35
+ if( $handle = @opendir( $pollbar_path ) ) {
36
+ while( false !== ( $filename = readdir( $handle ) ) ) {
37
+ if( substr( $filename, 0, 1 ) !== '.' && substr( $filename, 0, 2 ) !== '..' ) {
38
+ if( is_dir( $pollbar_path.'/'.$filename ) ) {
39
+ $poll_bars[$filename] = getimagesize( $pollbar_path . '/' . $filename . '/pollbg.gif' );
40
+ }
41
+ }
42
+ }
43
+ closedir( $handle );
44
+ }
45
 
46
  ### If Form Is Submitted
47
  if( isset($_POST['Submit']) && $_POST['Submit'] ) {
48
  check_admin_referer('wp-polls_options');
49
+ $poll_bar_style = isset( $_POST['poll_bar_style'] ) && in_array( $_POST['poll_bar_style'], array_merge( array_keys( $poll_bars ), array( 'use_css' ) ) ) ? $_POST['poll_bar_style'] : 'default';
50
+ $poll_bar_background = isset( $_POST['poll_bar_bg'] ) ? substr( strip_tags( trim( $_POST['poll_bar_bg'] ) ), 0, 6 ) : '000000';
51
+ $poll_bar_border = isset( $_POST['poll_bar_border'] ) ? substr( strip_tags( trim( $_POST['poll_bar_border'] ) ), 0, 6 ) : '000000';
52
+ $poll_bar_height = isset( $_POST['poll_bar_height'] ) ? intval( $_POST['poll_bar_height'] ) : 10;
53
+ $poll_bar = array(
54
+ 'style' => $poll_bar_style,
55
+ 'background' => $poll_bar_background,
56
+ 'border' => $poll_bar_border,
57
+ 'height' => $poll_bar_height
58
+ );
59
+ $poll_ajax_style = array(
60
+ 'loading' => isset( $_POST['poll_ajax_style_loading'] ) ? intval( $_POST['poll_ajax_style_loading'] ) : 1,
61
+ 'fading' => isset( $_POST['poll_ajax_style_fading'] ) ? intval( $_POST['poll_ajax_style_fading'] ) : 1
62
+ );
63
+ $poll_ans_sortby = isset( $_POST['poll_ans_sortby'] ) && in_array( $_POST['poll_ans_sortby'], array( 'polla_aid', 'polla_answers', 'RAND()' ) ) ? $_POST['poll_ans_sortby'] : 'polla_aid';
64
+ $poll_ans_sortorder = isset( $_POST['poll_ans_sortorder'] ) && in_array( $_POST['poll_ans_sortorder'], array( 'asc', 'desc' ) ) ? $_POST['poll_ans_sortorder'] : 'asc';
65
+ $poll_ans_result_sortby = isset( $_POST['poll_ans_result_sortby'] ) && in_array( $_POST['poll_ans_result_sortby'], array( 'polla_votes', 'polla_aid', 'polla_answers', 'RAND()' ) ) ? $_POST['poll_ans_result_sortby'] : 'polla_votes';
66
+ $poll_ans_result_sortorder = isset( $_POST['poll_ans_result_sortorder'] ) && in_array( $_POST['poll_ans_result_sortorder'], array( 'asc', 'desc' ) ) ? $_POST['poll_ans_result_sortorder'] : 'desc';
67
+ $poll_archive_perpage = isset( $_POST['poll_archive_perpage'] ) ? intval( $_POST['poll_archive_perpage'] ) : 0;
68
+ $poll_archive_displaypoll = isset( $_POST['poll_archive_displaypoll'] ) ? intval( $_POST['poll_archive_displaypoll'] ) : 0;
69
+ $poll_archive_url = isset( $_POST['poll_archive_url'] ) ? esc_url_raw( strip_tags( trim( $_POST['poll_archive_url'] ) ) ) : '';
70
+ $poll_currentpoll = isset( $_POST['poll_currentpoll'] ) ? intval( $_POST['poll_currentpoll'] ) : 0;
71
+ $poll_close = isset( $_POST['poll_close'] ) ? intval( $_POST['poll_close'] ) : 0;
72
+ $poll_logging_method = isset( $_POST['poll_logging_method'] ) ? intval( $_POST['poll_logging_method'] ) : 0;
73
+ $poll_cookielog_expiry = isset( $_POST['poll_cookielog_expiry'] ) ? intval ($_POST['poll_cookielog_expiry'] ) : 0;
74
+ $poll_allowtovote = isset( $_POST['poll_allowtovote'] ) ? intval( $_POST['poll_allowtovote'] ) : 0;
75
+ $update_poll_queries = array();
76
  $update_poll_text = array();
77
  $update_poll_queries[] = update_option('poll_bar', $poll_bar);
78
  $update_poll_queries[] = update_option('poll_ajax_style', $poll_ajax_style);
156
  <?php
157
  $pollbar = get_option('poll_bar');
158
  $pollbar_url = plugins_url('wp-polls/images');
159
+ if( count( $poll_bars ) > 0 ) {
160
+ foreach( $poll_bars as $filename => $pollbar_info ) {
161
+ echo '<p>'."\n";
162
+ if($pollbar['style'] == $filename) {
163
+ echo '<input type="radio" id="poll_bar_style-'.$filename.'" name="poll_bar_style" value="'.$filename.'" checked="checked" onclick="set_pollbar_height('.$pollbar_info[1].'); update_pollbar(\'style\');" />';
164
+ } else {
165
+ echo '<input type="radio" id="poll_bar_style-'.$filename.'" name="poll_bar_style" value="'.$filename.'" onclick="set_pollbar_height('.$pollbar_info[1].'); update_pollbar(\'style\');" />';
 
 
 
 
 
 
 
 
 
 
166
  }
167
+ echo '<label for="poll_bar_style-'.$filename.'">&nbsp;&nbsp;&nbsp;';
168
+ echo '<img src="'.$pollbar_url.'/'.$filename.'/pollbg.gif" height="'.$pollbar_info[1].'" width="100" alt="pollbg.gif" />';
169
+ echo '&nbsp;&nbsp;&nbsp;('.$filename.')</label>';
170
+ echo '</p>'."\n";
171
  }
 
172
  }
173
  ?>
174
  <input type="radio" id="poll_bar_style-use_css" name="poll_bar_style" value="use_css"<?php checked('use_css', $pollbar['style']); ?> onclick="update_pollbar('style');" /><label for="poll_bar_style-use_css"> <?php _e('Use CSS Style', 'wp-polls'); ?></label>
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: GamerZ
3
  Donate link: http://lesterchan.net/site/donation/
4
  Tags: poll, polls, polling, vote, booth, democracy, ajax, survey, post, widget
5
- Requires at least: 3.9
6
  Tested up to: 4.5
7
- Stable tag: 2.73
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
 
@@ -27,6 +27,11 @@ WP-Polls is extremely customizable via templates and css styles and there are to
27
  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.
28
 
29
  == Changelog ==
 
 
 
 
 
30
  = Version 2.73 =
31
  * NEW: Display Poll Questions at the top of the Poll Logs table
32
  * FIXED: Remove slashes
@@ -47,261 +52,6 @@ I spent most of my free time creating, updating, maintaining and supporting thes
47
  * FIXED: Removed not needed wp_print_scripts
48
  * FIXED: Use esc_attr() and esc_textarea() instead of htmlspecialchars(). Props [Govind Singh](https://in.linkedin.com/pub/govind-singh/21/1a9/bab)
49
 
50
- = Version 2.69 =
51
- * NEW: Make use of wp_add_inline_style. Props @pathawks.
52
- * NEW: Create 2 filters for secret ballot. Props @afragen.
53
- * FIXED: Added new index to wp_pollsip. Props ArtemR.
54
- * FIXED: Integration with WP-Stats
55
- * FIXED: Proper IP checking
56
-
57
- = Version 2.68 =
58
- * NEW: Poll answer percentage are now not rounded off, previously it was always rounded to add up to 100%
59
- * NEW: Support WordPress MultiSite Network Activation
60
- * NEW: Uses native WordPress uninstall.php
61
- * NEW: Show shortcode in success message after creating a poll
62
- * NEW: Checks and ensure that Poll Question and Poll Answers are not empty
63
- * NEW: Checks whether Poll is closed before checking whether user has voted
64
-
65
-
66
- = Version 2.67 =
67
- * NEW: Use POST for View Results and Vote link
68
- * FIXED: Added ?v=VERSION_NUMBER to the plugin TinyMCE JS because it is breaking a lot of editors due to cache issue
69
- * FIXED: Added backward compatibility with [poll=1] in order not to break older polls
70
-
71
- = Version 2.66 =
72
- * FIXED: Notices from polls_archive function. Props. @prettyboymp.
73
- * FIXED: Ajax request in parallel with animation. Props @nodecode.
74
- * FIXED: Editor button was outputting the wrong shortcode.
75
- * FIXED: ReferenceError: pollsEdL10n is not defined if TinyMCE 4.0 is loaded outside the Add/Edit Posts/Pages.
76
-
77
- = Version 2.65 =
78
- * NEW: Use Dashicons
79
- * NEW: Supports TinyMCE 4.0 For WordPress 3.9
80
- * NEW: Added Poll ID after adding it
81
- * FIXED: Use SITECOOKIEPATH instead of COOKIEPATH.
82
- * FIXED: Use http://ipinfo.io instead of http://ws.arin.net to get check IP information.
83
- * FIXED: Wrapped all JS function in jQuery.ready(). It is ugly, but it will do till I have time to rewrite it.
84
- * FIXED: Add INDEX for wp_pollsip: pollip_ip_qid (pollip_ip, pollip_qid) to prevent full table scan. Thanks archon810 from AndroidPolice.
85
-
86
- = Version 2.64 =
87
- * NEW: Add in various filters in the plugin. Props Machiel.
88
- * FIXED: Deveral undefined variable / undefined index notices. Props Machiel.
89
-
90
- = Version 2.63 (21-05-2012) =
91
- * Move AJAX Request to wp-admin/admin-ajax.php
92
- * Added nonce To AJAX Calls
93
- * FIXED: PHP Notices/add_options() Deprecated Arguments ([Dewey Bushaw](http://www.parapxl.com/ "Dewey Bushaw"))
94
-
95
- = Version 2.62 (31-08-2011) =
96
- * FIXED: Escaped Hostname. Thanks to Renaud Feil ([Renaud Feil](http://www.stratsec.net "Renaud Feil"))
97
- * FIXED: Ensure Poll ID In Shortcode Is An Integer. Thanks to Renaud Feil ([Renaud Feil](http://www.stratsec.net "Renaud Feil"))
98
-
99
- = Version 2.61 (14-02-2011) =
100
- * FIXED: XSS Vulnerability. Thanks to Dweeks, Leon Juranic and Chad Lavoie of the Swiftwill Security Team Inc ([www.swiftwill.com](http://www.swiftwill.com "www.swiftwill.com"))
101
-
102
- = Version 2.60 (01-12-2009) =
103
- * NEW: Uses WordPress nonce Throughout
104
- * NEW: Display 2,000 Records In Poll Logs Instead Of 100
105
-
106
- = Version 2.50 (01-06-2009) =
107
- * NEW: Works For WordPress 2.8 Only
108
- * NEW: Javascript Now Placed At The Footer
109
- * NEW: Uses jQuery Instead Of tw-sack
110
- * NEW: Minified Javascript Instead Of Packed Javascript
111
- * NEW: Renamed polls-admin-js-packed.js To polls-admin-js.js
112
- * NEW: Renamed polls-admin-js.js To polls-admin-js.dev.js
113
- * NEW: Renamed polls-js-packed.js To polls-js.js
114
- * NEW: Renamed polls-js.js To polls-js.dev.js
115
- * NEW: Translate Javascript Variables Using wp_localize_script()
116
- * NEW: Add "Add Poll" To WordPress Favourite Actions
117
- * NEW: Minified plugin.js And Added Non-Minified plugin.min.js
118
- * NEW: Able To Remove Individual Answers When Adding Or Editing A Poll
119
- * NEW: Use _n() Instead Of __ngettext() And _n_noop() Instead Of __ngettext_noop()
120
- * NEW: Uses New Widget Class From WordPress
121
- * NEW: Merge Widget Code To wp-polls.php And Remove wp-polls-widget.php
122
- * FIXED: Uses $_SERVER['PHP_SELF'] With plugin_basename(__FILE__) Instead Of Just $_SERVER['REQUEST_URI']
123
- * FIXED: Ensure That Percentage Always Add Up To 100%
124
- * FIXED: More Efficient WP-Polls Archive
125
- * FIXED: Logged By Username Now Shows Poll Results To Users Who Did Not Login
126
-
127
- = Version 2.40 (12-12-2008) =
128
- * NEW: Works For WordPress 2.7 Only
129
- * NEW: Load Admin JS And CSS Only In WP-Polls Admin Pages
130
- * NEW: Added polls-admin-css.css For WP-Polls Admin CSS Styles
131
- * NEW: Right To Left Language Support by Kambiz R. Khojasteh
132
- * NEW: Added "polls-css-rtl.css" by Kambiz R. Khojasteh
133
- * NEW: Applied Output Of polls_archive() To "polls_archive" Filter by Kambiz R. Khojasteh
134
- * NEW: Added Call To polls_textdomain() In create_poll_table() and vote_poll() functions by Kambiz R. Khojasteh
135
- * NEW: Uses wp_register_style(), wp_print_styles(), plugins_url() And site_url()
136
- * NEW: [poll id="-2"] or <?php get_poll(-2); ?> Will Randomize The Poll
137
- * FIXED: SSL Support
138
- * FIXED: Moved Call To update_pollbar() From onblur To onclick Event. It Was Showing The Last Selection Instead Of Current One by Kambiz R. Khojasteh
139
-
140
- = Version 2.31 (16-07-2008) =
141
- * NEW: Works For WordPress 2.6
142
- * NEW: Better Translation Using __ngetext() by Anna Ozeritskaya
143
- * FIXED: MYSQL Charset Issue Should Be Solved
144
-
145
- = Version 2.30 (01-06-2008) =
146
- * NEW: Works For WordPress 2.5 Only
147
- * NEW: Added Paging Header And Footer Template For Polls Archive Page
148
- * NEW: Uses WP-PageNavi Style Paging For Polls Archive Page
149
- * NEW: WP-Polls Will Load 'polls-css.css' Inside Your Theme Directory If It Exists. If Not, It Will Just Load The Default 'polls-css.css' By WP-Polls
150
- * NEW: Uses Shortcode API
151
- * NEW: When Inserting Poll Into Post, It is Now [poll id="1"], Where 1 Is Your Poll ID
152
- * NEW: When User Does Not Have Permission To Vote, The Voting Form Is Now Disabled Instead Of Showing Poll's Result
153
- * NEW: Added A New Action Called "Display Disabled Poll's Voting Form" To Action Taken When A Poll Is Closed
154
- * NEW: Updated WP-Polls TinyMCE Plugin To Work With TinyMCE 3.0
155
- * NEW: Add Time Expiry For Cookie/Log
156
- * NEW: Removed polls-usage.php
157
- * NEW: Removed "Fade Anything Technique" In Polls Admin
158
- * NEW: Uses /wp-polls/ Folder Instead Of /polls/
159
- * NEW: Uses wp-polls.php Instead Of polls.php
160
- * NEW: Uses wp-polls-widget.php Instead Of polls-widget.php
161
- * NEW: Use number_format_i18n() Instead
162
- * NEW: Renamed polls-admin-js.php To polls-admin-js.js and Move The Dynamic Javascript Variables To The PHP Pages
163
- * NEW: Renamed polls-js.php To polls-js.js and Move The Dynamic Javascript Variables To The PHP Pages
164
- * NEW: Uses polls-js-packed.js And polls-admin-js-packed.js
165
- * FIXED: Unable To Delete Poll Or Poll Answers If There Is Quotes Within The Poll Or Poll Answer
166
- * FIXED: number_format() Not Used In Polls Archive
167
- * FIXED: Unable To Schedule Future Poll If The Year Is Different From Current Year
168
- * FIXED: TinyMCE Tool Tip For Insert Poll Not Translated
169
- * FIXED: Content-Type Not Being Sent Back When AJAX Return Results
170
-
171
- = Version 2.21 (01-10-2007) =
172
- * NEW: Works For WordPress 2.3 Only
173
- * NEW: Added Quick Tag For Poll To Visual (TinyMCE) / Code Editor
174
- * NEW: New CSS Style For WP-Polls Archive (.wp-polls-archive)
175
- * NEW: Uses WP-Stats Filter To Add Stats Into WP-Stats Page
176
- * NEW: Ability To Add Polls To Excerpt
177
- * NEW: Added "Random Order" For Sorting Poll's Answers And Poll's Result Answers
178
- * FIXED: Language Problem By Setting Database Table To UTF8
179
- * FIXED: Some Text Not Translated In Polls Widget
180
- * FIXED: 2 Wrong Options Name In Polls Uninstall
181
- * FIXED: Some Translation Bug in polls-usage.php
182
-
183
- = Version 2.20 (01-06-2007) =
184
- * NEW: Poll Archive Link, Individual Poll Header And Footer In Poll Archive Template
185
- * NEW: Poll Templates Has Now Its Own Page 'WP-Admin -> Polls -> Poll Templates'
186
- * NEW: Poll Widget Can Now Display Multiple Polls
187
- * NEW: Ability To Allow User To Select More Than 1 Poll Answer
188
- * NEW: Added AJAX Style Option: "Show Loading Image With Text"
189
- * NEW: Added AJAX Style Option: "Show Fading In And Fading Out Of Polls"
190
- * NEW: Major Changes To The Administration Panel For WP-Polls
191
- * NEW: AJAX Added To The Administration Panel For WP-Polls
192
- * NEW: Default Poll's Result Template Will Now Show Number Of Votes Beside The Percentage
193
- * NEW: Term "Total Votes" Changed To "Total Voters"
194
- * NEW: Removed Polls From Feed If The Poll Is Embedded Into The Post Using [poll=ID]
195
- * NEW: Filtering Of Individual Poll Logs
196
- * FIXED: Poll Archive Will Now Show Only Polls Results
197
-
198
- = Version 2.14 (01-02-2007) =
199
- * NEW: Works For WordPress 2.1 Only
200
- * NEW: Renamed polls-js.js to polls-js.php To Enable PHP Parsing
201
- * NEW: Ability To Make A Poll Expire
202
- * NEW: Ability To Make A Future Poll
203
- * NEW: Future Poll Will Automatically Open When The Poll's Date Is Reached
204
- * NEW: Expired Poll Will Automatically Closed When The Poll's Date Is Reached
205
- * NEW: Ablity To Choose What To Do When The Poll Is Closed (Display Result, Remove Poll From Sidebar)
206
- * FIXED: Future Dated Polls Will Not Appear In The Post/Sidebar/Polls Archive
207
-
208
- = Version 2.13 (02-01-2007) =
209
- * NEW: polls.php Now Handles The AJAX Processing Instead Of index.php
210
- * NEW: Able To Modify The Style Of Poll Results Bar in 'Polls -> Poll Option'
211
- * NEW: Usage Instructions Is Also Included Within The Plugin Itself
212
- * NEW: Uninstaller Done By Philippe Corbes
213
- * NEW: Localization Done By Ravan
214
- * NEW: Ability To Add HTML Into Poll Question and Answers
215
- * FIXED: AJAX Not Working On Servers Running On PHP CGI
216
- * FIXED: Added Some Default Styles To polls-css.css To Ensure That WP-Polls Does Not Break
217
- * FIXED: Other Languages Not Appearing Properly
218
- * FIXED: Poll IP Logs Of Deleted Poll's Answer Did Not Get Deleted
219
- * FIXED: There Is An Error In Voting If There Is Only 1 Poll's Answer
220
-
221
- = Version 2.12 (01-10-2006) =
222
- * NEW: Polls Archive Is Now Embedded Into A Page, And Hence No More Integrating Of Polls Archive
223
- * NEW: WP-Polls Is Now Using DIV To Display The Poll's Results Instead Of The Image Bar
224
- * NEW: Added Widget Title Option To WP-Polls Widget
225
- * NEW: Ability To Logged By UserName
226
- * NEW: Added CSS Class 'wp-polls-image' To All IMG Tags
227
- * FIXED: If Site URL Doesn't Match WP Option's Site URL, WP-Polls Will Not Work
228
-
229
- = Version 2.11 (08-06-2006) =
230
- * NEW: You Can Now Place The Poll On The Sidebar As A Widget
231
- * NEW: Moved wp-polls.php To wp-content/plugins/polls/ Folder
232
- * FIXED: AJAX Not Working In Opera Browser
233
- * FIXED: Poll Not Working On Physical Pages That Is Integrated Into WordPress
234
-
235
- = Version 2.1 (01-06-2006) =
236
- * NEW: Poll Is Now Using AJAX
237
- * NEW: Ability To Close/Open Poll
238
- * NEW: Added Poll Option For Logging Method
239
- * NEW: Added Poll Option For Who Can Vote
240
- * NEW: Added Poll Results Footer Template Variable (Used When User Click "View Results")
241
- * NEW: Added The Ability To Delete All Poll Logs Or Logs From A Specific Poll
242
- * NEW: Poll Administration Panel And The Code That WP-Polls Generated Is XHTML 1.0 Transitional
243
-
244
- = Version 2.06b (26-04-2006) =
245
- * FIXED: Bug In vote_poll();
246
-
247
- = Version 2.06a (02-04-2006) =
248
- * FIXED: Random Poll Not Working Correctly
249
-
250
- = Version 2.06 (01-04-2006) =
251
- * NEW: Poll Bar Is Slightly Nicer
252
- * NEW: Got Rid Of Tables, Now Using List
253
- * NEW: Added In Most Voted And Least Voted Answer/Votes/Percentage For Individual Poll As Template Variables
254
- * NEW: Display Random Poll Option Under Poll -> Poll Options -> Current Poll
255
- * FIXED: Totally Removed Tables In wp-polls.php
256
-
257
- = Version 2.05 (01-03-2006) =
258
- * NEW: Improved On 'manage_polls' Capabilities
259
- * NEW: Neater Structure
260
- * NEW: No More Install/Upgrade File, It Will Install/Upgrade When You Activate The Plugin
261
- * NEW: Added Poll Stats Function
262
-
263
- = Version 2.04 (01-02-2006) =
264
- * NEW: Added 'manage_polls' Capabilities To Administrator Role
265
- * NEW: [poll=POLL_ID] Tag To Insert Poll Into A Post
266
- * NEW: Ability To Edit Poll's Timestamp
267
- * NEW: Ability To Edit Individual Poll's Answer Votes
268
- * NEW: %POLL_RESULT_URL% To Display Poll's Result URL
269
- * FIXED: Cannot Sent Header Error
270
-
271
- = Version 2.03 (01-01-2006) =
272
- * NEW: Compatible With WordPress 2.0 Only
273
- * NEW: Poll Administration Menu Added Automatically Upon Activating The Plugin
274
- * NEW: Removed Add Poll Link From The Administration Menu
275
- * NEW: GPL License Added
276
- * NEW: Page Title Added To wp-polls.php
277
-
278
- = Version 2.02a (17-11-2005) =
279
- * FIXED: poll-install.php And poll-upgrade.php will Now Be Installed/Upgraded To 2.02 Instead Of 2.01
280
-
281
- = Version 2.02 (05-11-2005) =
282
- * FIXED: Showing 0 Vote On Poll Edit Page
283
- * FIXED: Null Vote Being Counted As A Vote
284
- * FIXED: Auto Loading Of Poll Option: Polls Per Page In Poll Archive Page Is Now "No"
285
- * NEW: Host Column In Poll IP Table To Prevent Network Lagging When Resolving IP
286
- * NEW: New Poll Error Template
287
-
288
- = Version 2.01 (25-10-2005) =
289
- * FIXED: Upgrade Script To Insert Lastest Poll ID Of User's Current Polls, Instead Of Poll ID 1
290
- * FIXED: Replace All <?### With <?php
291
- * FIXED: Added addalshes() To $pollip_user
292
- * FIXED: Better Localization Support (80% Done, Will Leave It In The Mean Time)
293
-
294
- = Version 2.0 (20-10-2005) =
295
- * NEW: IP Logging
296
- * NEW: Poll Options: Sorting Of Answers In Voting Form
297
- * NEW: Poll Options: Sorting Of Answers In Results View
298
- * NEW: Poll Options: Number Of Polls Per Page In Poll Archive
299
- * NEW: Poll Options: Choose Poll To Display On Index Page
300
- * NEW: Poll Options: Able To Disable Poll With Custom Message
301
- * NEW: Poll Options: Poll Templates
302
- * NEW: Display User's Voted Choice
303
- * FIXED: Better Install/Upgrade Script
304
-
305
  == Installation ==
306
 
307
  1. Open `wp-content/plugins` Folder
2
  Contributors: GamerZ
3
  Donate link: http://lesterchan.net/site/donation/
4
  Tags: poll, polls, polling, vote, booth, democracy, ajax, survey, post, widget
5
+ Requires at least: 4.0
6
  Tested up to: 4.5
7
+ Stable tag: 2.73.1
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
 
27
  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.
28
 
29
  == Changelog ==
30
+ = Version 2.73.1 =
31
+ * FIXED: Allow local IP
32
+ * FIXED: XSS on Poll bar option. Props [Netsparker Web Application Security Scanner](https://www.netsparker.com/)
33
+ * FIXED: Stricter Poll pptions check
34
+
35
  = Version 2.73 =
36
  * NEW: Display Poll Questions at the top of the Poll Logs table
37
  * FIXED: Remove slashes
52
  * FIXED: Removed not needed wp_print_scripts
53
  * FIXED: Use esc_attr() and esc_textarea() instead of htmlspecialchars(). Props [Govind Singh](https://in.linkedin.com/pub/govind-singh/21/1a9/bab)
54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  == Installation ==
56
 
57
  1. Open `wp-content/plugins` Folder
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.73
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: https://lesterchan.net
9
  Text Domain: wp-polls
@@ -30,7 +30,7 @@ Text Domain: wp-polls
30
 
31
 
32
  ### Version
33
- define( 'WP_POLLS_VERSION', 2.73 );
34
 
35
 
36
  ### Create Text Domain For Translations
@@ -719,7 +719,7 @@ if(!function_exists('get_ipaddress')) {
719
  if ( array_key_exists( $key, $_SERVER ) === true ) {
720
  foreach ( explode( ',', $_SERVER[$key] ) as $ip ) {
721
  $ip = trim( $ip );
722
- if ( filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false ) {
723
  return esc_attr( $ip );
724
  }
725
  }
@@ -1885,4 +1885,4 @@ function polls_activate() {
1885
  $role->add_cap( 'manage_polls' );
1886
  }
1887
  cron_polls_place();
1888
- }
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.73.1
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: https://lesterchan.net
9
  Text Domain: wp-polls
30
 
31
 
32
  ### Version
33
+ define( 'WP_POLLS_VERSION', '2.73.1' );
34
 
35
 
36
  ### Create Text Domain For Translations
719
  if ( array_key_exists( $key, $_SERVER ) === true ) {
720
  foreach ( explode( ',', $_SERVER[$key] ) as $ip ) {
721
  $ip = trim( $ip );
722
+ if ( filter_var( $ip, FILTER_VALIDATE_IP ) !== false ) {
723
  return esc_attr( $ip );
724
  }
725
  }
1885
  $role->add_cap( 'manage_polls' );
1886
  }
1887
  cron_polls_place();
1888
+ }