PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 6.2.7
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v6.2.7
6.2.14 6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 3.6.65 All 196 releases
fluentform / app / Modules / Registerer / ReviewQuery.php

ReviewQuery.php in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 6.2.7, at app/Modules/Registerer/ReviewQuery.php

64 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentForm\App\Modules\Registerer;
4
5 defined('ABSPATH') or die;
6
7 use FluentForm\App\Models\Form;
8 use FluentForm\App\Helpers\Helper;
9 use FluentForm\App\Http\Controllers\AdminNoticeController;
10
11 class ReviewQuery
12 {
13 public static function register()
14 {
15 if (static::shouldRegister()) {
16 add_action('fluentform/global_menu', [static::class, 'show'], 99);
17 }
18 }
19
20 protected static function shouldRegister()
21 {
22 if (Helper::isFluentAdminPage() && !wp_doing_ajax()) {
23 return Form::count() > 3;
24 }
25
26 return false;
27 }
28
29 public static function show()
30 {
31 $notice = new AdminNoticeController();
32 $msg = static::getMessage();
33 $notice->addNotice($msg);
34 $notice->showNotice();
35 }
36
37 private static function getMessage()
38 {
39 return [
40 'name' => 'review_query',
41 'title' => '',
42 'message' => sprintf('Thank you for using Fluent Forms. We would greatly appreciate it if you could share your experience and leave a review for us on %s. Your review inspires us to keep improving the plugin and delivering a better user experience.',
43 '<a target="_blank" href="https://wordpress.org/support/plugin/fluentform/reviews/#new-post">WordPress.org</a>'),
44 'links' => [
45 [
46 'href' => 'https://wordpress.org/support/plugin/fluentform/reviews/#new-post',
47 'btn_text' => 'Yes',
48 'btn_atts' => 'class="mr-1 el-button--success el-button--mini ff_review_now" data-notice_name="review_query"',
49 ],
50 [
51 'href' => admin_url('admin.php?page=fluent_forms'),
52 'btn_text' => 'Maybe Later',
53 'btn_atts' => 'class="mr-1 el-button--info el-button--soft el-button--mini ff_nag_cross" data-notice_type="temp" data-notice_name="review_query"',
54 ],
55 [
56 'href' => admin_url('admin.php?page=fluent_forms'),
57 'btn_text' => 'Do not show again',
58 'btn_atts' => 'class="text-button el-button--mini ff_nag_cross" data-notice_type="permanent" data-notice_name="review_query"',
59 ],
60 ],
61 ];
62 }
63 }
64