| 开发者 | plugear |
|---|---|
| 更新时间 | 2026年12月4日 08:34 |
| PHP版本: | 8.2 及以上 |
| WordPress版本: | 7.2 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[plg_mqs_simulator id="123"]
The optional class attribute adds a CSS class. The question set list shows each
set's shortcode with a Copy button. Shortcodes and blocks placed with version 1.0
are still displayed (see "Upgrading from 1.0" in the FAQ).
Contact Form 7 inside results
A Contact Form 7 form placed in a result is displayed and sent within the results.
Contact Form 7 6.1 or later is supported (tested with 6.1.7 and 6.2.5). If the
form uses Cloudflare Turnstile, the plugin draws the widget again with the
Turnstile script that Contact Form 7 already loaded; this plugin itself does not
contact Cloudflare. Contact Form 7 is optional.
Privacy
The plugin makes no requests to outside services and sets no cookies. It does not
store answers or anything about visitors. The only thing it records is the Result
views count: a number saved with each question set (post meta
_plg_mqs_result_views) that goes up by one each time its results are shown.
For developers
plg_mqs_results_shown: fires once right before results are returned,
also when nothing matched, with the question set ID, the answers, the IDs of
the results shown and a context array.plg_mqs_force_enqueue_assets, plg_mqs_result_item_content_classes,
shortcode_atts_plg_mqs_simulator, plg_mqs_template_path and
plg_mqs_locate_template.mqs:start, mqs:answer and mqs:afterResults.
The quiz object is window.PlgMqsSimulator.templates/shortcode/ to
plg-mqs/shortcode/ in your theme.LICENSE file.
[plg_mqs_simulator id="123"].block/build/ is compiled with
@wordpress/scripts from the
unminified sources in block/src/. To rebuild: npm install && npm run buildWhen the visitor has answered every question, a result is shown if it is published and assigned to the question set, has at least one tick, and for every question with ticks the visitor picked a ticked choice. Only published questions of the set count. Ticks on questions removed from the set or switched to draft are ignored; a result whose ticks are all on such questions is shown for any answer. A set without published questions is not displayed.
Usually a question with ticks was not answered. This happens when a page was cached before you added a question: visitors with the old page cannot answer it. Clear your page cache after adding questions.
Up to 100 published questions. A set with more shows an error message instead of results. Choices are unlimited.
The results are requested with a security token printed into the page, which expires after 12 to 24 hours. A page cached for longer shows "A network error occurred." instead of results. Keep the cache lifetime under 12 hours or exclude pages with a quiz. Also clear the cache after adding questions and after updating this plugin.
The assets load only on pages whose own content contains the block or shortcode. For theme templates, widgets, synced patterns or custom fields, go to Recommendation Flow → Settings and turn on Load CSS/JS even on pages where the shortcode is not detected.
Visitors see a question set only while it is published without a password. Draft, pending, private, scheduled and password-protected sets are shown only to users who can edit them, so that you can preview them. The Shortcode box on the question set's edit screen says so while visitors cannot see it. The block lists published question sets only.
The quiz disappears from the pages that embed it until you restore the set and publish it again. Check Pages using this set before trashing; it does not see placements in theme templates, widgets or custom fields.
Every time the results of the set are shown: also when nothing matched, when a visitor retakes the quiz, and when you test it while logged in. It counts views, not people.
Leave a text setting empty (result heading, result count, loading, no results, restart and back buttons) to use the default text. It is not saved, so it is shown in the site's language. Question sets saved with version 1.0 keep the texts that were filled in at that time; empty a field to go back to the default.
Nothing is deleted, so a reinstall picks everything up again. To remove your data,
delete the question sets, questions and results permanently (empty the Trash)
before deleting the plugin. A few small settings (options starting with
plg_mqs_) remain.
Version 1.0 was called Multi Questions Simulator (shown as 診断シミュレーション on
Japanese sites; folder multi-questions-simulator). The name and slug have changed, so 1.0 does not
receive this version as an update. Replace it instead; your data is kept:
[mqs_simulator with [plg_mqs_simulator.plg-mqs/. Copy the new bundled
template there and reapply your changes; copying your old one would cause a
fatal error.mqs?mqs is short for the plugin's former name, Multi Questions Simulator. Existing
sites store their data under names built from it (such as the plg_mqs_ prefix),
so they are kept to avoid breaking saved data. The names used by 1.0 are kept in
includes/class-legacy-names.php only to recognize and convert data and
placements from 1.0; nothing is registered or fired under them. CSS classes and
mqs: events keep their names so your own styles and scripts keep working.
Plugear Conditional Recommendation Flow Pro adds step-by-step analytics, import and export, templates, duplicating a question set together with its questions and results, and a setting that keeps content-based spam filters from blocking forms sent from results. It uses the same data (Pro 1.2.0 or later).
plugear-conditional-recommendation-flow. Sites on 1.0 replace the plugin
instead of updating it; see "Upgrading from 1.0" in the FAQ.plg_mqs_ prefix. Saved data is converted once,
when this version first runs.[plg_mqs_simulator id="…"] and the block
plg-mqs/simulator. Existing [mqs_simulator …] shortcodes and blocks in posts
and widgets keep working; blocks are switched to the new name once._plg_mqs_… (protected meta). Filters, JavaScript
globals, the REST namespace and the AJAX action were renamed, and theme template
overrides moved to plg-mqs/. Plugin::PREFIX was removed.plg_mqs_results_shown.block/src/ with build instructions.
Earlier versions are listed in changelog.txt.