| @@ -41,11 +41,14 @@ | ||
| 41 | 41 | * |
| 42 | 42 | * @return void |
| 43 | 43 | */ |
| 44 | 44 | public static function maybe_add_to_inbox() { |
| 45 | - $inbox = new FrmInbox(); | |
| 46 | 45 | $forms = self::import_links(); |
| 46 | + if ( ! $forms ) { | |
| 47 | + return; | |
| 48 | + } | |
| 47 | 49 | |
| 50 | + $inbox = new FrmInbox(); | |
| 48 | 51 | foreach ( $forms as $form ) { |
| 49 | 52 | $inbox->add_message( |
| 50 | 53 | array( |
| 51 | 54 | 'key' => $form['class'], |
| @@ -73,9 +76,9 @@ | ||
| 73 | 76 | // Either the importer is installed or the source plugin isn't. |
| 74 | 77 | continue; |
| 75 | 78 | } |
| 76 | 79 | |
| 77 | - $installer = new FrmInstallPlugin( array( 'plugin_file' => $form['importer'] ) ); | |
| 80 | + $installer = new FrmInstallPlugin( array( 'plugin_file' => $form['importer'] ) ); | |
| 78 | 81 | $form['installed'] = $installer->is_installed(); |
| 79 | 82 | $form['link'] = $installer->get_activate_link(); |
| 80 | 83 | |
| 81 | 84 | $forms[] = $form; |
| @@ -172,15 +175,6 @@ | ||
| 172 | 175 | } |
| 173 | 176 | $dismissed[] = FrmAppHelper::get_param( 'plugin', '', 'post', 'sanitize_text_field' ); |
| 174 | 177 | update_option( 'frm_dismissed', array_filter( $dismissed ), 'no' ); |
| 175 | 178 | 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' ); | |
| 185 | 179 | } |
| 186 | 180 | } |