WP-Polls - Version 2.70

Version Description

N/A

Download this release

Release Info

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

Code changes from version 2.69 to 2.70

Files changed (8) hide show
  1. polls-add.php +1 -0
  2. polls-logs.php +5 -5
  3. polls-manager.php +6 -5
  4. polls-options.php +9 -9
  5. polls-templates.php +15 -15
  6. readme.txt +10 -2
  7. wp-polls.php +18 -24
  8. wp-polls.pot +141 -183
polls-add.php CHANGED
@@ -85,6 +85,7 @@ if(!empty($_POST['do'])) {
85
  $text .= '<p style="color: green;">' . sprintf( __( 'Poll \'%s\' (ID: %s) (Shortcode: %s) added successfully, but there are some errors with the Poll\'s Answers. Embed this poll with the shortcode: %s or go back to <a href="%s">Manage Polls</a>', 'wp-polls' ), stripslashes( $pollq_question ), $latest_pollid, '<input type="text" value=\'[poll id="' . $latest_pollid . '"]\' readonly="readonly" size="10" />' ) .'</p>';
86
  }
87
  }
 
88
  cron_polls_place();
89
  } else {
90
  $text .= '<p style="color: red;">' . __( 'Poll Question is empty.', 'wp-polls' ) . '</p>';
85
  $text .= '<p style="color: green;">' . sprintf( __( 'Poll \'%s\' (ID: %s) (Shortcode: %s) added successfully, but there are some errors with the Poll\'s Answers. Embed this poll with the shortcode: %s or go back to <a href="%s">Manage Polls</a>', 'wp-polls' ), stripslashes( $pollq_question ), $latest_pollid, '<input type="text" value=\'[poll id="' . $latest_pollid . '"]\' readonly="readonly" size="10" />' ) .'</p>';
86
  }
87
  }
88
+ do_action( 'wp_polls_add_poll', $latest_pollid );
89
  cron_polls_place();
