WP-Polls 3.0.0
-
WP-Polls 3.0.0 is a total rewrite of the plugin with Claude Clode to make it more modern and testable. There will be breaking changes. Please do test it https://github.com/lesterchan/wp-polls/archive/refs/heads/master.zip
UWP-Polls 3.0.0 requires WordPress 6.8 and PHP 8.2. A site on an older stack is simply not offered the update, so if WP-Polls has stopped appearing in your updates list, that is why.
Update WP-Stats at the same time, and the other WP-Stats plugins with it. Up to now seven plugins shared one stats_display row to record which blocks the WP-Stats page shows. Each of them now keeps its own copy and the shared row is deleted by whichever one you update first. WP-Polls treats a missing row as “on”, so the worst that happens is a block you have to switch off again — but if a block you wanted is missing after updating, switch it back on from that plugin’s own settings screen. For WP-Polls it is Polls → Settings → WP-Stats.
Your settings screens have moved. Poll Options and Poll Templates are now two tabs of one Polls → Settings screen. Bookmarks and any links you have to admin.php?page=wp-polls/polls-options.php or …/polls-templates.php will not resolve; use admin.php?page=wp-polls-settings. Manage Polls is admin.php?page=wp-polls and Add Poll is admin.php?page=wp-polls-add.
Your settings move themselves. The thirty-odd poll_* option rows, plus the older poll_options row and both version markers, are folded into wp_polls_options and wp_polls_version the first time wp-admin loads after the update. Nothing to do; the old rows are removed once they have been read.
The poll bar is rebuilt, and two templates are replaced. If you customised Result Body or Result Body (Voted), those two are overwritten with the new markup and your changes are lost. There was no way to carry them forward: the class names and the stylesheet changed with the markup, so a customised copy of the old template has no rules left to match it. Re-apply your changes on Poll Templates, keeping the two wp-polls-bar elements. %POLL_ANSWER_IMAGEWIDTH% no longer exists — use %POLL_ANSWER_PERCENTAGE%.
If your theme ships its own copy of the stylesheet, rename it from polls-css.css to wp-polls.css or WP-Polls will stop using it. Delete polls-css-rtl.css; there is one stylesheet now. The poll bar rules are not in a copy made before 3.0.0, because they used to be generated by PHP — either copy the .wp-polls-bar rules across or override the –wp-polls-bar-* custom properties instead, which is the supported way.
If a custom template calls poll_vote(), poll_result() or poll_booth() from an inline onclick, those functions no longer exist. WP-Polls converts the stock templates on upgrade and puts a warning in wp-admin naming any it could not convert; replace the handler with data-poll-id=”%POLL_ID%” and data-poll-action=”vote” (or result / booth).
If your own code names a WP-Polls class, every one is prefixed WP_Polls_ now, and Polls_Core is plain WP_Polls. The template tags (get_poll(), vote_poll(), display_polls_archive_link(), in_pollarchive() and the get_poll* counters), both shortcodes and all thirty-odd wp_polls_* filters and actions are unchanged, so a theme that only uses those needs no edits.
If you set “Header That Contains The IP”, check it is a header your proxy always overwrites. WP-Polls now reads only the first address in it, so votes recorded against a forged chain no longer count as separate voters. Sites that left it blank are unaffected and their vote logs still match.
If your scripts referenced pollsL10n or pollsAdminL10n, they are wpPollsL10n and wpPollsAdminL10n.
The page I need help with: [log in to see the link]
You must be logged in to reply to this topic.