WP-Polls, WP-PostRatings, WP-PostViews, WP-Email Updated

I have updated the following plugins:

Now all AJAX requests are handled by /wp-admin/admin-ajax.php. Previously it is handled via the plugin PHP file itself by assuming that wp-load.php is always 2 levels down from the plugin file. But since you can have your WordPress in any folders, custom loading of wp-load.php is not possible as the path to wp-load.php varies from server to server.

While I am at it, I added nonce check for AJAX calls to WP-Polls, WP-PostRatings and WP-Email. Let me know if you run into problems via WordPress Support Forums, My Forums (if you are already registered) or via email (lesterchan AT gmail).

PS: Kindly refer to https://lesterchan.net/wordpress/2012/06/05/ajax-not-working-for-wp-email-wp-polls-wp-postratings-or-wp-postviews/ if you ran into problems.

11 thoughts on “WP-Polls, WP-PostRatings, WP-PostViews, WP-Email Updated

  1. Boyquotes


    I have a bug, the link to pollarchive is always display, rather if I change the poll_archive_show option…

    No parameter when you call display_polls_archive_link(); , it’s always true…

    My solution:
    $show_poll = get_option(‘poll_archive_show’);

    Thanks for this plugin 😉


    1522 $title = apply_filters(‘widget_title’, esc_attr($instance[‘title’]));
    1523 $poll_id = intval($instance[‘poll_id’]);
    1524 $display_pollarchive = intval($instance[‘display_pollarchive’]);
    1525 echo $before_widget;
    1526 if(!empty($title)) {
    1527 echo $before_title.$title.$after_title;
    1528 }
    1529 get_poll($poll_id);
    1530 if($display_pollarchive) {
    1531 display_polls_archive_link();
    1532 }

  2. Lester Chan Post author

    The widget is for individual poll, you can choose whether or not to show the link to poll archive for the individual poll widget.

  3. malsony

    hi, i am using your tricky widget, and want to translate some of them into Chinese, can i start with DBManager and DownloadManager? alex

  4. Pingback: AJAX Not Working For WP-Email, WP-Polls, WP-PostRatings or WP-PostViews? | Lester Chan’s WordPress Plugins

  5. smspunch


    I know you are busy, but the rich snippest for wp-postrating is not generated for pages, it’s working fine for posts but not PAGES. Could you please look into this ?


  6. Brian Johnson

    I had a problem with the referrer error (poll results wouldn’t load) when I was using W3TotalCache, so I tried a fix that saaraan recommended at
    …wrapping this php code with comment /* — */in wp-polls.php, solved in my case.

    if(!check_ajax_referer(‘poll_’.$poll_id.’-nonce’, ‘poll_’.$poll_id.’_nonce’, false))
    _e(‘Failed To Verify Referrer’, ‘wp-polls’);

  7. Erni

    your Plugins are great, I really love them. I used the wp-polls and wp-postratings ones. My question is: If it would possible to show the highest rating post in some way on a page or in a widget?

    Keep up the great work!


Comments are closed.