PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 6.3.0
Defender Security – Malware Scanner, Login Security & Firewall v6.3.0
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
← All changes | src/model/class-audit-log.php +4 -3 6.2.2 → 6.3.0 View file →
@@ -289,19 +289,20 @@
289 289
290 290 /**
291 291 * Mass insert logs, usually fetched from API.
292 292 *
293 - * @param array $data An array of data to be inserted into the Audit_Log table.
293 + * @param array $data An array of data to be inserted into the Audit_Log table.
294 + * @param int $synced Whether the logs have already been synced.
294 295 *
295 296 * @return void
296 297 * @throws ReflectionException If the import method of the Audit_Log class throws a ReflectionException.
297 298 */
298 - public static function mass_insert( $data ) {
299 + public static function mass_insert( $data, $synced = 1 ) {
299 300 // Use raw sql for faster.
300 301 foreach ( $data as $datum ) {
301 302 $item = new Audit_Log();
302 303 $item->import( $datum );
303 - $item->synced = 1;
304 + $item->synced = $synced;
304 305 $item->save();
305 306 }
306 307 }
307 308