PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.0
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.0
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/helpers/FrmFormMigratorsHelper.php +9 -28 6.255.0 View file →
@@ -4,11 +4,8 @@
4 4 }
5 5
6 6 class FrmFormMigratorsHelper {
7 7
8 - /**
9 - * @return bool
10 - */
11 8 private static function is_dismissed( $form, $dismissed = null ) {
12 9 if ( $dismissed === null ) {
13 10 $dismissed = get_option( 'frm_dismissed' );
14 11 }
@@ -19,11 +16,8 @@
19 16
20 17 return false;
21 18 }
22 19
23 - /**
24 - * @return void
25 - */
26 20 public static function maybe_show_download_link() {
27 21 $forms = self::import_links();
28 22 foreach ( $forms as $form ) {
29 23 if ( ! self::is_dismissed( $form ) ) {
@@ -37,18 +31,13 @@
37 31 }
38 32
39 33 /**
40 34 * @since 4.05
41 - *
42 - * @return void
43 35 */
44 36 public static function maybe_add_to_inbox() {
37 + $inbox = new FrmInbox();
45 38 $forms = self::import_links();
46 - if ( ! $forms ) {
47 - return;
48 - }
49 39
50 - $inbox = new FrmInbox();
51 40 foreach ( $forms as $form ) {
52 41 $inbox->add_message(
53 42 array(
54 43 'key' => $form['class'],
@@ -61,11 +50,8 @@
61 50 );
62 51 }
63 52 }
64 53
65 - /**
66 - * @return array
67 - */
68 54 private static function import_links() {
69 55 if ( ! current_user_can( 'activate_plugins' ) ) {
70 56 return array();
71 57 }
@@ -76,9 +62,9 @@
76 62 // Either the importer is installed or the source plugin isn't.
77 63 continue;
78 64 }
79 65
80 - $installer = new FrmInstallPlugin( array( 'plugin_file' => $form['importer'] ) );
66 + $installer = new FrmInstallPlugin( array( 'plugin_file' => $form['importer'] ) );
81 67 $form['installed'] = $installer->is_installed();
82 68 $form['link'] = $installer->get_activate_link();
83 69
84 70 $forms[] = $form;
@@ -85,11 +71,8 @@
85 71 }
86 72 return $forms;
87 73 }
88 74
89 - /**
90 - * @return string[][]
91 - */
92 75 private static function importable_forms() {
93 76 return array(
94 77 'gf' => array(
95 78 'class' => 'FrmGravityImporter',
@@ -126,14 +109,8 @@
126 109 </div>
127 110 <?php
128 111 }
129 112
130 - /**
131 - * @param array $install
132 - * @param string $label
133 - *
134 - * @return void
135 - */
136 113 private static function install_button( $install, $label = '' ) {
137 114 $primary = 'button-secondary frm-button-secondary ';
138 115
139 116 if ( empty( $label ) ) {
@@ -163,11 +140,8 @@
163 140 </a>
164 141 <?php
165 142 }
166 143
167 - /**
168 - * @return void
169 - */
170 144 public static function dismiss_migrator() {
171 145 check_ajax_referer( 'frm_ajax', 'nonce' );
172 146 $dismissed = get_option( 'frm_dismissed' );
173 147 if ( empty( $dismissed ) ) {
@@ -175,6 +149,13 @@
175 149 }
176 150 $dismissed[] = FrmAppHelper::get_param( 'plugin', '', 'post', 'sanitize_text_field' );
177 151 update_option( 'frm_dismissed', array_filter( $dismissed ), 'no' );
178 152 wp_die();
153 + }
154 +
155 + /**
156 + * @deprecated 4.05
157 + */
158 + public static function notification_count() {
159 + _deprecated_function( __METHOD__, '4.05' );
179 160 }
180 161 }