PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 5.2.9
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v5.2.9
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 5.2.9, at app/Modules/Registerer/ReviewQuery.php

62 lines 2.2 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 use FluentForm\App\Models\Form;
6 use FluentForm\App\Helpers\Helper;
7 use FluentForm\App\Http\Controllers\AdminNoticeController;
8
9 class ReviewQuery
10 {
11 public function register()
12 {
13 if ($this->shouldRegister()) {
14 add_action('fluentform/global_menu', [$this, 'show'], 99);
15 }
16 }
17
18 protected function shouldRegister()
19 {
20 if (Helper::isFluentAdminPage() && !wp_doing_ajax()) {
21 return Form::count() > 3;
22 }
23
24 return false;
25 }
26
27 public function show()
28 {
29 $notice = new AdminNoticeController();
30 $msg = $this->getMessage();
31 $notice->addNotice($msg);
32 $notice->showNotice();
33 }
34
35 private function getMessage()
36 {
37 return [
38 'name' => 'review_query',
39 'title' => '',
40 '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.',
41 '<a target="_blank" href="https://wordpress.org/support/plugin/fluentform/reviews/#new-post">WordPress.org</a>'),
42 'links' => [
43 [
44 'href' => 'https://wordpress.org/support/plugin/fluentform/reviews/#new-post',
45 'btn_text' => 'Yes',
46 'btn_atts' => 'class="mr-1 el-button--success el-button--mini ff_review_now" data-notice_name="review_query"',
47 ],
48 [
49 'href' => admin_url('admin.php?page=fluent_forms'),
50 'btn_text' => 'Maybe Later',
51 '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"',
52 ],
53 [
54 'href' => admin_url('admin.php?page=fluent_forms'),
55 'btn_text' => 'Do not show again',
56 'btn_atts' => 'class="text-button el-button--mini ff_nag_cross" data-notice_type="permanent" data-notice_name="review_query"',
57 ],
58 ],
59 ];
60 }
61 }
62