90
  } else {
91
  $text .= '<p style="color: red;">' . __( 'Poll Question is empty.', 'wp-polls' ) . '</p>';
polls-logs.php CHANGED
@@ -152,7 +152,7 @@ if(!empty($_POST['do'])) {
152
  if($poll_answers_data) {
153
  foreach($poll_answers_data as $data) {
154
  $polla_id = intval($data->polla_aid);
155
- $polla_answers = stripslashes(strip_tags(htmlspecialchars($data->polla_answers)));
156
  if($polla_id == $users_voted_for) {
157
  echo '<option value="'.$polla_id .'" selected="selected">'.$polla_answers.'</option>';
158
  } else {
@@ -246,9 +246,9 @@ if(!empty($_POST['do'])) {
246
  if($poll_voters) {
247
  foreach($poll_voters as $pollip_user) {
248
  if($pollip_user == $what_user_voted) {
249
- echo '<option value="'.stripslashes(htmlspecialchars($pollip_user)).'" selected="selected">'.stripslashes(htmlspecialchars($pollip_user)).'</option>';
250
  } else {
251
- echo '<option value="'.stripslashes(htmlspecialchars($pollip_user)).'">'.stripslashes(htmlspecialchars($pollip_user)).'</option>';
252
  }
253
  }
254
  }
@@ -265,7 +265,7 @@ if(!empty($_POST['do'])) {
265
  &nbsp;
266
  <?php } // End if($poll_multiple > -1) ?>
267
  </td>
268
- <td align="center"><input type="button" value="<?php _e('Clear Filter', 'wp-polls'); ?>" onclick="self.location.href = '<?php echo htmlspecialchars($base_page); ?>&amp;mode=logs&amp;id=<?php echo $poll_id; ?>';" class="button" /></td>
269
  </tr>
270
  </table>
271
  </div>
@@ -381,7 +381,7 @@ if(!empty($_POST['do'])) {
381
  <?php if($poll_logs_count) { ?>
382
  <strong><?php _e('Are You Sure You Want To Delete Logs For This Poll Only?', 'wp-polls'); ?></strong><br /><br />
383
  <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 />
384
- <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'); ?>');" />
385
  <?php
386
  } else {
387
  _e('No poll logs available for this poll.', 'wp-polls');
152
  if($poll_answers_data) {
153
  foreach($poll_answers_data as $data) {
154
  $polla_id = intval($data->polla_aid);
155
+ $polla_answers = stripslashes( strip_tags( esc_attr( $data->polla_answers ) ) );
156
  if($polla_id == $users_voted_for) {
157
  echo '<option value="'.$polla_id .'" selected="selected">'.$polla_answers.'</option>';
158
  } else {
246
  if($poll_voters) {
247
  foreach($poll_voters as $pollip_user) {
248
  if($pollip_user == $what_user_voted) {
249
+ echo '<option value="' . stripslashes( esc_attr( $pollip_user ) ) . '" selected="selected">' . stripslashes( esc_attr( $pollip_user ) ) . '</option>';
250
  } else {
251
+ echo '<option value="' . stripslashes( esc_attr( $pollip_user ) ) . '">' . stripslashes( esc_attr( $pollip_user ) ) . '</option>';
252
  }
253
  }
254
  }
265
  &nbsp;
266
  <?php } // End if($poll_multiple > -1) ?>
267
  </td>
268
+ <td align="center"><input type="button" value="<?php _e('Clear Filter', 'wp-polls'); ?>" onclick="self.location.href = '<?php echo esc_attr( $base_page ); ?>&amp;mode=logs&amp;id=<?php echo $poll_id; ?>';" class="button" /></td>
269
  </tr>
270
  </table>
271
  </div>
381
  <?php if($poll_logs_count) { ?>
382
  <strong><?php _e('Are You Sure You Want To Delete Logs For This Poll Only?', 'wp-polls'); ?></strong><br /><br />
383
  <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 />
384
+ <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_attr( $poll_question ) ); ?>', '<?php echo wp_create_nonce('wp-polls_delete-poll-logs'); ?>');" />
385
  <?php
386
  } else {
387
  _e('No poll logs available for this poll.', 'wp-polls');
polls-manager.php CHANGED
@@ -140,6 +140,7 @@ if(!empty($_POST['do'])) {
140
  // Update Lastest Poll ID To Poll Options
141
  $latest_pollid = polls_latest_id();
142
  $update_latestpoll = update_option('poll_latestpoll', $latest_pollid);
 
143
  cron_polls_place();
144
  break;
145
  }
@@ -179,7 +180,7 @@ switch($mode) {
179
  <table class="form-table">
180
  <tr>
181
  <th width="20%" scope="row" valign="top"><?php _e('Question', 'wp-polls') ?></th>
182
- <td width="80%"><input type="text" size="70" name="pollq_question" value="<?php echo htmlspecialchars($poll_question_text); ?>" /></td>
183
  </tr>
184
  </table>
185
  <!-- Poll Answers -->
@@ -206,8 +207,8 @@ switch($mode) {
206
  $pollip_answers[$polla_aid] = $polla_answers;
207
  echo "<tr id=\"poll-answer-$polla_aid\">\n";
208
  echo '<th width="20%" scope="row" valign="top">'.sprintf(__('Answer %s', 'wp-polls'), number_format_i18n($i)).'</th>'."\n";
209
- echo "<td width=\"60%\"><input type=\"text\" size=\"50\" maxlength=\"200\" name=\"polla_aid-$polla_aid\" value=\"".htmlspecialchars($polla_answers)."\" />&nbsp;&nbsp;&nbsp;";
210
- echo "<input type=\"button\" value=\"".__('Delete', 'wp-polls')."\" onclick=\"delete_poll_ans($poll_id, $polla_aid, $polla_votes, '".sprintf(esc_js(__('You are about to delete this poll\'s answer \'%s\'.', 'wp-polls')), esc_js(htmlspecialchars($polla_answers)))."', '".wp_create_nonce('wp-polls_delete-poll-answer')."');\" class=\"button\" /></td>\n";
211
  echo '<td width="20%" align="'.$last_col_align.'">'.number_format_i18n($polla_votes)." <input type=\"text\" size=\"4\" id=\"polla_votes-$polla_aid\" name=\"polla_votes-$polla_aid\" value=\"$polla_votes\" onblur=\"check_totalvotes();\" /></td>\n</tr>\n";
212
  $poll_actual_totalvotes += $polla_votes;
213
  $i++;
@@ -302,8 +303,8 @@ switch($mode) {
302
  $poll_close_display = 'none';
303
  }
304
  ?>
305
- <input type="button" class="button" name="do" id="close_poll" value="<?php _e('Close Poll', 'wp-polls'); ?>" onclick="closing_poll(<?php echo $poll_id; ?>, '<?php printf(esc_js(__('You are about to CLOSE this poll \'%s\'.', 'wp-polls')), htmlspecialchars(esc_js($poll_question_text))); ?>', '<?php echo wp_create_nonce('wp-polls_close-poll'); ?>');" style="display: <?php echo $poll_close_display; ?>;" />
306
- <input type="button" class="button" name="do" id="open_poll" value="<?php _e('Open Poll', 'wp-polls'); ?>" onclick="opening_poll(<?php echo $poll_id; ?>, '<?php printf(esc_js(__('You are about to OPEN this poll \'%s\'.', 'wp-polls')), htmlspecialchars(esc_js($poll_question_text))); ?>', '<?php echo wp_create_nonce('wp-polls_open-poll'); ?>');" style="display: <?php echo $poll_open_display; ?>;" />
307
  &nbsp;&nbsp;<input type="button" name="cancel" value="<?php _e('Cancel', 'wp-polls'); ?>" class="button" onclick="javascript:history.go(-1)" />
308
  </p>
309
  </div>
140
  // Update Lastest Poll ID To Poll Options
141
  $latest_pollid = polls_latest_id();
142
  $update_latestpoll = update_option('poll_latestpoll', $latest_pollid);
143
+ do_action( 'wp_polls_update_poll', $latest_pollid );
144
  cron_polls_place();
145
  break;
146
  }
180
  <table class="form-table">
181
  <tr>
182
  <th width="20%" scope="row" valign="top"><?php _e('Question', 'wp-polls') ?></th>
183
+ <td width="80%"><input type="text" size="70" name="pollq_question" value="<?php echo esc_attr( $poll_question_text ); ?>" /></td>
184
  </tr>
185
  </table>
186
  <!-- Poll Answers -->
207
  $pollip_answers[$polla_aid] = $polla_answers;
208
  echo "<tr id=\"poll-answer-$polla_aid\">\n";
209
  echo '<th width="20%" scope="row" valign="top">'.sprintf(__('Answer %s', 'wp-polls'), number_format_i18n($i)).'</th>'."\n";
210
+ echo "<td width=\"60%\"><input type=\"text\" size=\"50\" maxlength=\"200\" name=\"polla_aid-$polla_aid\" value=\"". esc_attr( $polla_answers ) . "\" />&nbsp;&nbsp;&nbsp;";
211
+ echo "<input type=\"button\" value=\"".__('Delete', 'wp-polls')."\" onclick=\"delete_poll_ans($poll_id, $polla_aid, $polla_votes, '".sprintf(esc_js(__('You are about to delete this poll\'s answer \'%s\'.', 'wp-polls')), esc_js( esc_attr( $polla_answers ) ) ) . "', '".wp_create_nonce('wp-polls_delete-poll-answer')."');\" class=\"button\" /></td>\n";
212
  echo '<td width="20%" align="'.$last_col_align.'">'.number_format_i18n($polla_votes)." <input type=\"text\" size=\"4\" id=\"polla_votes-$polla_aid\" name=\"polla_votes-$polla_aid\" value=\"$polla_votes\" onblur=\"check_totalvotes();\" /></td>\n</tr>\n";
213
  $poll_actual_totalvotes += $polla_votes;
214
  $i++;
303
  $poll_close_display = 'none';
304
  }
305
  ?>
306
+ <input type="button" class="button" name="do" id="close_poll" value="<?php _e('Close Poll', 'wp-polls'); ?>" onclick="closing_poll(<?php echo $poll_id; ?>, '<?php printf(esc_js(__('You are about to CLOSE this poll \'%s\'.', 'wp-polls')), esc_attr( esc_js( $poll_question_text ) ) ); ?>', '<?php echo wp_create_nonce('wp-polls_close-poll'); ?>');" style="display: <?php echo $poll_close_display; ?>;" />
307
+ <input type="button" class="button" name="do" id="open_poll" value="<?php _e('Open Poll', 'wp-polls'); ?>" onclick="opening_poll(<?php echo $poll_id; ?>, '<?php printf(esc_js(__('You are about to OPEN this poll \'%s\'.', 'wp-polls')), esc_attr( esc_js( $poll_question_text ) ) ); ?>', '<?php echo wp_create_nonce('wp-polls_open-poll'); ?>');" style="display: <?php echo $poll_open_display; ?>;" />
308
  &nbsp;&nbsp;<input type="button" name="cancel" value="<?php _e('Cancel', 'wp-polls'); ?>" class="button" onclick="javascript:history.go(-1)" />
309
  </p>
310
  </div>
polls-options.php CHANGED
@@ -32,8 +32,8 @@ $id = (isset($_GET['id']) ? intval($_GET['id']) : 0);
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 = strip_tags(trim($_POST['poll_bar_bg']));
36
- $poll_bar_border = strip_tags(trim($_POST['poll_bar_border']));
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']));
@@ -43,7 +43,7 @@ if( isset($_POST['Submit']) && $_POST['Submit'] ) {
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 = strip_tags(trim($_POST['poll_archive_url']));
47
  $poll_archive_show = intval($_POST['poll_archive_show']);
48
  $poll_currentpoll = intval($_POST['poll_currentpoll']);
49
  $poll_close = intval($_POST['poll_close']);
@@ -162,12 +162,12 @@ if( isset($_POST['Submit']) && $_POST['Submit'] ) {
162
  </tr>
163
  <tr>
164
  <th scope="row" valign="top"><?php _e('Poll Bar Background', 'wp-polls'); ?></th>
165
- <td width="10%" dir="ltr">#<input type="text" id="poll_bar_bg" name="poll_bar_bg" value="<?php echo $pollbar['background']; ?>" size="6" maxlength="6" onblur="update_pollbar('background');" /></td>
166
  <td><div id="wp-polls-pollbar-bg" style="background-color: #<?php echo $pollbar['background']; ?>;"></div></td>
167
  </tr>
168
  <tr>
169
  <th scope="row" valign="top"><?php _e('Poll Bar Border', 'wp-polls'); ?></th>
170
- <td width="10%" dir="ltr">#<input type="text" id="poll_bar_border" name="poll_bar_border" value="<?php echo $pollbar['border']; ?>" size="6" maxlength="6" onblur="update_pollbar('border');" /></td>
171
  <td><div id="wp-polls-pollbar-border" style="background-color: #<?php echo $pollbar['border']; ?>;"></div></td>
172
  </tr>
173
  <tr>
@@ -316,7 +316,7 @@ if( isset($_POST['Submit']) && $_POST['Submit'] ) {
316
  </tr>
317
  <tr>
318
  <th scope="row" valign="top"><?php _e('Poll Archive URL:', 'wp-polls'); ?></th>
319
- <td><input type="text" name="poll_archive_url" value="<?php echo get_option('poll_archive_url'); ?>" size="50" dir="ltr" /></td>
320
  </tr>
321
  <tr>
322
  <th scope="row" valign="top"><?php _e('Display Poll Archive Link Below Poll?', 'wp-polls'); ?></th>
@@ -351,9 +351,9 @@ if( isset($_POST['Submit']) && $_POST['Submit'] ) {
351
  $poll_question = stripslashes($poll->pollq_question);
352
  $poll_id = intval($poll->pollq_id);
353
  if($poll_id == intval(get_option('poll_currentpoll'))) {
354
- echo "<option value=\"$poll_id\" selected=\"selected\">$poll_question</option>\n";
355
  } else {
356
- echo "<option value=\"$poll_id\">$poll_question</option>\n";
357
  }
358
  }
359
  }
@@ -378,4 +378,4 @@ if( isset($_POST['Submit']) && $_POST['Submit'] ) {
378
  <input type="submit" name="Submit" class="button-primary" value="<?php _e('Save Changes', 'wp-polls'); ?>" />
379
  </p>
380
  </div>
381
- </form>
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']));
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_archive_show = intval($_POST['poll_archive_show']);
48
  $poll_currentpoll = intval($_POST['poll_currentpoll']);
49
  $poll_close = intval($_POST['poll_close']);
162
  </tr>
163
  <tr>
164
  <th scope="row" valign="top"><?php _e('Poll Bar Background', 'wp-polls'); ?></th>
165
+ <td width="10%" dir="ltr">#<input type="text" id="poll_bar_bg" name="poll_bar_bg" value="<?php echo esc_attr( $pollbar['background'] ); ?>" size="6" maxlength="6" onblur="update_pollbar('background');" /></td>
166
  <td><div id="wp-polls-pollbar-bg" style="background-color: #<?php echo $pollbar['background']; ?>;"></div></td>
167
  </tr>
168
  <tr>
169
  <th scope="row" valign="top"><?php _e('Poll Bar Border', 'wp-polls'); ?></th>
170
+ <td width="10%" dir="ltr">#<input type="text" id="poll_bar_border" name="poll_bar_border" value="<?php echo esc_attr( $pollbar['border'] ); ?>" size="6" maxlength="6" onblur="update_pollbar('border');" /></td>
171
  <td><div id="wp-polls-pollbar-border" style="background-color: #<?php echo $pollbar['border']; ?>;"></div></td>
172
  </tr>
173
  <tr>
316
  </tr>
317
  <tr>
318
  <th scope="row" valign="top"><?php _e('Poll Archive URL:', 'wp-polls'); ?></th>
319
+ <td><input type="text" name="poll_archive_url" value="<?php echo esc_url( get_option( 'poll_archive_url' ) ); ?>" size="50" dir="ltr" /></td>
320
  </tr>
321
  <tr>
322
  <th scope="row" valign="top"><?php _e('Display Poll Archive Link Below Poll?', 'wp-polls'); ?></th>
351
  $poll_question = stripslashes($poll->pollq_question);
352
  $poll_id = intval($poll->pollq_id);
353
  if($poll_id == intval(get_option('poll_currentpoll'))) {
354
+ echo '<option value="' . $poll_id . '" selected="selected">' . esc_attr( $poll_question ) . '</option>';
355
  } else {
356
+ echo '<option value="' . $poll_id . '">' . esc_attr( $poll_question ) . '</option>';
357
  }
358
  }
359
  }
378
  <input type="submit" name="Submit" class="button-primary" value="<?php _e('Save Changes', 'wp-polls'); ?>" />
379
  </p>
380
  </div>
381
+ </form>
polls-templates.php CHANGED
@@ -290,7 +290,7 @@ if( isset($_POST['Submit']) && $_POST['Submit'] ) {
290
  <p style="margin: 2px 0">- %POLL_MULTIPLE_ANS_MAX%</p><br />
291
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('voteheader');" class="button" />
292
  </td>
293
- <td valign="top"><textarea cols="80" rows="15" id="poll_template_voteheader" name="poll_template_voteheader"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_voteheader'))); ?></textarea></td>
294
  </tr>
295
  <tr>
296
  <td width="30%" valign="top">
@@ -303,7 +303,7 @@ if( isset($_POST['Submit']) && $_POST['Submit'] ) {
303
  <p style="margin: 2px 0">- %POLL_CHECKBOX_RADIO%</p><br />
304
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('votebody');" class="button" />
305
  </td>
306
- <td valign="top"><textarea cols="80" rows="15" id="poll_template_votebody" name="poll_template_votebody"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_votebody'))); ?></textarea></td>
307
  </tr>
308
  <tr>
309
  <td width="30%" valign="top">
@@ -314,7 +314,7 @@ if( isset($_POST['Submit']) && $_POST['Submit'] ) {
314
  <p style="margin: 2px 0">- %POLL_MULTIPLE_ANS_MAX%</p><br />
315
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('votefooter');" class="button" />
316
  </td>
317
- <td valign="top"><textarea cols="80" rows="15" id="poll_template_votefooter" name="poll_template_votefooter"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_votefooter'))); ?></textarea></td>
318
  </tr>
319
  </table>
320
 
@@ -334,7 +334,7 @@ if( isset($_POST['Submit']) && $_POST['Submit'] ) {
334
  <p style="margin: 2px 0">- %POLL_MULTIPLE_ANS_MAX%</p><br />
335
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('resultheader');" class="button" />
336
  </td>
337
- <td valign="top"><textarea cols="80" rows="15" id="poll_template_resultheader" name="poll_template_resultheader"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_resultheader'))); ?></textarea></td>
338
  </tr>
339
  <tr>
340
  <td width="30%" valign="top">
@@ -349,7 +349,7 @@ if( isset($_POST['Submit']) && $_POST['Submit'] ) {
349
  <p style="margin: 2px 0">- %POLL_ANSWER_IMAGEWIDTH%</p><br />
350
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('resultbody');" class="button" />
351
  </td>
352
- <td valign="top"><textarea cols="80" rows="15" id="poll_template_resultbody" name="poll_template_resultbody"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_resultbody'))); ?></textarea></td>
353
  </tr>
354
  <tr>
355
  <td width="30%" valign="top">
@@ -364,7 +364,7 @@ if( isset($_POST['Submit']) && $_POST['Submit'] ) {
364
  <p style="margin: 2px 0">- %POLL_ANSWER_IMAGEWIDTH%</p><br />
365
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('resultbody2');" class="button" />
366
  </td>
367
- <td valign="top"><textarea cols="80" rows="15" id="poll_template_resultbody2" name="poll_template_resultbody2"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_resultbody2'))); ?></textarea></td>
368
  </tr>
369
  <tr>
370
  <td width="30%" valign="top">
@@ -384,7 +384,7 @@ if( isset($_POST['Submit']) && $_POST['Submit'] ) {
384
  <p style="margin: 2px 0">- %POLL_MULTIPLE_ANS_MAX%</p><br />
385
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('resultfooter');" class="button" />
386
  </td>
387
- <td valign="top"><textarea cols="80" rows="15" id="poll_template_resultfooter" name="poll_template_resultfooter"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_resultfooter'))); ?></textarea></td>
388
  </tr>
389
  <tr>
390
  <td width="30%" valign="top">
@@ -404,7 +404,7 @@ if( isset($_POST['Submit']) && $_POST['Submit'] ) {
404
  <p style="margin: 2px 0">- %POLL_MULTIPLE_ANS_MAX%</p><br />
405
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('resultfooter2');" class="button" />
406
  </td>
407
- <td valign="top"><textarea cols="80" rows="15" id="poll_template_resultfooter2" name="poll_template_resultfooter2"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_resultfooter2'))); ?></textarea></td>
408
  </tr>
409
  </table>
410
 
@@ -418,7 +418,7 @@ if( isset($_POST['Submit']) && $_POST['Submit'] ) {
418
  <p style="margin: 2px 0">- %POLL_ARCHIVE_URL%</p><br />
419
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('pollarchivelink');" class="button" />
420
  </td>
421
- <td valign="top"><textarea cols="80" rows="15" id="poll_template_pollarchivelink" name="poll_template_pollarchivelink"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_pollarchivelink'))); ?></textarea></td>
422
  </tr>
423
  <tr>
424
  <td width="30%" valign="top">
@@ -427,7 +427,7 @@ if( isset($_POST['Submit']) && $_POST['Submit'] ) {
427
  <p style="margin: 2px 0">- <?php _e('N/A', 'wp-polls'); ?></p><br />
428
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('pollarchiveheader');" class="button" />
429
  </td>
430
- <td valign="top"><textarea cols="80" rows="15" id="poll_template_pollarchiveheader" name="poll_template_pollarchiveheader"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_pollarchiveheader'))); ?></textarea></td>
431
  </tr>
432
  <tr>
433
  <td width="30%" valign="top">
@@ -446,7 +446,7 @@ if( isset($_POST['Submit']) && $_POST['Submit'] ) {
446
  <p style="margin: 2px 0">- %POLL_MULTIPLE_ANS_MAX%</p><br />
447
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('pollarchivefooter');" class="button" />
448
  </td>
449
- <td valign="top"><textarea cols="80" rows="15" id="poll_template_pollarchivefooter" name="poll_template_pollarchivefooter"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_pollarchivefooter'))); ?></textarea></td>
450
  </tr>
451
  <tr>
452
  <td width="30%" valign="top">
@@ -455,7 +455,7 @@ if( isset($_POST['Submit']) && $_POST['Submit'] ) {
455
  <p style="margin: 2px 0">- <?php _e('N/A', 'wp-polls'); ?></p><br />
456
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('pollarchivepagingheader');" class="button" />
457
  </td>
458
- <td valign="top"><textarea cols="80" rows="15" id="poll_template_pollarchivepagingheader" name="poll_template_pollarchivepagingheader"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_pollarchivepagingheader'))); ?></textarea></td>
459
  </tr>
460
  <tr>
461
  <td width="30%" valign="top">
@@ -464,7 +464,7 @@ if( isset($_POST['Submit']) && $_POST['Submit'] ) {
464
  <p style="margin: 2px 0">- <?php _e('N/A', 'wp-polls'); ?></p><br />
465
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('pollarchivepagingfooter');" class="button" />
466
  </td>
467
- <td valign="top"><textarea cols="80" rows="15" id="poll_template_pollarchivepagingfooter" name="poll_template_pollarchivepagingfooter"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_pollarchivepagingfooter'))); ?></textarea></td>
468
  </tr>
469
  </table>
470
 
@@ -478,7 +478,7 @@ if( isset($_POST['Submit']) && $_POST['Submit'] ) {
478
  <p style="margin: 2px 0">- <?php _e('N/A', 'wp-polls'); ?></p><br />
479
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('disable');" class="button" />
480
  </td>
481
- <td valign="top"><textarea cols="80" rows="15" id="poll_template_disable" name="poll_template_disable"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_disable'))); ?></textarea></td>
482
  </tr>
483
  <tr>
484
  <td width="30%" valign="top">
@@ -487,7 +487,7 @@ if( isset($_POST['Submit']) && $_POST['Submit'] ) {
487
  <p style="margin: 2px 0">- <?php _e('N/A', 'wp-polls'); ?><br /><br />
488
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('error');" class="button" />
489
  </td>
490
- <td valign="top"><textarea cols="80" rows="15" id="poll_template_error" name="poll_template_error"><?php echo htmlspecialchars(stripslashes(get_option('poll_template_error'))); ?></textarea></td>
491
  </tr>
492
  </table>
493
  <p class="submit">
290
  <p style="margin: 2px 0">- %POLL_MULTIPLE_ANS_MAX%</p><br />
291
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('voteheader');" class="button" />
292
  </td>
293
+ <td valign="top"><textarea cols="80" rows="15" id="poll_template_voteheader" name="poll_template_voteheader"><?php echo esc_textarea( stripslashes( get_option( 'poll_template_voteheader' ) ) ); ?></textarea></td>
294
  </tr>
295
  <tr>
296
  <td width="30%" valign="top">
303
  <p style="margin: 2px 0">- %POLL_CHECKBOX_RADIO%</p><br />
304
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('votebody');" class="button" />
305
  </td>
306
+ <td valign="top"><textarea cols="80" rows="15" id="poll_template_votebody" name="poll_template_votebody"><?php echo esc_textarea( stripslashes( get_option( 'poll_template_votebody' ) ) ); ?></textarea></td>
307
  </tr>
308
  <tr>
309
  <td width="30%" valign="top">
314
  <p style="margin: 2px 0">- %POLL_MULTIPLE_ANS_MAX%</p><br />
315
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('votefooter');" class="button" />
316
  </td>
317
+ <td valign="top"><textarea cols="80" rows="15" id="poll_template_votefooter" name="poll_template_votefooter"><?php echo esc_textarea( stripslashes( get_option( 'poll_template_votefooter' ) ) ); ?></textarea></td>
318
  </tr>
319
  </table>
320
 
334
  <p style="margin: 2px 0">- %POLL_MULTIPLE_ANS_MAX%</p><br />
335
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('resultheader');" class="button" />
336
  </td>
337
+ <td valign="top"><textarea cols="80" rows="15" id="poll_template_resultheader" name="poll_template_resultheader"><?php echo esc_textarea( stripslashes( get_option( 'poll_template_resultheader' ) ) ); ?></textarea></td>
338
  </tr>
339
  <tr>
340
  <td width="30%" valign="top">
349
  <p style="margin: 2px 0">- %POLL_ANSWER_IMAGEWIDTH%</p><br />
350
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('resultbody');" class="button" />
351
  </td>
352
+ <td valign="top"><textarea cols="80" rows="15" id="poll_template_resultbody" name="poll_template_resultbody"><?php echo esc_textarea( stripslashes( get_option( 'poll_template_resultbody' ) ) ); ?></textarea></td>
353
  </tr>
354
  <tr>
355
  <td width="30%" valign="top">
364
  <p style="margin: 2px 0">- %POLL_ANSWER_IMAGEWIDTH%</p><br />
365
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('resultbody2');" class="button" />
366
  </td>
367
+ <td valign="top"><textarea cols="80" rows="15" id="poll_template_resultbody2" name="poll_template_resultbody2"><?php echo esc_textarea( stripslashes( get_option( 'poll_template_resultbody2' ) ) ); ?></textarea></td>
368
  </tr>
369
  <tr>
370
  <td width="30%" valign="top">
384
  <p style="margin: 2px 0">- %POLL_MULTIPLE_ANS_MAX%</p><br />
385
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('resultfooter');" class="button" />
386
  </td>
387
+ <td valign="top"><textarea cols="80" rows="15" id="poll_template_resultfooter" name="poll_template_resultfooter"><?php echo esc_textarea( stripslashes( get_option( 'poll_template_resultfooter' ) ) ); ?></textarea></td>
388
  </tr>
389
  <tr>
390
  <td width="30%" valign="top">
404
  <p style="margin: 2px 0">- %POLL_MULTIPLE_ANS_MAX%</p><br />
405
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('resultfooter2');" class="button" />
406
  </td>
407
+ <td valign="top"><textarea cols="80" rows="15" id="poll_template_resultfooter2" name="poll_template_resultfooter2"><?php echo esc_textarea( stripslashes( get_option( 'poll_template_resultfooter2' ) ) ); ?></textarea></td>
408
  </tr>
409
  </table>
410
 
418
  <p style="margin: 2px 0">- %POLL_ARCHIVE_URL%</p><br />
419
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('pollarchivelink');" class="button" />
420
  </td>
421
+ <td valign="top"><textarea cols="80" rows="15" id="poll_template_pollarchivelink" name="poll_template_pollarchivelink"><?php echo esc_textarea( stripslashes( get_option( 'poll_template_pollarchivelink' ) ) ); ?></textarea></td>
422
  </tr>
423
  <tr>
424
  <td width="30%" valign="top">
427
  <p style="margin: 2px 0">- <?php _e('N/A', 'wp-polls'); ?></p><br />
428
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('pollarchiveheader');" class="button" />
429
  </td>
430
+ <td valign="top"><textarea cols="80" rows="15" id="poll_template_pollarchiveheader" name="poll_template_pollarchiveheader"><?php echo esc_textarea( stripslashes( get_option( 'poll_template_pollarchiveheader' ) ) ); ?></textarea></td>
431
  </tr>
432
  <tr>
433
  <td width="30%" valign="top">
446
  <p style="margin: 2px 0">- %POLL_MULTIPLE_ANS_MAX%</p><br />
447
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('pollarchivefooter');" class="button" />
448
  </td>
449
+ <td valign="top"><textarea cols="80" rows="15" id="poll_template_pollarchivefooter" name="poll_template_pollarchivefooter"><?php echo esc_textarea( stripslashes( get_option( 'poll_template_pollarchivefooter' ) ) ); ?></textarea></td>
450
  </tr>
451
  <tr>
452
  <td width="30%" valign="top">
455
  <p style="margin: 2px 0">- <?php _e('N/A', 'wp-polls'); ?></p><br />
456
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('pollarchivepagingheader');" class="button" />
457
  </td>
458
+ <td valign="top"><textarea cols="80" rows="15" id="poll_template_pollarchivepagingheader" name="poll_template_pollarchivepagingheader"><?php echo esc_textarea( stripslashes( get_option( 'poll_template_pollarchivepagingheader' ) ) ); ?></textarea></td>
459
  </tr>
460
  <tr>
461
  <td width="30%" valign="top">
464
  <p style="margin: 2px 0">- <?php _e('N/A', 'wp-polls'); ?></p><br />
465
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('pollarchivepagingfooter');" class="button" />
466
  </td>
467
+ <td valign="top"><textarea cols="80" rows="15" id="poll_template_pollarchivepagingfooter" name="poll_template_pollarchivepagingfooter"><?php echo esc_textarea( stripslashes( get_option( 'poll_template_pollarchivepagingfooter' ) ) ); ?></textarea></td>
468
  </tr>
469
  </table>
470
 
478
  <p style="margin: 2px 0">- <?php _e('N/A', 'wp-polls'); ?></p><br />
479
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('disable');" class="button" />
480
  </td>
481
+ <td valign="top"><textarea cols="80" rows="15" id="poll_template_disable" name="poll_template_disable"><?php echo esc_textarea( stripslashes( get_option( 'poll_template_disable' ) ) ); ?></textarea></td>
482
  </tr>
483
  <tr>
484
  <td width="30%" valign="top">
487
  <p style="margin: 2px 0">- <?php _e('N/A', 'wp-polls'); ?><br /><br />
488
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-polls'); ?>" onclick="poll_default_templates('error');" class="button" />
489
  </td>
490
+ <td valign="top"><textarea cols="80" rows="15" id="poll_template_error" name="poll_template_error"><?php echo esc_textarea( stripslashes( get_option( 'poll_template_error' ) ) ); ?></textarea></td>
491
  </tr>
492
  </table>
493
  <p class="submit">
readme.txt CHANGED
@@ -3,8 +3,8 @@ 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.2
7
- Stable tag: 2.69
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,14 @@ 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.69 =
31
  * NEW: Make use of wp_add_inline_style. Props @pathawks.
32
  * NEW: Create 2 filters for secret ballot. Props @afragen.
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.3
7
+ Stable tag: 2.70
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
+
31
+ = Version 2.70 =
32
+ * NEW: Add wp_polls_vote_poll_success action hook
33
+ * NEW: Add wp_polls_add_poll, wp_polls_update_poll, wp_polls_delete_poll action hooks
34
+ * FIXED: PHP Notices
35
+ * FIXED: Removed not needed wp_print_scripts
36
+ * FIXED: Use esc_attr() and esc_textarea() instead of htmlspecialchars(). Props [Govind Singh](https://in.linkedin.com/pub/govind-singh/21/1a9/bab)
37
+
38
  = Version 2.69 =
39
  * NEW: Make use of wp_add_inline_style. Props @pathawks.
40
  * NEW: Create 2 filters for secret ballot. Props @afragen.
wp-polls.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP-Polls
4
  Plugin URI: http://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.69
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: http://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.69 );
34
 
35
 
36
  ### Create Text Domain For Translations
@@ -165,13 +165,6 @@ function get_poll($temp_poll_id = 0, $display = true) {
165
  }
166
 
167
 
168
- ### Function: Print Polls Stylesheets That Are Dynamic And jQuery At The Top
169
- add_action('wp_head', 'poll_head_scripts');
170
- function poll_head_scripts() {
171
- wp_print_scripts('jquery');
172
- }
173
-
174
-
175
  ### Function: Enqueue Polls JavaScripts/CSS
176
  add_action('wp_enqueue_scripts', 'poll_scripts');
177
  function poll_scripts() {
@@ -187,8 +180,8 @@ function poll_scripts() {
187
  wp_enqueue_style('wp-polls-rtl', plugins_url('wp-polls/polls-css-rtl.css'), false, WP_POLLS_VERSION, 'all');
188
  }
189
  }
190
- $pollbar = get_option('poll_bar');
191
- if($pollbar['style'] == 'use_css') {
192
  $pollbar_css = '.wp-polls .pollbar {'."\n";
193
  $pollbar_css .= "\t".'margin: 1px;'."\n";
194
  $pollbar_css .= "\t".'font-size: '.($pollbar['height']-2).'px;'."\n";
@@ -209,7 +202,6 @@ function poll_scripts() {
209
  }
210
  wp_add_inline_style( 'wp-polls', $pollbar_css );
211
  $poll_ajax_style = get_option('poll_ajax_style');
212
- $pollbar = get_option('poll_bar');
213
  wp_enqueue_script('wp-polls', plugins_url('wp-polls/polls-js.js'), array('jquery'), WP_POLLS_VERSION, true);
214
  wp_localize_script('wp-polls', 'pollsL10n', array(
215
  'ajax_url' => admin_url('admin-ajax.php'),
@@ -482,6 +474,7 @@ function display_pollvote($poll_id, $display_loading = true) {
482
  $poll_answer_id = intval($poll_answer->polla_aid);
483
  $poll_answer_text = stripslashes($poll_answer->polla_answers);
484
  $poll_answer_votes = intval($poll_answer->polla_votes);
 
485
  $template_answer = stripslashes(get_option('poll_template_votebody'));
486
 
487
  $template_answer = apply_filters('poll_template_votebody_markup', $template_answer, $poll_answer, array(
@@ -489,6 +482,7 @@ function display_pollvote($poll_id, $display_loading = true) {
489
  '%POLL_ANSWER_ID%' => $poll_answer_id,
490
  '%POLL_ANSWER%' => $poll_answer_text,
491
  '%POLL_ANSWER_VOTES%' => number_format_i18n($poll_answer_votes),
 
492
  "%POLL_CHECKBOX_RADIO%" => $poll_multiple_ans > 0 ? 'checkbox' : 'radio'
493
  ));
494
 
@@ -556,8 +550,7 @@ function display_pollresult($poll_id, $user_voted = '', $display_loading = true)
556
  $poll_question = $wpdb->get_row("SELECT pollq_id, pollq_question, pollq_totalvotes, pollq_active, pollq_timestamp, pollq_expiry, pollq_multiple, pollq_totalvoters FROM $wpdb->pollsq WHERE pollq_id = $poll_id LIMIT 1");
557
  // No poll could be loaded from the database
558
  if (!$poll_question) {
559
- echo stripslashes(get_option('poll_template_disable'));
560
- return;
561
  }
562
  // Poll Question Variables
563
  $poll_question_text = stripslashes($poll_question->pollq_question);
@@ -745,13 +738,13 @@ function poll_page_shortcode($atts) {
745
 
746
  ### Function: Short Code For Inserting Polls Into Posts
747
  add_shortcode( 'poll', 'poll_shortcode' );
748
- function poll_shortcode($atts) {
749
  $attributes = shortcode_atts( array( 'id' => 0, 'type' => 'vote' ), $atts );
750
- if( !is_feed() ) {
751
  $id = intval( $attributes['id'] );
752
 
753
  // To maintain backward compatibility with [poll=1]. Props @tz-ua
754
- if( !$id ) {
755
  $id = intval( trim( $atts[0], '="\'' ) );
756
  }
757
 
@@ -1360,6 +1353,7 @@ function vote_poll() {
1360
  $wpdb->query("INSERT INTO $wpdb->pollsip VALUES (0, $poll_id, $polla_aid, '$pollip_ip', '$pollip_host', '$pollip_timestamp', '$pollip_user', $pollip_userid)");
1361
  }
1362
  echo display_pollresult($poll_id, $poll_aid_array, false);
 
1363
  } else {
1364
  printf(__('Unable To Update Poll Total Votes And Poll Total Voters. Poll ID #%s', 'wp-polls'), $poll_id);
1365
  } // End if($vote_a)
@@ -1485,6 +1479,7 @@ function manage_poll() {
1485
  // Update Lastest Poll ID To Poll Options
1486
  $latest_pollid = polls_latest_id();
1487
  $update_latestpoll = update_option('poll_latestpoll', $latest_pollid);
 
1488
  break;
1489
  }
1490
  exit();
@@ -1531,9 +1526,9 @@ function polls_page_general_stats($content) {
1531
  ### Class: WP-Polls Widget
1532
  class WP_Widget_Polls extends WP_Widget {
1533
  // Constructor
1534
- function WP_Widget_Polls() {
1535
  $widget_ops = array('description' => __('WP-Polls polls', 'wp-polls'));
1536
- $this->WP_Widget('polls-widget', __('Polls', 'wp-polls'), $widget_ops);
1537
  }
1538
 
1539
  // Display Widget
@@ -1636,10 +1631,9 @@ function polls_activation( $network_wide )
1636
  {
1637
  switch_to_blog( $ms_site['blog_id'] );
1638
  polls_activate();
 
1639
  }
1640
  }
1641
-
1642
- restore_current_blog();
1643
  }
1644
  else
1645
  {
@@ -1650,10 +1644,10 @@ function polls_activation( $network_wide )
1650
  function polls_activate() {
1651
  global $wpdb;
1652
 
1653
- if(@is_file(ABSPATH.'/wp-admin/upgrade-functions.php')) {
1654
- include_once(ABSPATH.'/wp-admin/upgrade-functions.php');
1655
- } elseif(@is_file(ABSPATH.'/wp-admin/includes/upgrade.php')) {
1656
  include_once(ABSPATH.'/wp-admin/includes/upgrade.php');
 
 
1657
  } else {
1658
  die('We have problem finding your \'/wp-admin/upgrade-functions.php\' and \'/wp-admin/includes/upgrade.php\'');
1659
  }
3
  Plugin Name: WP-Polls
4
  Plugin URI: http://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.70
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: http://lesterchan.net
9
  Text Domain: wp-polls
30
 
31
 
32
  ### Version
33
+ define( 'WP_POLLS_VERSION', 2.70 );
34
 
35
 
36
  ### Create Text Domain For Translations
165
  }
166
 
167
 
 
 
 
 
 
 
 
168
  ### Function: Enqueue Polls JavaScripts/CSS
169
  add_action('wp_enqueue_scripts', 'poll_scripts');
170
  function poll_scripts() {
180
  wp_enqueue_style('wp-polls-rtl', plugins_url('wp-polls/polls-css-rtl.css'), false, WP_POLLS_VERSION, 'all');
181
  }
182
  }
183
+ $pollbar = get_option( 'poll_bar' );
184
+ if( $pollbar['style'] === 'use_css' ) {
185
  $pollbar_css = '.wp-polls .pollbar {'."\n";
186
  $pollbar_css .= "\t".'margin: 1px;'."\n";
187
  $pollbar_css .= "\t".'font-size: '.($pollbar['height']-2).'px;'."\n";
202
  }
203
  wp_add_inline_style( 'wp-polls', $pollbar_css );
204
  $poll_ajax_style = get_option('poll_ajax_style');
 
205
  wp_enqueue_script('wp-polls', plugins_url('wp-polls/polls-js.js'), array('jquery'), WP_POLLS_VERSION, true);
206
  wp_localize_script('wp-polls', 'pollsL10n', array(
207
  'ajax_url' => admin_url('admin-ajax.php'),
474
  $poll_answer_id = intval($poll_answer->polla_aid);
475
  $poll_answer_text = stripslashes($poll_answer->polla_answers);
476
  $poll_answer_votes = intval($poll_answer->polla_votes);
477
+ $poll_answer_percentage = $poll_question_totalvoters > 0 ? round((($poll_answer_votes/$poll_question_totalvoters)*100)) : 0;
478
  $template_answer = stripslashes(get_option('poll_template_votebody'));
479
 
480
  $template_answer = apply_filters('poll_template_votebody_markup', $template_answer, $poll_answer, array(
482
  '%POLL_ANSWER_ID%' => $poll_answer_id,
483
  '%POLL_ANSWER%' => $poll_answer_text,
484
  '%POLL_ANSWER_VOTES%' => number_format_i18n($poll_answer_votes),
485
+ '%POLL_ANSWER_PERCENTAGE%' => $poll_answer_percentage,
486
  "%POLL_CHECKBOX_RADIO%" => $poll_multiple_ans > 0 ? 'checkbox' : 'radio'
487
  ));
488
 
550
  $poll_question = $wpdb->get_row("SELECT pollq_id, pollq_question, pollq_totalvotes, pollq_active, pollq_timestamp, pollq_expiry, pollq_multiple, pollq_totalvoters FROM $wpdb->pollsq WHERE pollq_id = $poll_id LIMIT 1");
551
  // No poll could be loaded from the database
552
  if (!$poll_question) {
553
+ return stripslashes(get_option('poll_template_disable'));
 
554
  }
555
  // Poll Question Variables
556
  $poll_question_text = stripslashes($poll_question->pollq_question);
738
 
739
  ### Function: Short Code For Inserting Polls Into Posts
740
  add_shortcode( 'poll', 'poll_shortcode' );
741
+ function poll_shortcode( $atts ) {
742
  $attributes = shortcode_atts( array( 'id' => 0, 'type' => 'vote' ), $atts );
743
+ if( ! is_feed() ) {
744
  $id = intval( $attributes['id'] );
745
 
746
  // To maintain backward compatibility with [poll=1]. Props @tz-ua
747
+ if( ! $id && isset( $atts[0] ) ) {
748
  $id = intval( trim( $atts[0], '="\'' ) );
749
  }
750
 
1353
  $wpdb->query("INSERT INTO $wpdb->pollsip VALUES (0, $poll_id, $polla_aid, '$pollip_ip', '$pollip_host', '$pollip_timestamp', '$pollip_user', $pollip_userid)");
1354
  }
1355
  echo display_pollresult($poll_id, $poll_aid_array, false);
1356
+ do_action( 'wp_polls_vote_poll_success' );
1357
  } else {
1358
  printf(__('Unable To Update Poll Total Votes And Poll Total Voters. Poll ID #%s', 'wp-polls'), $poll_id);
1359
  } // End if($vote_a)
1479
  // Update Lastest Poll ID To Poll Options
1480
  $latest_pollid = polls_latest_id();
1481
  $update_latestpoll = update_option('poll_latestpoll', $latest_pollid);
1482
+ do_action( 'wp_polls_delete_poll', $pollq_id );
1483
  break;
1484
  }
1485
  exit();
1526
  ### Class: WP-Polls Widget
1527
  class WP_Widget_Polls extends WP_Widget {
1528
  // Constructor
1529
+ function __construct() {
1530
  $widget_ops = array('description' => __('WP-Polls polls', 'wp-polls'));
1531
+ parent::__construct('polls-widget', __('Polls', 'wp-polls'), $widget_ops);
1532
  }
1533
 
1534
  // Display Widget
1631
  {
1632
  switch_to_blog( $ms_site['blog_id'] );
1633
  polls_activate();
1634
+ restore_current_blog();
1635
  }
1636
  }
 
 
1637
  }
1638
  else
1639
  {
1644
  function polls_activate() {
1645
  global $wpdb;
1646
 
1647
+ if(@is_file(ABSPATH.'/wp-admin/includes/upgrade.php')) {
 
 
1648
  include_once(ABSPATH.'/wp-admin/includes/upgrade.php');
1649
+ } elseif(@is_file(ABSPATH.'/wp-admin/upgrade-functions.php')) {
1650
+ include_once(ABSPATH.'/wp-admin/upgrade-functions.php');
1651
  } else {
1652
  die('We have problem finding your \'/wp-admin/upgrade-functions.php\' and \'/wp-admin/includes/upgrade.php\'');
1653
  }
wp-polls.pot CHANGED
@@ -1,106 +1,119 @@
1
- # Copyright (C) 2014 WP-Polls
2
  # This file is distributed under the same license as the WP-Polls package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WP-Polls 2.67\n"
6
- "Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-polls\n"
7
- "POT-Creation-Date: 2014-12-03 14:55:28+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
- #: polls-add.php:34 polls-add.php:110 polls-add.php:177 wp-polls.php:56
16
  msgid "Add Poll"
17
  msgstr ""
18
 
19
- #: polls-add.php:79
20
  msgid "Error In Adding Poll '%s'."
21
  msgstr ""
22
 
23
- #: polls-add.php:88 polls-manager.php:129
24
  msgid "Error In Adding Poll's Answer '%s'."
25
  msgstr ""
26
 
27
- #: polls-add.php:95
28
- msgid "Poll '%s' (ID: %s) Added Successfully."
29
  msgstr ""
30
 
31
- #: polls-add.php:95 polls-manager.php:325 wp-polls.php:55
32
- msgid "Manage Polls"
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  msgstr ""
34
 
35
- #: polls-add.php:112 polls-manager.php:178
36
  msgid "Poll Question"
37
  msgstr ""
38
 
39
- #: polls-add.php:115 polls-manager.php:181 polls-manager.php:332
40
  msgid "Question"
41
  msgstr ""
42
 
43
- #: polls-add.php:120 polls-manager.php:186
44
  msgid "Poll Answers"
45
  msgstr ""
46
 
47
- #: polls-add.php:125 polls-manager.php:221
48
  msgid "Add Answer"
49
  msgstr ""
50
 
51
- #: polls-add.php:132 polls-manager.php:208
52
  msgid "Answer %s"
53
  msgstr ""
54
 
55
- #: polls-add.php:133 wp-polls.php:249
56
  msgid "Remove"
57
  msgstr ""
58
 
59
- #: polls-add.php:141 polls-manager.php:232
60
  msgid "Poll Multiple Answers"
61
  msgstr ""
62
 
63
- #: polls-add.php:144 polls-manager.php:235
64
  msgid "Allows Users To Select More Than One Answer?"
65
  msgstr ""
66
 
67
- #: polls-add.php:147 polls-manager.php:238 polls-options.php:199
68
- #: polls-options.php:208 polls-options.php:325 wp-polls.php:1576
69
  msgid "No"
70
  msgstr ""
71
 
72
- #: polls-add.php:148 polls-logs.php:383 polls-manager.php:239
73
  #: polls-manager.php:461 polls-options.php:200 polls-options.php:209
74
- #: polls-options.php:326 polls-uninstall.php:127 wp-polls.php:1577
75
  msgid "Yes"
76
  msgstr ""
77
 
78
- #: polls-add.php:153 polls-manager.php:244
79
  msgid "Maximum Number Of Selected Answers Allowed?"
80
  msgstr ""
81
 
82
- #: polls-add.php:166 polls-manager.php:261
83
  msgid "Poll Start/End Date"
84
  msgstr ""
85
 
86
- #: polls-add.php:169 polls-manager.php:264 polls-manager.php:334
87
  msgid "Start Date/Time"
88
  msgstr ""
89
 
90
- #: polls-add.php:173 polls-manager.php:272 polls-manager.php:335
91
  msgid "End Date/Time"
92
  msgstr ""
93
 
94
- #: polls-add.php:174 polls-manager.php:283
95
  msgid "Do NOT Expire This Poll"
96
  msgstr ""
97
 
98
- #: polls-add.php:177 polls-manager.php:307
99
  msgid "Cancel"
100
  msgstr ""
101
 
102
  #: polls-logs.php:34 polls-logs.php:35 polls-logs.php:38 polls-logs.php:70
103
- #: polls-logs.php:74 polls-logs.php:107 polls-logs.php:110 wp-polls.php:1327
104
  msgid "Guest"
105
  msgstr ""
106
 
@@ -117,28 +130,26 @@ msgstr[1] ""
117
 
118
  #: polls-logs.php:132
119
  msgid ""
120
- "<strong>&raquo;</strong> <strong>%s</strong> vote is casted by registered "
121
- "users"
122
  msgid_plural ""
123
- "<strong>&raquo;</strong> <strong>%s</strong> votes are casted by registered "
124
  "users"
125
  msgstr[0] ""
126
  msgstr[1] ""
127
 
128
  #: polls-logs.php:133
129
  msgid ""
130
- "<strong>&raquo;</strong> <strong>%s</strong> vote is casted by comment "
131
- "authors"
132
  msgid_plural ""
133
- "<strong>&raquo;</strong> <strong>%s</strong> votes are casted by comment "
134
  "authors"
135
  msgstr[0] ""
136
  msgstr[1] ""
137
 
138
  #: polls-logs.php:134
139
- msgid "<strong>&raquo;</strong> <strong>%s</strong> vote is casted by guests"
140
  msgid_plural ""
141
- "<strong>&raquo;</strong> <strong>%s</strong> votes are casted by guests"
142
  msgstr[0] ""
143
  msgstr[1] ""
144
 
@@ -225,7 +236,7 @@ msgid ""
225
  "This default filter is limited to display only <strong>%s</strong> records."
226
  msgstr ""
227
 
228
- #: polls-logs.php:289 polls-logs.php:334 wp-polls.php:248
229
  msgid "Answer"
230
  msgstr ""
231
 
@@ -243,8 +254,8 @@ msgstr ""
243
 
244
  #: polls-logs.php:299 polls-logs.php:329 polls-manager.php:266
245
  #: polls-manager.php:278 polls-manager.php:355 polls-manager.php:363
246
- #: wp-polls.php:449 wp-polls.php:454 wp-polls.php:567 wp-polls.php:572
247
- #: wp-polls.php:982 wp-polls.php:986
248
  msgid "%s @ %s"
249
  msgstr ""
250
 
@@ -280,7 +291,7 @@ msgstr ""
280
  msgid "Are You Sure You Want To Delete Logs For This Poll Only?"
281
  msgstr ""
282
 
283
- #: polls-logs.php:384 wp-polls.php:243 wp-polls.php:1406
284
  msgid "Delete Logs For This Poll Only"
285
  msgstr ""
286
 
@@ -365,7 +376,7 @@ msgstr ""
365
  msgid "This Poll Will Not Expire"
366
  msgstr ""
367
 
368
- #: polls-manager.php:305 wp-polls.php:247 wp-polls.php:1449
369
  msgid "Close Poll"
370
  msgstr ""
371
 
@@ -373,7 +384,7 @@ msgstr ""
373
  msgid "You are about to CLOSE this poll '%s'."
374
  msgstr ""
375
 
376
- #: polls-manager.php:306 wp-polls.php:246 wp-polls.php:1437
377
  msgid "Open Poll"
378
  msgstr ""
379
 
@@ -381,7 +392,11 @@ msgstr ""
381
  msgid "You are about to OPEN this poll '%s'."
382
  msgstr ""
383
 
384
- #: polls-manager.php:326 wp-polls.php:53 wp-polls.php:1530 wp-polls.php:1565
 
 
 
 
385
  msgid "Polls"
386
  msgstr ""
387
 
@@ -390,7 +405,7 @@ msgid "ID"
390
  msgstr ""
391
 
392
  #: polls-manager.php:333 polls-templates.php:121 polls-templates.php:124
393
- #: wp-polls.php:1707 wp-polls.php:1710
394
  msgid "Total Voters"
395
  msgstr ""
396
 
@@ -402,7 +417,7 @@ msgstr ""
402
  msgid "Action"
403
  msgstr ""
404
 
405
- #: polls-manager.php:361 wp-polls.php:452 wp-polls.php:570 wp-polls.php:984
406
  msgid "No Expiry"
407
  msgstr ""
408
 
@@ -451,7 +466,7 @@ msgid "Total Polls' Answers:"
451
  msgstr ""
452
 
453
  #: polls-manager.php:440
454
- msgid "Total Votes Casted:"
455
  msgstr ""
456
 
457
  #: polls-manager.php:453
@@ -462,7 +477,7 @@ msgstr ""
462
  msgid "Are You Sure You Want To Delete All Polls Logs?"
463
  msgstr ""
464
 
465
- #: polls-manager.php:462 wp-polls.php:241 wp-polls.php:1394
466
  msgid "Delete All Logs"
467
  msgstr ""
468
 
@@ -470,7 +485,7 @@ msgstr ""
470
  msgid "You are about to delete all poll logs. This action is not reversible."
471
  msgstr ""
472
 
473
- #: polls-manager.php:465 wp-polls.php:240
474
  msgid "No poll logs available."
475
  msgstr ""
476
 
@@ -724,15 +739,15 @@ msgstr ""
724
  msgid "Current Active Poll"
725
  msgstr ""
726
 
727
- #: polls-options.php:343 wp-polls.php:1584
728
  msgid "Do NOT Display Poll (Disable)"
729
  msgstr ""
730
 
731
- #: polls-options.php:344 wp-polls.php:1585
732
  msgid "Display Random Poll"
733
  msgstr ""
734
 
735
- #: polls-options.php:345 wp-polls.php:1586
736
  msgid "Display Latest Poll"
737
  msgstr ""
738
 
@@ -816,54 +831,54 @@ msgstr ""
816
  msgid "Poll Error Template"
817
  msgstr ""
818
 
819
- #: polls-templates.php:109 polls-templates.php:124 wp-polls.php:1698
820
- #: wp-polls.php:1711
821
  msgid "Vote"
822
  msgstr ""
823
 
824
- #: polls-templates.php:109 wp-polls.php:1699
825
  msgid "View Results Of This Poll"
826
  msgstr ""
827
 
828
- #: polls-templates.php:109 wp-polls.php:1699
829
  msgid "View Results"
830
  msgstr ""
831
 
832
- #: polls-templates.php:115 polls-templates.php:118 wp-polls.php:1704
833
- #: wp-polls.php:1705
834
  msgid ","
835
  msgstr ""
836
 
837
- #: polls-templates.php:115 polls-templates.php:118 wp-polls.php:1704
838
- #: wp-polls.php:1705
839
  msgid "Votes"
840
  msgstr ""
841
 
842
- #: polls-templates.php:118 wp-polls.php:1705
843
  msgid "You Have Voted For This Choice"
844
  msgstr ""
845
 
846
- #: polls-templates.php:124 wp-polls.php:1711
847
  msgid "Vote For This Poll"
848
  msgstr ""
849
 
850
- #: polls-templates.php:127 wp-polls.php:1737
851
  msgid "Polls Archive"
852
  msgstr ""
853
 
854
- #: polls-templates.php:133 wp-polls.php:1741
855
  msgid "Start Date:"
856
  msgstr ""
857
 
858
- #: polls-templates.php:133 wp-polls.php:1741
859
  msgid "End Date:"
860
  msgstr ""
861
 
862
- #: polls-templates.php:142 wp-polls.php:1713
863
  msgid "Sorry, there are no polls available at the moment."
864
  msgstr ""
865
 
866
- #: polls-templates.php:145 wp-polls.php:1714
867
  msgid "An error has occurred when processing your poll."
868
  msgstr ""
869
 
@@ -1102,276 +1117,219 @@ msgstr ""
1102
  msgid "Displayed When An Error Has Occured While Processing The Poll"
1103
  msgstr ""
1104
 
1105
- #: polls-uninstall.php:39 polls-uninstall.php:128
1106
- msgid "UNINSTALL WP-Polls"
1107
- msgstr ""
1108
-
1109
- #: polls-uninstall.php:47
1110
- msgid "Table '%s' has been deleted."
1111
- msgstr ""
1112
-
1113
- #: polls-uninstall.php:56
1114
- msgid "Setting Key '%s' has been deleted."
1115
- msgstr ""
1116
-
1117
- #: polls-uninstall.php:75 polls-uninstall.php:86 wp-polls.php:59
1118
- msgid "Uninstall WP-Polls"
1119
- msgstr ""
1120
-
1121
- #: polls-uninstall.php:76
1122
- msgid ""
1123
- "<a href=\"%s\">Click Here</a> To Finish The Uninstallation And WP-Polls Will "
1124
- "Be Deactivated Automatically."
1125
- msgstr ""
1126
-
1127
- #: polls-uninstall.php:88
1128
- msgid ""
1129
- "Deactivating WP-Polls plugin does not remove any data that may have been "
1130
- "created, such as the poll data and the poll's voting logs. To completely "
1131
- "remove this plugin, you can uninstall it here."
1132
- msgstr ""
1133
-
1134
- #: polls-uninstall.php:91
1135
- msgid "WARNING:"
1136
- msgstr ""
1137
-
1138
- #: polls-uninstall.php:92
1139
- msgid ""
1140
- "Once uninstalled, this cannot be undone. You should use a Database Backup "
1141
- "plugin of WordPress to back up all the data first."
1142
- msgstr ""
1143
-
1144
- #: polls-uninstall.php:95
1145
- msgid "The following WordPress Options/Tables will be DELETED:"
1146
- msgstr ""
1147
-
1148
- #: polls-uninstall.php:100
1149
- msgid "WordPress Options"
1150
- msgstr ""
1151
-
1152
- #: polls-uninstall.php:101
1153
- msgid "WordPress Tables"
1154
- msgstr ""
1155
-
1156
- #: polls-uninstall.php:126
1157
- msgid "Do you really want to uninstall WP-Polls?"
1158
- msgstr ""
1159
-
1160
- #: polls-uninstall.php:128
1161
- msgid ""
1162
- "You Are About To Uninstall WP-Polls From WordPress.\\nThis Action Is Not "
1163
- "Reversible.\\n\\n Choose [Cancel] To Stop, [OK] To Uninstall."
1164
- msgstr ""
1165
-
1166
- #: wp-polls.php:219
1167
  msgid "Your last request is still being processed. Please wait a while ..."
1168
  msgstr ""
1169
 
1170
- #: wp-polls.php:220
1171
  msgid "Please choose a valid poll answer."
1172
  msgstr ""
1173
 
1174
- #: wp-polls.php:221
1175
  msgid "Maximum number of choices allowed: "
1176
  msgstr ""
1177
 
1178
- #: wp-polls.php:239 wp-polls.php:1461
1179
  msgid "Delete Poll"
1180
  msgstr ""
1181
 
1182
- #: wp-polls.php:242
1183
  msgid "Please check the \\'Yes\\' checkbox if you want to delete all logs."
1184
  msgstr ""
1185
 
1186
- #: wp-polls.php:244
1187
  msgid ""
1188
  "Please check the \\'Yes\\' checkbox if you want to delete all logs for this "
1189
  "poll ONLY."
1190
  msgstr ""
1191
 
1192
- #: wp-polls.php:245 wp-polls.php:1420
1193
  msgid "Delete Poll Answer"
1194
  msgstr ""
1195
 
1196
- #: wp-polls.php:263
1197
  msgid "Poll"
1198
  msgstr ""
1199
 
1200
- #: wp-polls.php:264 wp-polls.php:301
1201
  msgid "Enter Poll ID"
1202
  msgstr ""
1203
 
1204
- #: wp-polls.php:266 wp-polls.php:302
1205
  msgid "Error: Poll ID must be numeric"
1206
  msgstr ""
1207
 
1208
- #: wp-polls.php:266 wp-polls.php:303
1209
  msgid "Please enter Poll ID again"
1210
  msgstr ""
1211
 
1212
- #: wp-polls.php:304
1213
  msgid "Insert Poll"
1214
  msgstr ""
1215
 
1216
- #: wp-polls.php:530 wp-polls.php:706
1217
  msgid "Loading"
1218
  msgstr ""
1219
 
1220
- #: wp-polls.php:759
1221
  msgid ""
1222
  "Note: There is a poll embedded within this post, please visit the site to "
1223
  "participate in this post's poll."
1224
  msgstr ""
1225
 
1226
- #: wp-polls.php:1125
1227
  msgid "Page %s of %s"
1228
  msgstr ""
1229
 
1230
- #: wp-polls.php:1127
1231
  msgid "&laquo; First"
1232
  msgstr ""
1233
 
1234
- #: wp-polls.php:1131
1235
  msgid "&laquo;"
1236
  msgstr ""
1237
 
1238
- #: wp-polls.php:1141
1239
  msgid "&raquo;"
1240
  msgstr ""
1241
 
1242
- #: wp-polls.php:1145
1243
  msgid "Last &raquo;"
1244
  msgstr ""
1245
 
1246
- #: wp-polls.php:1300
1247
  msgid "Invalid Poll ID"
1248
  msgstr ""
1249
 
1250
- #: wp-polls.php:1307
1251
  msgid "Failed To Verify Referrer"
1252
  msgstr ""
1253
 
1254
- #: wp-polls.php:1357
1255
  msgid "Unable To Update Poll Total Votes And Poll Total Voters. Poll ID #%s"
1256
  msgstr ""
1257
 
1258
- #: wp-polls.php:1360
1259
  msgid "You Had Already Voted For This Poll. Poll ID #%s"
1260
  msgstr ""
1261
 
1262
- #: wp-polls.php:1363
 
 
 
 
1263
  msgid "Invalid Poll ID. Poll ID #%s"
1264
  msgstr ""
1265
 
1266
- #: wp-polls.php:1399
1267
  msgid "All Polls Logs Have Been Deleted."
1268
  msgstr ""
1269
 
1270
- #: wp-polls.php:1401
1271
  msgid "An Error Has Occurred While Deleting All Polls Logs."
1272
  msgstr ""
1273
 
1274
- #: wp-polls.php:1413
1275
  msgid "All Logs For '%s' Has Been Deleted."
1276
  msgstr ""
1277
 
1278
- #: wp-polls.php:1415
1279
  msgid "An Error Has Occurred While Deleting All Logs For '%s'"
1280
  msgstr ""
1281
 
1282
- #: wp-polls.php:1431
1283
  msgid "Poll Answer '%s' Deleted Successfully."
1284
  msgstr ""
1285
 
1286
- #: wp-polls.php:1433
1287
  msgid "Error In Deleting Poll Answer '%s'."
1288
  msgstr ""
1289
 
1290
- #: wp-polls.php:1443
1291
  msgid "Poll '%s' Is Now Opened"
1292
  msgstr ""
1293
 
1294
- #: wp-polls.php:1445
1295
  msgid "Error Opening Poll '%s'"
1296
  msgstr ""
1297
 
1298
- #: wp-polls.php:1455
1299
  msgid "Poll '%s' Is Now Closed"
1300
  msgstr ""
1301
 
1302
- #: wp-polls.php:1457
1303
  msgid "Error Closing Poll '%s'"
1304
  msgstr ""
1305
 
1306
- #: wp-polls.php:1470
1307
  msgid "Error In Deleting Poll '%s' Question"
1308
  msgstr ""
1309
 
1310
- #: wp-polls.php:1473
1311
  msgid "Poll '%s' Deleted Successfully"
1312
  msgstr ""
1313
 
1314
- #. #-#-#-#-# plugin.pot (WP-Polls 2.67) #-#-#-#-#
1315
  #. Plugin Name of the plugin/theme
1316
- #: wp-polls.php:1502 wp-polls.php:1504 wp-polls.php:1514
1317
  msgid "WP-Polls"
1318
  msgstr ""
1319
 
1320
- #: wp-polls.php:1516
1321
  msgid "<strong>%s</strong> poll was created."
1322
  msgid_plural "<strong>%s</strong> polls were created."
1323
  msgstr[0] ""
1324
  msgstr[1] ""
1325
 
1326
- #: wp-polls.php:1517
1327
  msgid "<strong>%s</strong> polls' answer was given."
1328
  msgid_plural "<strong>%s</strong> polls' answers were given."
1329
  msgstr[0] ""
1330
  msgstr[1] ""
1331
 
1332
- #: wp-polls.php:1518
1333
- msgid "<strong>%s</strong> vote was casted."
1334
- msgid_plural "<strong>%s</strong> votes were casted."
1335
  msgstr[0] ""
1336
  msgstr[1] ""
1337
 
1338
- #: wp-polls.php:1529
1339
  msgid "WP-Polls polls"
1340
  msgstr ""
1341
 
1342
- #: wp-polls.php:1571
1343
  msgid "Title:"
1344
  msgstr ""
1345
 
1346
- #: wp-polls.php:1574
1347
  msgid "Display Polls Archive Link Below Poll?"
1348
  msgstr ""
1349
 
1350
- #: wp-polls.php:1582
1351
  msgid "Poll To Display:"
1352
  msgstr ""
1353
 
1354
- #: wp-polls.php:1682
1355
  msgid "How Is My Site?"
1356
  msgstr ""
1357
 
1358
- #: wp-polls.php:1685
1359
  msgid "Good"
1360
  msgstr ""
1361
 
1362
- #: wp-polls.php:1686
1363
  msgid "Excellent"
1364
  msgstr ""
1365
 
1366
- #: wp-polls.php:1687
1367
  msgid "Bad"
1368
  msgstr ""
1369
 
1370
- #: wp-polls.php:1688
1371
  msgid "Can Be Improved"
1372
  msgstr ""
1373
 
1374
- #: wp-polls.php:1689
1375
  msgid "No Comments"
1376
  msgstr ""
1377
 
1
+ # Copyright (C) 2015 WP-Polls
2
  # This file is distributed under the same license as the WP-Polls package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WP-Polls 2.69\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/wp-polls\n"
7
+ "POT-Creation-Date: 2015-06-06 05:39:11+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
+ #: polls-add.php:16 polls-add.php:104 polls-add.php:171 wp-polls.php:56
16
  msgid "Add Poll"
17
  msgstr ""
18
 
19
+ #: polls-add.php:62
20
  msgid "Error In Adding Poll '%s'."
21
  msgstr ""
22
 
23
+ #: polls-add.php:72 polls-manager.php:129
24
  msgid "Error In Adding Poll's Answer '%s'."
25
  msgstr ""
26
 
27
+ #: polls-add.php:75
28
+ msgid "Poll's Answer is empty."
29
  msgstr ""
30
 
31
+ #: polls-add.php:82
32
+ msgid ""
33
+ "Poll '%s' (ID: %s) added successfully. Embed this poll with the shortcode: "
34
+ "%s or go back to <a href=\"%s\">Manage Polls</a>"
35
+ msgstr ""
36
+
37
+ #: polls-add.php:85
38
+ msgid ""
39
+ "Poll '%s' (ID: %s) (Shortcode: %s) added successfully, but there are some "
40
+ "errors with the Poll's Answers. Embed this poll with the shortcode: %s or go "
41
+ "back to <a href=\"%s\">Manage Polls</a>"
42
+ msgstr ""
43
+
44
+ #: polls-add.php:90
45
+ msgid "Poll Question is empty."
46
  msgstr ""
47
 
48
+ #: polls-add.php:106 polls-manager.php:178
49
  msgid "Poll Question"
50
  msgstr ""
51
 
52
+ #: polls-add.php:109 polls-manager.php:181 polls-manager.php:332
53
  msgid "Question"
54
  msgstr ""
55
 
56
+ #: polls-add.php:114 polls-manager.php:186
57
  msgid "Poll Answers"
58
  msgstr ""
59
 
60
+ #: polls-add.php:119 polls-manager.php:221
61
  msgid "Add Answer"
62
  msgstr ""
63
 
64
+ #: polls-add.php:126 polls-manager.php:208
65
  msgid "Answer %s"
66
  msgstr ""
67
 
68
+ #: polls-add.php:127 wp-polls.php:245
69
  msgid "Remove"
70
  msgstr ""
71
 
72
+ #: polls-add.php:135 polls-manager.php:232
73
  msgid "Poll Multiple Answers"
74
  msgstr ""
75
 
76
+ #: polls-add.php:138 polls-manager.php:235
77
  msgid "Allows Users To Select More Than One Answer?"
78
  msgstr ""
79
 
80
+ #: polls-add.php:141 polls-manager.php:238 polls-options.php:199
81
+ #: polls-options.php:208 polls-options.php:325 wp-polls.php:1582
82
  msgid "No"
83
  msgstr ""
84
 
85
+ #: polls-add.php:142 polls-logs.php:383 polls-manager.php:239
86
  #: polls-manager.php:461 polls-options.php:200 polls-options.php:209
87
+ #: polls-options.php:326 wp-polls.php:1583
88
  msgid "Yes"
89
  msgstr ""
90
 
91
+ #: polls-add.php:147 polls-manager.php:244
92
  msgid "Maximum Number Of Selected Answers Allowed?"
93
  msgstr ""
94
 
95
+ #: polls-add.php:160 polls-manager.php:261
96
  msgid "Poll Start/End Date"
97
  msgstr ""
98
 
99
+ #: polls-add.php:163 polls-manager.php:264 polls-manager.php:334
100
  msgid "Start Date/Time"
101
  msgstr ""
102
 
103
+ #: polls-add.php:167 polls-manager.php:272 polls-manager.php:335
104
  msgid "End Date/Time"
105
  msgstr ""
106
 
107
+ #: polls-add.php:168 polls-manager.php:283
108
  msgid "Do NOT Expire This Poll"
109
  msgstr ""
110
 
111
+ #: polls-add.php:171 polls-manager.php:307
112
  msgid "Cancel"
113
  msgstr ""
114
 
115
  #: polls-logs.php:34 polls-logs.php:35 polls-logs.php:38 polls-logs.php:70
116
+ #: polls-logs.php:74 polls-logs.php:107 polls-logs.php:110 wp-polls.php:1334
117
  msgid "Guest"
118
  msgstr ""
119
 
130
 
131
  #: polls-logs.php:132
132
  msgid ""
133
+ "<strong>&raquo;</strong> <strong>%s</strong> vote is cast by registered users"
 
134
  msgid_plural ""
135
+ "<strong>&raquo;</strong> <strong>%s</strong> votes are cast by registered "
136
  "users"
137
  msgstr[0] ""
138
  msgstr[1] ""
139
 
140
  #: polls-logs.php:133
141
  msgid ""
142
+ "<strong>&raquo;</strong> <strong>%s</strong> vote is cast by comment authors"
 
143
  msgid_plural ""
144
+ "<strong>&raquo;</strong> <strong>%s</strong> votes are cast by comment "
145
  "authors"
146
  msgstr[0] ""
147
  msgstr[1] ""
148
 
149
  #: polls-logs.php:134
150
+ msgid "<strong>&raquo;</strong> <strong>%s</strong> vote is cast by guests"
151
  msgid_plural ""
152
+ "<strong>&raquo;</strong> <strong>%s</strong> votes are cast by guests"
153
  msgstr[0] ""
154
  msgstr[1] ""
155
 
236
  "This default filter is limited to display only <strong>%s</strong> records."
237
  msgstr ""
238
 
239
+ #: polls-logs.php:289 polls-logs.php:334 wp-polls.php:244
240
  msgid "Answer"
241
  msgstr ""
242
 
254
 
255
  #: polls-logs.php:299 polls-logs.php:329 polls-manager.php:266
256
  #: polls-manager.php:278 polls-manager.php:355 polls-manager.php:363
257
+ #: wp-polls.php:445 wp-polls.php:450 wp-polls.php:568 wp-polls.php:573
258
+ #: wp-polls.php:987 wp-polls.php:991
259
  msgid "%s @ %s"
260
  msgstr ""
261
 
291
  msgid "Are You Sure You Want To Delete Logs For This Poll Only?"
292
  msgstr ""
293
 
294
+ #: polls-logs.php:384 wp-polls.php:239 wp-polls.php:1416
295
  msgid "Delete Logs For This Poll Only"
296
  msgstr ""
297
 
376
  msgid "This Poll Will Not Expire"
377
  msgstr ""
378
 
379
+ #: polls-manager.php:305 wp-polls.php:243 wp-polls.php:1459
380
  msgid "Close Poll"
381
  msgstr ""
382
 
384
  msgid "You are about to CLOSE this poll '%s'."
385
  msgstr ""
386
 
387
+ #: polls-manager.php:306 wp-polls.php:242 wp-polls.php:1447
388
  msgid "Open Poll"
389
  msgstr ""
390
 
392
  msgid "You are about to OPEN this poll '%s'."
393
  msgstr ""
394
 
395
+ #: polls-manager.php:325 wp-polls.php:55
396
+ msgid "Manage Polls"
397
+ msgstr ""
398
+
399
+ #: polls-manager.php:326 wp-polls.php:53 wp-polls.php:1536 wp-polls.php:1571
400
  msgid "Polls"
401
  msgstr ""
402
 
405
  msgstr ""
406
 
407
  #: polls-manager.php:333 polls-templates.php:121 polls-templates.php:124
408
+ #: wp-polls.php:1735 wp-polls.php:1738
409
  msgid "Total Voters"
410
  msgstr ""
411
 
417
  msgid "Action"
418
  msgstr ""
419
 
420
+ #: polls-manager.php:361 wp-polls.php:448 wp-polls.php:571 wp-polls.php:989
421
  msgid "No Expiry"
422
  msgstr ""
423
 
466
  msgstr ""
467
 
468
  #: polls-manager.php:440
469
+ msgid "Total Votes Cast:"
470
  msgstr ""
471
 
472
  #: polls-manager.php:453
477
  msgid "Are You Sure You Want To Delete All Polls Logs?"
478
  msgstr ""
479
 
480
+ #: polls-manager.php:462 wp-polls.php:237 wp-polls.php:1404
481
  msgid "Delete All Logs"
482
  msgstr ""
483
 
485
  msgid "You are about to delete all poll logs. This action is not reversible."
486
  msgstr ""
487
 
488
+ #: polls-manager.php:465 wp-polls.php:236
489
  msgid "No poll logs available."
490
  msgstr ""
491
 
739
  msgid "Current Active Poll"
740
  msgstr ""
741
 
742
+ #: polls-options.php:343 wp-polls.php:1590
743
  msgid "Do NOT Display Poll (Disable)"
744
  msgstr ""
745
 
746
+ #: polls-options.php:344 wp-polls.php:1591
747
  msgid "Display Random Poll"
748
  msgstr ""
749
 
750
+ #: polls-options.php:345 wp-polls.php:1592
751
  msgid "Display Latest Poll"
752
  msgstr ""
753
 
831
  msgid "Poll Error Template"
832
  msgstr ""
833
 
834
+ #: polls-templates.php:109 polls-templates.php:124 wp-polls.php:1726
835
+ #: wp-polls.php:1739
836
  msgid "Vote"
837
  msgstr ""
838
 
839
+ #: polls-templates.php:109 wp-polls.php:1727
840
  msgid "View Results Of This Poll"
841
  msgstr ""
842
 
843
+ #: polls-templates.php:109 wp-polls.php:1727
844
  msgid "View Results"
845
  msgstr ""
846
 
847
+ #: polls-templates.php:115 polls-templates.php:118 wp-polls.php:1732
848
+ #: wp-polls.php:1733
849
  msgid ","
850
  msgstr ""
851
 
852
+ #: polls-templates.php:115 polls-templates.php:118 wp-polls.php:1732
853
+ #: wp-polls.php:1733
854
  msgid "Votes"
855
  msgstr ""
856
 
857
+ #: polls-templates.php:118 wp-polls.php:1733
858
  msgid "You Have Voted For This Choice"
859
  msgstr ""
860
 
861
+ #: polls-templates.php:124 wp-polls.php:1739
862
  msgid "Vote For This Poll"
863
  msgstr ""
864
 
865
+ #: polls-templates.php:127 wp-polls.php:1765
866
  msgid "Polls Archive"
867
  msgstr ""
868
 
869
+ #: polls-templates.php:133 wp-polls.php:1769
870
  msgid "Start Date:"
871
  msgstr ""
872
 
873
+ #: polls-templates.php:133 wp-polls.php:1769
874
  msgid "End Date:"
875
  msgstr ""
876
 
877
+ #: polls-templates.php:142 wp-polls.php:1741
878
  msgid "Sorry, there are no polls available at the moment."
879
  msgstr ""
880
 
881
+ #: polls-templates.php:145 wp-polls.php:1742
882
  msgid "An error has occurred when processing your poll."
883
  msgstr ""
884
 
1117
  msgid "Displayed When An Error Has Occured While Processing The Poll"
1118
  msgstr ""
1119
 
1120
+ #: wp-polls.php:216
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1121
  msgid "Your last request is still being processed. Please wait a while ..."
1122
  msgstr ""
1123
 
1124
+ #: wp-polls.php:217
1125
  msgid "Please choose a valid poll answer."
1126
  msgstr ""
1127
 
1128
+ #: wp-polls.php:218
1129
  msgid "Maximum number of choices allowed: "
1130
  msgstr ""
1131
 
1132
+ #: wp-polls.php:235 wp-polls.php:1471
1133
  msgid "Delete Poll"
1134
  msgstr ""
1135
 
1136
+ #: wp-polls.php:238
1137
  msgid "Please check the \\'Yes\\' checkbox if you want to delete all logs."
1138
  msgstr ""
1139
 
1140
+ #: wp-polls.php:240
1141
  msgid ""
1142
  "Please check the \\'Yes\\' checkbox if you want to delete all logs for this "
1143
  "poll ONLY."
1144
  msgstr ""
1145
 
1146
+ #: wp-polls.php:241 wp-polls.php:1430
1147
  msgid "Delete Poll Answer"
1148
  msgstr ""
1149
 
1150
+ #: wp-polls.php:259
1151
  msgid "Poll"
1152
  msgstr ""
1153
 
1154
+ #: wp-polls.php:260 wp-polls.php:297
1155
  msgid "Enter Poll ID"
1156
  msgstr ""
1157
 
1158
+ #: wp-polls.php:262 wp-polls.php:298
1159
  msgid "Error: Poll ID must be numeric"
1160
  msgstr ""
1161
 
1162
+ #: wp-polls.php:262 wp-polls.php:299
1163
  msgid "Please enter Poll ID again"
1164
  msgstr ""
1165
 
1166
+ #: wp-polls.php:300
1167
  msgid "Insert Poll"
1168
  msgstr ""
1169
 
1170
+ #: wp-polls.php:526 wp-polls.php:711
1171
  msgid "Loading"
1172
  msgstr ""
1173
 
1174
+ #: wp-polls.php:764
1175
  msgid ""
1176
  "Note: There is a poll embedded within this post, please visit the site to "
1177
  "participate in this post's poll."
1178
  msgstr ""
1179
 
1180
+ #: wp-polls.php:1130
1181
  msgid "Page %s of %s"
1182
  msgstr ""
1183
 
1184
+ #: wp-polls.php:1132
1185
  msgid "&laquo; First"
1186
  msgstr ""
1187
 
1188
+ #: wp-polls.php:1136
1189
  msgid "&laquo;"
1190
  msgstr ""
1191
 
1192
+ #: wp-polls.php:1146
1193
  msgid "&raquo;"
1194
  msgstr ""
1195
 
1196
+ #: wp-polls.php:1150
1197
  msgid "Last &raquo;"
1198
  msgstr ""
1199
 
1200
+ #: wp-polls.php:1305
1201
  msgid "Invalid Poll ID"
1202
  msgstr ""
1203
 
1204
+ #: wp-polls.php:1312
1205
  msgid "Failed To Verify Referrer"
1206
  msgstr ""
1207
 
1208
+ #: wp-polls.php:1364
1209
  msgid "Unable To Update Poll Total Votes And Poll Total Voters. Poll ID #%s"
1210
  msgstr ""
1211
 
1212
+ #: wp-polls.php:1367
1213
  msgid "You Had Already Voted For This Poll. Poll ID #%s"
1214
  msgstr ""
1215
 
1216
+ #: wp-polls.php:1370
1217
+ msgid "Poll ID #%s is closed"
1218
+ msgstr ""
1219
+
1220
+ #: wp-polls.php:1373
1221
  msgid "Invalid Poll ID. Poll ID #%s"
1222
  msgstr ""
1223
 
1224
+ #: wp-polls.php:1409
1225
  msgid "All Polls Logs Have Been Deleted."
1226
  msgstr ""
1227
 
1228
+ #: wp-polls.php:1411
1229
  msgid "An Error Has Occurred While Deleting All Polls Logs."
1230
  msgstr ""
1231
 
1232
+ #: wp-polls.php:1423
1233
  msgid "All Logs For '%s' Has Been Deleted."
1234
  msgstr ""
1235
 
1236
+ #: wp-polls.php:1425
1237
  msgid "An Error Has Occurred While Deleting All Logs For '%s'"
1238
  msgstr ""
1239
 
1240
+ #: wp-polls.php:1441
1241
  msgid "Poll Answer '%s' Deleted Successfully."
1242
  msgstr ""
1243
 
1244
+ #: wp-polls.php:1443
1245
  msgid "Error In Deleting Poll Answer '%s'."
1246
  msgstr ""
1247
 
1248
+ #: wp-polls.php:1453
1249
  msgid "Poll '%s' Is Now Opened"
1250
  msgstr ""
1251
 
1252
+ #: wp-polls.php:1455
1253
  msgid "Error Opening Poll '%s'"
1254
  msgstr ""
1255
 
1256
+ #: wp-polls.php:1465
1257
  msgid "Poll '%s' Is Now Closed"
1258
  msgstr ""
1259
 
1260
+ #: wp-polls.php:1467
1261
  msgid "Error Closing Poll '%s'"
1262
  msgstr ""
1263
 
1264
+ #: wp-polls.php:1480
1265
  msgid "Error In Deleting Poll '%s' Question"
1266
  msgstr ""
1267
 
1268
+ #: wp-polls.php:1483
1269
  msgid "Poll '%s' Deleted Successfully"
1270
  msgstr ""
1271
 
1272
+ #. #-#-#-#-# plugin.pot (WP-Polls 2.69) #-#-#-#-#
1273
  #. Plugin Name of the plugin/theme
1274
+ #: wp-polls.php:1508 wp-polls.php:1510 wp-polls.php:1520
1275
  msgid "WP-Polls"
1276
  msgstr ""
1277
 
1278
+ #: wp-polls.php:1522
1279
  msgid "<strong>%s</strong> poll was created."
1280
  msgid_plural "<strong>%s</strong> polls were created."
1281
  msgstr[0] ""
1282
  msgstr[1] ""
1283
 
1284
+ #: wp-polls.php:1523
1285
  msgid "<strong>%s</strong> polls' answer was given."
1286
  msgid_plural "<strong>%s</strong> polls' answers were given."
1287
  msgstr[0] ""
1288
  msgstr[1] ""
1289
 
1290
+ #: wp-polls.php:1524
1291
+ msgid "<strong>%s</strong> vote was cast."
1292
+ msgid_plural "<strong>%s</strong> votes were cast."
1293
  msgstr[0] ""
1294
  msgstr[1] ""
1295
 
1296
+ #: wp-polls.php:1535
1297
  msgid "WP-Polls polls"
1298
  msgstr ""
1299
 
1300
+ #: wp-polls.php:1577
1301
  msgid "Title:"
1302
  msgstr ""
1303
 
1304
+ #: wp-polls.php:1580
1305
  msgid "Display Polls Archive Link Below Poll?"
1306
  msgstr ""
1307
 
1308
+ #: wp-polls.php:1588
1309
  msgid "Poll To Display:"
1310
  msgstr ""
1311
 
1312
+ #: wp-polls.php:1710
1313
  msgid "How Is My Site?"
1314
  msgstr ""
1315
 
1316
+ #: wp-polls.php:1713
1317
  msgid "Good"
1318
  msgstr ""
1319
 
1320
+ #: wp-polls.php:1714
1321
  msgid "Excellent"
1322
  msgstr ""
1323
 
1324
+ #: wp-polls.php:1715
1325
  msgid "Bad"
1326
  msgstr ""
1327
 
1328
+ #: wp-polls.php:1716
1329
  msgid "Can Be Improved"
1330
  msgstr ""
1331
 
1332
+ #: wp-polls.php:1717
1333
  msgid "No Comments"
1334
  msgstr ""
1335