Skip to content

Commit c0158e3

Browse files
committed
Store the update data, adds the error counter
1 parent c2dae66 commit c0158e3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

engine/CF7_AntiSpam_Activator.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,18 @@ public static function install() {
212212
}
213213
}
214214

215+
/**
216+
* Store the update data
217+
*
218+
* @param array $options - the options array.
219+
*/
215220
private static function store_update_data( $options ) {
216221
/* update the plugin update time field */
217222
$options['last_update_data'] = array(
218223
'time' => time(),
219224
'old_version' => $options['cf7a_version'] ?? 'unknown',
220225
'new_version' => CF7ANTISPAM_VERSION,
226+
'errors' => array(),
221227
);
222228
return $options;
223229
}
@@ -245,7 +251,7 @@ public static function update_options( $reset_options = false ) {
245251
add_option( 'cf7a_options', $new_options );
246252

247253
} else {
248-
/* update the plugin options but add the new options automatically */
254+
/* if the plugin is already installed, update the plugin options automatically */
249255
if ( isset( $options['cf7a_version'] ) ) {
250256

251257
/* update the plugin last update time field if the current version is set (so we are updating the plugin and not installing it) */

0 commit comments

Comments
 (0)