PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.7
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.7
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 +11 -18 6.266.7 View file →
@@ -5,11 +5,8 @@
5 5
6 6 class FrmFormMigratorsHelper {
7 7
8 8 /**
9 - * @param array $form
10 - * @param array|null $dismissed
11 - *
12 9 * @return bool
13 10 */
14 11 private static function is_dismissed( $form, $dismissed = null ) {
15 12 if ( $dismissed === null ) {
@@ -27,9 +24,8 @@
27 24 * @return void
28 25 */
29 26 public static function maybe_show_download_link() {
30 27 $forms = self::import_links();
31 -
32 28 foreach ( $forms as $form ) {
33 29 if ( ! self::is_dismissed( $form ) ) {
34 30 self::install_banner( $form );
35 31 } else {
@@ -45,16 +41,11 @@
45 41 *
46 42 * @return void
47 43 */
48 44 public static function maybe_add_to_inbox() {
45 + $inbox = new FrmInbox();
49 46 $forms = self::import_links();
50 47
51 - if ( ! $forms ) {
52 - return;
53 - }
54 -
55 - $inbox = new FrmInbox();
56 -
57 48 foreach ( $forms as $form ) {
58 49 $inbox->add_message(
59 50 array(
60 51 'key' => $form['class'],
@@ -76,9 +67,8 @@
76 67 return array();
77 68 }
78 69
79 70 $forms = array();
80 -
81 71 foreach ( self::importable_forms() as $form ) {
82 72 if ( class_exists( $form['class'] ) || ! is_plugin_active( $form['plugin'] ) ) {
83 73 // Either the importer is installed or the source plugin isn't.
84 74 continue;
@@ -83,9 +73,9 @@
83 73 // Either the importer is installed or the source plugin isn't.
84 74 continue;
85 75 }
86 76
87 - $installer = new FrmInstallPlugin( array( 'plugin_file' => $form['importer'] ) );
77 + $installer = new FrmInstallPlugin( array( 'plugin_file' => $form['importer'] ) );
88 78 $form['installed'] = $installer->is_installed();
89 79 $form['link'] = $installer->get_activate_link();
90 80
91 81 $forms[] = $form;
@@ -114,13 +104,8 @@
114 104 ),
115 105 );
116 106 }
117 107
118 - /**
119 - * @param array $install
120 - *
121 - * @return string|null
122 - */
123 108 private static function install_banner( $install ) {
124 109 if ( empty( $install['link'] ) ) {
125 110 return '';
126 111 }
@@ -181,9 +166,8 @@
181 166 */
182 167 public static function dismiss_migrator() {
183 168 check_ajax_referer( 'frm_ajax', 'nonce' );
184 169 $dismissed = get_option( 'frm_dismissed' );
185 -
186 170 if ( empty( $dismissed ) ) {
187 171 $dismissed = array();
188 172 }
189 173 $dismissed[] = FrmAppHelper::get_param( 'plugin', '', 'post', 'sanitize_text_field' );
@@ -188,6 +172,15 @@
188 172 }
189 173 $dismissed[] = FrmAppHelper::get_param( 'plugin', '', 'post', 'sanitize_text_field' );
190 174 update_option( 'frm_dismissed', array_filter( $dismissed ), 'no' );
191 175 wp_die();
176 + }
177 +
178 + /**
179 + * @deprecated 4.05
180 + *
181 + * @return void
182 + */
183 + public static function notification_count() {
184 + _deprecated_function( __METHOD__, '4.05' );
192 185 }
193 186 }