
內容簡介
Onyx Poll 是一款輕量級的投票外掛,利用 WordPress REST API 和 JavaScript 創建投票。它不需要 ACF 或 ACF PRO,提供多種投票樣式和功能,讓使用者能夠輕鬆創建和管理投票。
【主要功能】
• 區塊編輯器整合,具即時預覽功能
• 支援短碼、小工具及自動彈出視窗
• 每頁可設置多個投票,並可上傳答案圖片
• 可編輯的答案計數器,總數始終為其總和
• 投票結果可選擇隱藏,直到到期
• 自動過期及每小時執行的 WP-Cron 任務
外掛標籤
開發者團隊
原文外掛簡介
Onyx Poll creates lightweight polls with the WordPress REST API and JavaScript. ACF and ACF PRO are not required.
Features
Block editor integration with live preview, standard and Twitter styles.
Shortcode, sidebar widget and automatic modal.
Multiple polls per page, answer images and registered thumbnail sizes.
Editable answer counters; the total is always their sum.
Percentage, number or combined results, with an option to hide results until expiration.
Voting intervals enforced on the server for signed browser sessions.
Automatic expiration and an hourly WP-Cron task.
Native administration with media selection and answer reordering.
Dedicated tables for poll rules, answers and vote counters.
Settings descriptions, help, cron execution status and WordPress Site Health integration.
Optional permanent cleanup on uninstall; data is kept by default.
Upgrading from the ACF version
IMPORTANT: 2.0 is a major update with breaking changes to requirements and internal storage. Back up the full database and plugin files, and test the update on a staging copy before updating a production site. See the breaking changes below and the migration FAQ.
Migration starts automatically on activation or on the next WordPress request after upgrading an already active plugin from 1.2.0 or an earlier ACF version. No manual export, import or reactivation is needed. The plugin creates {prefix}onyx_polls and {prefix}onyx_poll_answers and copies existing polls in resumable batches of 50 per request. A requested poll is imported on demand if its batch has not run yet, including the latest-poll shortcode and modal selection.
IDs, titles, publication status, answer order and text, image references, individual vote counters, dates, voting limits, result preferences and global settings are preserved. Existing blocks, shortcodes and widgets keep working without editing post content. Each poll is imported in a database transaction; retrying migration does not overwrite already imported polls or votes received in 2.0.
Legacy custom fields are kept for recovery and are not deleted by the update. New rules and votes are written only to the plugin tables. ACF is not required to run the plugin or migration; keep it installed if your theme or another plugin still needs it. The database user must be allowed to create the plugin tables.
Breaking changes in 2.0
Minimum requirements are now WordPress 6.3 and PHP 7.4. Check the hosting environment before updating.
Poll data moves from WordPress custom fields to the plugin tables. Custom templates, snippets or integrations that read or write ACF fields or onyx_poll_* post metadata must be adapted; those legacy fields stop receiving updates. The plugin’s existing shortcodes, block identifier, widget and public REST routes remain compatible.
Total votes is now read-only and equals the sum of answer counters. A manually entered total that differed from that sum will change during migration; individual answer counters are preserved.
Poll editing and settings use native plugin forms. Customizations that depend on ACF field registration, form markup or ACF-specific hooks must be reviewed.
Downgrading to 1.2.0 does not copy new votes or edits back into legacy fields. Restoring an old backup also loses changes made after that backup. Plan rollback with a current database backup; do not use downgrade as a way to reverse migration.
