WP Security Audit Log - Version 4.1.5

Version Description

(2020-11-02) =

Release notes: WP Activity Log 4.1.5: Support for new MainWP settings module & improved coverage

  • New features

    • Support for the new settings module in the Activity Log for MainWP extension.
  • New event ID

    • ID 7012: user changed the network's users and sites registration settings.
  • Security fix

    • SQL Injection in external database module reported by WP deeply. Thank you for the responsible disclosure.
  • Breaking change

    • Removed detection and logging of requests to non-existing URLs (404s). Event ID 6007 and 6023 no longer used in the plugin. This breaking change resulted in a major performance improvement.
  • Improvements

    • Added Event Type and Object in the activity log reports.
    • Improved the coverage of the login / logout detection sensor.
    • Improved format of "hover over pop-ups" used in the activity log viewer (such as the one to exclude a specific event ID).
    • Moved almost all of the remaining WooCommerce sensor code to the activity log for WooCommerce extension.
    • Improved UX for the front-end sensors settings - options now are available underneath the relevant event ID.
    • Removed redundant code that is now in the WordPress activity log extensions.
  • Bug fixes

    • Sorting of activity log events not retained in following pages when in pagination mode.
    • Users sessions table was not being created when upgrading from the free to the premium editions of the plugin.
    • Link to exclude custom field in event was broken / not adding the custom field to the exclusion list.
    • Changing the category of a post was not being reported (Event ID 2016).
    • Unkown object was reported in event ID 6034 (purged activity log).
    • Changing password via the WooCommerce account page caused session to remain once user logs out.
    • Users could add multiple identical search filters causing a crash.
    • Users not redirected to the correct list of event IDs after installing the activity log for Yoast SEO extension.
    • Install Extension button in events was broken and not triggering the extension installer.

Refer to the complete plugin changelog for more detailed information about what was new, improved and fixed in previous versions of the WP Activity Log plugin.

Download this release

Release Info

Developer WPWhiteSecurity
Plugin Icon 128x128 WP Security Audit Log
Version 4.1.5
Comparing to
See all releases

Code changes from version 4.1.4 to 4.1.5

Files changed (60) hide show
  1. classes/AbstractView.php +1 -1
  2. classes/Adapters/ActiveRecordInterface.php +7 -0
  3. classes/Adapters/MetaInterface.php +6 -5
  4. classes/Adapters/MySQL/ActiveRecordAdapter.php +49 -40
  5. classes/Adapters/MySQL/MetaAdapter.php +6 -26
  6. classes/Adapters/MySQL/OccurrenceAdapter.php +0 -30
  7. classes/Adapters/MySQL/QueryAdapter.php +7 -2
  8. classes/Adapters/MySQL/TmpUserAdapter.php +0 -9
  9. classes/Alert.php +7 -7
  10. classes/AlertManager.php +16 -14
  11. classes/AuditLogGridView.php +8 -25
  12. classes/AuditLogListView.php +8 -29
  13. classes/Connector/ConnectorInterface.php +13 -1
  14. classes/Connector/MySQLDB.php +105 -40
  15. classes/Connector/wp-db-custom.php +3 -12
  16. classes/ConstantManager.php +1 -1
  17. classes/Loggers/Database.php +0 -48
  18. classes/Models/Meta.php +4 -3
  19. classes/Models/Occurrence.php +5 -14
  20. classes/Multisite/NetworkWide/CPTsTracker.php +1 -2
  21. classes/Nicer.php +3 -0
  22. classes/Ref.php +22 -12
  23. classes/SensorManager.php +3 -47
  24. classes/Sensors/Comments.php +0 -15
  25. classes/Sensors/Content.php +52 -71
  26. classes/Sensors/Database.php +31 -6
  27. classes/Sensors/FrontendLogin.php +10 -1
  28. classes/Sensors/FrontendRegister.php +30 -19
  29. classes/Sensors/FrontendSystem.php +0 -286
  30. classes/Sensors/FrontendWooCommerce.php +0 -319
  31. classes/Sensors/LogInOut.php +0 -30
  32. classes/Sensors/MainWP.php +31 -44
  33. classes/Sensors/Multisite.php +24 -2
  34. classes/Sensors/PhpErrors.php +1 -1
  35. classes/Sensors/PluginsThemes.php +41 -44
  36. classes/Sensors/Public.php +19 -376
  37. classes/Sensors/System.php +2 -409
  38. classes/Sensors/Widgets.php +5 -0
  39. classes/Settings.php +22 -88
  40. classes/ThirdPartyExtensions/AbstractExtension.php +24 -3
  41. classes/ThirdPartyExtensions/WooCommerceExtension.php +14 -12
  42. classes/ThirdPartyExtensions/YoastSeoExtension.php +2 -2
  43. classes/Uninstall.php +3 -1
  44. classes/Utilities/Emailer.php +2 -2
  45. classes/Utilities/PluginInstallerAction.php +6 -2
  46. classes/ViewManager.php +2 -2
  47. classes/Views/AuditLog.php +5 -116
  48. classes/Views/Help.php +7 -7
  49. classes/Views/Settings.php +85 -99
  50. classes/Views/SetupWizard.php +9 -67
  51. classes/Views/ToggleAlerts.php +70 -203
  52. classes/Views/addons/html-view.php +3 -0
  53. css/auditlog.css +11 -3
  54. css/src/common.scss +0 -0
  55. defaults.php +5 -8
  56. js/auditlog-pointer.js +2 -2
  57. js/auditlog.js +22 -77
  58. languages/wp-security-audit-log.pot +708 -848
  59. readme.txt +29 -57
  60. wp-security-audit-log.php +173 -116
classes/AbstractView.php CHANGED
@@ -92,7 +92,7 @@ abstract class WSAL_AbstractView {
92
  $meta_key = 'wsal-notice-' . $name;
93
 
94
  self::$AllowedNoticeNames[] = $name;
95
- return ! ! get_user_meta( $user_id, $meta_key, true );
96
  }
97
 
98
  /**
92
  $meta_key = 'wsal-notice-' . $name;
93
 
94
  self::$AllowedNoticeNames[] = $name;
95
+ return get_user_meta( $user_id, $meta_key, true );
96
  }
97
 
98
  /**
classes/Adapters/ActiveRecordInterface.php CHANGED
@@ -88,4 +88,11 @@ interface WSAL_Adapters_ActiveRecordInterface {
88
  * @param array $args - Query arguments.
89
  */
90
  public function LoadMultiQuery( $query, $args = array() );
 
 
 
 
 
 
 
91
  }
88
  * @param array $args - Query arguments.
89
  */
90
  public function LoadMultiQuery( $query, $args = array() );
91
+
92
+ /**
93
+ * Returns the model class for adapter.
94
+ *
95
+ * @return WSAL_Models_ActiveRecord
96
+ */
97
+ public function GetModel();
98
  }
classes/Adapters/MetaInterface.php CHANGED
@@ -22,16 +22,17 @@ interface WSAL_Adapters_MetaInterface {
22
  /**
23
  * Create a meta object
24
  *
25
- * @param array $occurenceIds - Array of meta data.
 
26
  * @return int ID of the new meta data
27
  */
28
- public function deleteByOccurenceIds( $occurenceIds );
29
 
30
  /**
31
  * Load by name and occurrence id.
32
  *
33
- * @param string $metaName - Meta name.
34
- * @param int $occurenceId - Occurrence ID.
35
  */
36
- public function loadByNameAndOccurenceId( $metaName, $occurenceId );
37
  }
22
  /**
23
  * Create a meta object
24
  *
25
+ * @param array $occurrence_ids - Array of meta data.
26
+ *
27
  * @return int ID of the new meta data
28
  */
29
+ public function DeleteByOccurrenceIds( $occurrence_ids );
30
 
31
  /**
32
  * Load by name and occurrence id.
33
  *
34
+ * @param string $meta_name - Meta name.
35
+ * @param int $occurrence_id - Occurrence ID.
36
  */
37
+ public function LoadByNameAndOccurrenceId( $meta_name, $occurrence_id );
38
  }
classes/Adapters/MySQL/ActiveRecordAdapter.php CHANGED
@@ -62,15 +62,6 @@ class WSAL_Adapters_MySQL_ActiveRecord implements WSAL_Adapters_ActiveRecordInte
62
  return $this->connection;
63
  }
64
 
65
- /**
66
- * Returns the model class for adapter.
67
- *
68
- * @throws RuntimeException - Throw exception if the function is not overriden.
69
- */
70
- public function GetModel() {
71
- throw new RuntimeException( 'GetModel() should have been overridden in ' . get_class( $this ) );
72
- }
73
-
74
  /**
75
  * Returns table name.
76
  *
@@ -179,8 +170,7 @@ class WSAL_Adapters_MySQL_ActiveRecord implements WSAL_Adapters_ActiveRecordInte
179
 
180
  // Query table exists.
181
  $table_exists_query = "SHOW TABLES LIKE '" . $this->GetTable() . "'";
182
- $result = $_wpdb->query( $table_exists_query );
183
- return $result;
184
  }
185
 
186
  /**
@@ -223,10 +213,8 @@ class WSAL_Adapters_MySQL_ActiveRecord implements WSAL_Adapters_ActiveRecordInte
223
 
224
  $result = $_wpdb->replace( $this->GetTable(), $data, $format );
225
 
226
- if ( false !== $result ) {
227
- if ( $_wpdb->insert_id ) {
228
- $copy->setId( $_wpdb->insert_id );
229
- }
230
  }
231
  return $result;
232
  }
@@ -235,20 +223,24 @@ class WSAL_Adapters_MySQL_ActiveRecord implements WSAL_Adapters_ActiveRecordInte
235
  * Load record from DB (Single row).
236
  *
237
  * @param string $cond - (Optional) Load condition.
238
- * @param array $args - (Optional) Load condition arguments.
 
 
239
  */
240
  public function Load( $cond = '%d', $args = array( 1 ) ) {
241
  $_wpdb = $this->connection;
242
  $sql = $_wpdb->prepare( 'SELECT * FROM ' . $this->GetTable() . ' WHERE ' . $cond, $args );
243
- $data = $_wpdb->get_row( $sql, ARRAY_A );
244
- return $data;
245
  }
246
 
247
  /**
248
  * Load records from DB (Multi rows).
249
  *
250
  * @param string $cond Load condition.
251
- * @param array $args (Optional) Load condition arguments.
 
 
 
252
  */
253
  public function LoadArray( $cond, $args = array() ) {
254
  $_wpdb = $this->connection;
@@ -268,32 +260,34 @@ class WSAL_Adapters_MySQL_ActiveRecord implements WSAL_Adapters_ActiveRecordInte
268
  */
269
  public function Delete( $active_record ) {
270
  $_wpdb = $this->connection;
271
- $result = $_wpdb->delete(
272
  $this->GetTable(),
273
  $active_record->getId()
274
  );
275
- return $result;
276
  }
277
 
278
  /**
279
  * Delete records in DB matching a query.
280
  *
281
  * @param string $query Full SQL query.
282
- * @param array $args (Optional) Query arguments.
 
 
283
  */
284
  public function DeleteQuery( $query, $args = array() ) {
285
  $_wpdb = $this->connection;
286
  $sql = count( $args ) ? $_wpdb->prepare( $query, $args ) : $query;
287
- $result = $_wpdb->query( $sql );
288
- return $result;
289
  }
290
 
291
  /**
292
  * Load multiple records from DB.
293
  *
294
  * @param string $cond (Optional) Load condition (eg: 'some_id = %d' ).
295
- * @param array $args (Optional) Load condition arguments (rg: array(45) ).
 
296
  * @return self[] List of loaded records.
 
297
  */
298
  public function LoadMulti( $cond, $args = array() ) {
299
  $_wpdb = $this->connection;
@@ -334,7 +328,6 @@ class WSAL_Adapters_MySQL_ActiveRecord implements WSAL_Adapters_ActiveRecordInte
334
  */
335
  public function Count( $cond = '%d', $args = array( 1 ) ) {
336
  $_wpdb = $this->connection;
337
- $class = get_called_class();
338
  $sql = $_wpdb->prepare( 'SELECT COUNT(*) FROM ' . $this->GetTable() . ' WHERE ' . $cond, $args );
339
  return (int) $_wpdb->get_var( $sql );
340
  }
@@ -356,12 +349,13 @@ class WSAL_Adapters_MySQL_ActiveRecord implements WSAL_Adapters_ActiveRecordInte
356
  * Similar to LoadMulti but allows the use of a full SQL query.
357
  *
358
  * @param string $query Full SQL query.
359
- * @param array $args (Optional) Query arguments.
 
360
  * @return array List of loaded records.
 
361
  */
362
  public function LoadMultiQuery( $query, $args = array() ) {
363
  $_wpdb = $this->connection;
364
- $class = get_called_class();
365
  $result = array();
366
  $sql = count( $args ) ? $_wpdb->prepare( $query, $args ) : $query;
367
  foreach ( $_wpdb->get_results( $sql, ARRAY_A ) as $data ) {
@@ -410,6 +404,7 @@ class WSAL_Adapters_MySQL_ActiveRecord implements WSAL_Adapters_ActiveRecordInte
410
  case is_object( $copy->$key ):
411
  $sql .= $key . ' LONGTEXT NOT NULL,' . PHP_EOL;
412
  break;
 
413
  }
414
  }
415
 
@@ -472,16 +467,19 @@ class WSAL_Adapters_MySQL_ActiveRecord implements WSAL_Adapters_ActiveRecordInte
472
  /**
473
  * Function used in WSAL reporting extension.
474
  *
475
- * @param int $_site_id - Site ID.
476
- * @param int $_user_id - User ID.
477
  * @param string $_role_name - User role.
478
- * @param int $_alert_code - Alert code.
479
- * @param int $_start_timestamp - From created_on.
480
- * @param int $_end_timestamp - To created_on.
481
- * @param int $_next_date - (Optional) Created on >.
482
- * @param int $_limit - (Optional) Limit.
483
  * @param string $_post_types - (Optional) Post types.
484
  * @param string $_post_statuses - (Optional) Post statuses.
 
 
 
485
  * @return array Report results
486
  */
487
  public function GetReporting( $_site_id, $_user_id, $_role_name, $_alert_code, $_start_timestamp, $_end_timestamp, $_next_date = null, $_limit = 0, $_post_types = '', $_post_statuses = '', $_objects = '', $_event_types = '' ) {
@@ -511,7 +509,9 @@ class WSAL_Adapters_MySQL_ActiveRecord implements WSAL_Adapters_ActiveRecordInte
511
  COALESCE(
512
  (SELECT replace(t4.value, '\"', '') FROM $table_meta as t4 WHERE t4.name = 'Username' AND t4.occurrence_id = occ.id LIMIT 1),
513
  (SELECT replace(t5.value, '\"', '') FROM $table_meta as t5 WHERE t5.name = 'CurrentUserID' AND t5.occurrence_id = occ.id LIMIT 1)
514
- ) as user_id
 
 
515
  FROM $table_occ AS occ
516
  JOIN $table_meta AS meta ON meta.occurrence_id = occ.id
517
  WHERE
@@ -561,7 +561,9 @@ class WSAL_Adapters_MySQL_ActiveRecord implements WSAL_Adapters_ActiveRecordInte
561
  COALESCE(
562
  (SELECT replace(t4.value, '\"', '') FROM $table_meta as t4 WHERE t4.name = 'Username' AND t4.occurrence_id = occ.id LIMIT 1),
563
  (SELECT replace(t5.value, '\"', '') FROM $table_meta as t5 WHERE t5.name = 'CurrentUserID' AND t5.occurrence_id = occ.id LIMIT 1)
564
- ) as user_id
 
 
565
  FROM
566
  $table_occ as occ
567
  WHERE
@@ -734,8 +736,7 @@ class WSAL_Adapters_MySQL_ActiveRecord implements WSAL_Adapters_ActiveRecordInte
734
  $_wpdb->query( "SET @endTimestamp = $_end_timestamp" );
735
  $_wpdb->query( "SET @ipAddress = $_ip_address" );
736
 
737
- $count = (int) $_wpdb->get_var( $sql );
738
- return $count;
739
  }
740
 
741
  /**
@@ -840,11 +841,12 @@ class WSAL_Adapters_MySQL_ActiveRecord implements WSAL_Adapters_ActiveRecordInte
840
  if ( ! empty( $results ) ) {
841
  foreach ( $results as $key => $row ) {
842
  // Get the display_name only for the first row & if the user_login changed from the previous row.
 
843
  if ( 0 == $key || ( $key > 1 && $results[ ( $key - 1 ) ]->user_login != $row->user_login ) ) {
844
  $sql = "SELECT t5.display_name FROM $wpdb->users AS t5 WHERE t5.user_login = \"$row->user_login\"";
845
  $display_name = $wpdb->get_var( $sql );
 
846
  }
847
- $row->display_name = $display_name;
848
 
849
  if ( ! isset( $grouped_types[ $row->user_login ] ) ) {
850
  $grouped_types[ $row->user_login ] = array(
@@ -904,4 +906,11 @@ class WSAL_Adapters_MySQL_ActiveRecord implements WSAL_Adapters_ActiveRecordInte
904
  public function UpdateQuery( $table, $data, $where ) {
905
  return $this->connection->update( $table, $data, $where );
906
  }
 
 
 
 
 
 
 
907
  }
62
  return $this->connection;
63
  }
64
 
 
 
 
 
 
 
 
 
 
65
  /**
66
  * Returns table name.
67
  *
170
 
171
  // Query table exists.
172
  $table_exists_query = "SHOW TABLES LIKE '" . $this->GetTable() . "'";
173
+ return $_wpdb->query( $table_exists_query );
 
174
  }
175
 
176
  /**
213
 
214
  $result = $_wpdb->replace( $this->GetTable(), $data, $format );
215
 
216
+ if ( false !== $result && $_wpdb->insert_id ) {
217
+ $copy->setId( $_wpdb->insert_id );
 
 
218
  }
219
  return $result;
220
  }
223
  * Load record from DB (Single row).
224
  *
225
  * @param string $cond - (Optional) Load condition.
226
+ * @param array $args - (Optional) Load condition arguments.
227
+ *
228
+ * @return array
229
  */
230
  public function Load( $cond = '%d', $args = array( 1 ) ) {
231
  $_wpdb = $this->connection;
232
  $sql = $_wpdb->prepare( 'SELECT * FROM ' . $this->GetTable() . ' WHERE ' . $cond, $args );
233
+ return $_wpdb->get_row( $sql, ARRAY_A );
 
234
  }
235
 
236
  /**
237
  * Load records from DB (Multi rows).
238
  *
239
  * @param string $cond Load condition.
240
+ * @param array $args (Optional) Load condition arguments.
241
+ *
242
+ * @return array
243
+ * @throws Exception
244
  */
245
  public function LoadArray( $cond, $args = array() ) {
246
  $_wpdb = $this->connection;
260
  */
261
  public function Delete( $active_record ) {
262
  $_wpdb = $this->connection;
263
+ return $_wpdb->delete(
264
  $this->GetTable(),
265
  $active_record->getId()
266
  );
 
267
  }
268
 
269
  /**
270
  * Delete records in DB matching a query.
271
  *
272
  * @param string $query Full SQL query.
273
+ * @param array $args (Optional) Query arguments.
274
+ *
275
+ * @return int|bool
276
  */
277
  public function DeleteQuery( $query, $args = array() ) {
278
  $_wpdb = $this->connection;
279
  $sql = count( $args ) ? $_wpdb->prepare( $query, $args ) : $query;
280
+ return $_wpdb->query( $sql );
 
281
  }
282
 
283
  /**
284
  * Load multiple records from DB.
285
  *
286
  * @param string $cond (Optional) Load condition (eg: 'some_id = %d' ).
287
+ * @param array $args (Optional) Load condition arguments (rg: array(45) ).
288
+ *
289
  * @return self[] List of loaded records.
290
+ * @throws Exception
291
  */
292
  public function LoadMulti( $cond, $args = array() ) {
293
  $_wpdb = $this->connection;
328
  */
329
  public function Count( $cond = '%d', $args = array( 1 ) ) {
330
  $_wpdb = $this->connection;
 
331
  $sql = $_wpdb->prepare( 'SELECT COUNT(*) FROM ' . $this->GetTable() . ' WHERE ' . $cond, $args );
332
  return (int) $_wpdb->get_var( $sql );
333
  }
349
  * Similar to LoadMulti but allows the use of a full SQL query.
350
  *
351
  * @param string $query Full SQL query.
352
+ * @param array $args (Optional) Query arguments.
353
+ *
354
  * @return array List of loaded records.
355
+ * @throws Exception
356
  */
357
  public function LoadMultiQuery( $query, $args = array() ) {
358
  $_wpdb = $this->connection;
 
359
  $result = array();
360
  $sql = count( $args ) ? $_wpdb->prepare( $query, $args ) : $query;
361
  foreach ( $_wpdb->get_results( $sql, ARRAY_A ) as $data ) {
404
  case is_object( $copy->$key ):
405
  $sql .= $key . ' LONGTEXT NOT NULL,' . PHP_EOL;
406
  break;
407
+ default:
408
  }
409
  }
410
 
467
  /**
468
  * Function used in WSAL reporting extension.
469
  *
470
+ * @param int $_site_id - Site ID.
471
+ * @param int $_user_id - User ID.
472
  * @param string $_role_name - User role.
473
+ * @param int $_alert_code - Alert code.
474
+ * @param int $_start_timestamp - From created_on.
475
+ * @param int $_end_timestamp - To created_on.
476
+ * @param int $_next_date - (Optional) Created on >.
477
+ * @param int $_limit - (Optional) Limit.
478
  * @param string $_post_types - (Optional) Post types.
479
  * @param string $_post_statuses - (Optional) Post statuses.
480
+ * @param string $_objects
481
+ * @param string $_event_types
482
+ *
483
  * @return array Report results
484
  */
485
  public function GetReporting( $_site_id, $_user_id, $_role_name, $_alert_code, $_start_timestamp, $_end_timestamp, $_next_date = null, $_limit = 0, $_post_types = '', $_post_statuses = '', $_objects = '', $_event_types = '' ) {
509
  COALESCE(
510
  (SELECT replace(t4.value, '\"', '') FROM $table_meta as t4 WHERE t4.name = 'Username' AND t4.occurrence_id = occ.id LIMIT 1),
511
  (SELECT replace(t5.value, '\"', '') FROM $table_meta as t5 WHERE t5.name = 'CurrentUserID' AND t5.occurrence_id = occ.id LIMIT 1)
512
+ ) as user_id,
513
+ (SELECT replace(t6.value, '\"', '') FROM $table_meta as t6 WHERE t6.name = 'Object' AND t6.occurrence_id = occ.id LIMIT 1) AS object,
514
+ (SELECT replace(t7.value, '\"', '') FROM $table_meta as t7 WHERE t7.name = 'EventType' AND t7.occurrence_id = occ.id LIMIT 1) AS event_type
515
  FROM $table_occ AS occ
516
  JOIN $table_meta AS meta ON meta.occurrence_id = occ.id
517
  WHERE
561
  COALESCE(
562
  (SELECT replace(t4.value, '\"', '') FROM $table_meta as t4 WHERE t4.name = 'Username' AND t4.occurrence_id = occ.id LIMIT 1),
563
  (SELECT replace(t5.value, '\"', '') FROM $table_meta as t5 WHERE t5.name = 'CurrentUserID' AND t5.occurrence_id = occ.id LIMIT 1)
564
+ ) as user_id,
565
+ (SELECT replace(t6.value, '\"', '') FROM $table_meta as t6 WHERE t6.name = 'Object' AND t6.occurrence_id = occ.id LIMIT 1) AS object,
566
+ (SELECT replace(t7.value, '\"', '') FROM $table_meta as t7 WHERE t7.name = 'EventType' AND t7.occurrence_id = occ.id LIMIT 1) AS event_type
567
  FROM
568
  $table_occ as occ
569
  WHERE
736
  $_wpdb->query( "SET @endTimestamp = $_end_timestamp" );
737
  $_wpdb->query( "SET @ipAddress = $_ip_address" );
738
 
739
+ return (int) $_wpdb->get_var( $sql );
 
740
  }
741
 
742
  /**
841
  if ( ! empty( $results ) ) {
842
  foreach ( $results as $key => $row ) {
843
  // Get the display_name only for the first row & if the user_login changed from the previous row.
844
+ $row->display_name = '';
845
  if ( 0 == $key || ( $key > 1 && $results[ ( $key - 1 ) ]->user_login != $row->user_login ) ) {
846
  $sql = "SELECT t5.display_name FROM $wpdb->users AS t5 WHERE t5.user_login = \"$row->user_login\"";
847
  $display_name = $wpdb->get_var( $sql );
848
+ $row->display_name = $display_name;
849
  }
 
850
 
851
  if ( ! isset( $grouped_types[ $row->user_login ] ) ) {
852
  $grouped_types[ $row->user_login ] = array(
906
  public function UpdateQuery( $table, $data, $where ) {
907
  return $this->connection->update( $table, $data, $where );
908
  }
909
+
910
+ /**
911
+ * @inheritDoc
912
+ */
913
+ public function GetModel() {
914
+ // implement in subclass
915
+ }
916
  }
classes/Adapters/MySQL/MetaAdapter.php CHANGED
@@ -80,15 +80,6 @@ class WSAL_Adapters_MySQL_Meta extends WSAL_Adapters_MySQL_ActiveRecord implemen
80
  return new WSAL_Models_Meta();
81
  }
82
 
83
- /**
84
- * Method: Constructor.
85
- *
86
- * @param array $conn - Connection array.
87
- */
88
- public function __construct( $conn ) {
89
- parent::__construct( $conn );
90
- }
91
-
92
  /**
93
  * SQL table options (constraints, foreign keys, indexes etc).
94
  *
@@ -99,28 +90,16 @@ class WSAL_Adapters_MySQL_Meta extends WSAL_Adapters_MySQL_ActiveRecord implemen
99
  . ' KEY occurrence_name (occurrence_id,name)';
100
  }
101
 
102
- /**
103
- * Delete metadata by occurrence_id.
104
- *
105
- * @param array $occurence_ids - List of occurrence IDs.
106
- */
107
- public function DeleteByOccurenceIds( $occurence_ids ) {
108
- if ( ! empty( $occurence_ids ) ) {
109
- $sql = 'DELETE FROM ' . $this->GetTable() . ' WHERE occurrence_id IN (' . implode( ',', $occurence_ids ) . ')';
110
  // Execute query.
111
  parent::DeleteQuery( $sql );
112
  }
113
  }
114
 
115
- /**
116
- * Load metadata by name and occurrence_id.
117
- *
118
- * @param string $meta_name - Metadata name.
119
- * @param string $occurence_id - Metadata occurrence_id.
120
- * @return WSAL_Models_Meta[]
121
- */
122
- public function LoadByNameAndOccurenceId( $meta_name, $occurence_id ) {
123
- return $this->Load( 'occurrence_id = %d AND name = %s', array( $occurence_id, $meta_name ) );
124
  }
125
 
126
  /**
@@ -148,6 +127,7 @@ class WSAL_Adapters_MySQL_Meta extends WSAL_Adapters_MySQL_ActiveRecord implemen
148
  public function create_indexes() {
149
  $db_connection = $this->get_connection();
150
  // check if an index exists.
 
151
  if ( $db_connection->query( 'SELECT COUNT(1) IndexIsThere FROM INFORMATION_SCHEMA.STATISTICS WHERE table_schema=DATABASE() AND table_name="' . $this->GetTable() . '" AND index_name="name_value"' ) ) {
152
  // query succeeded, does index exist?
153
  $index_exists = ( isset( $db_connection->last_result[0]->IndexIsThere ) ) ? $db_connection->last_result[0]->IndexIsThere : false;
80
  return new WSAL_Models_Meta();
81
  }
82
 
 
 
 
 
 
 
 
 
 
83
  /**
84
  * SQL table options (constraints, foreign keys, indexes etc).
85
  *
90
  . ' KEY occurrence_name (occurrence_id,name)';
91
  }
92
 
93
+ public function DeleteByOccurrenceIds( $occurrence_ids ) {
94
+ if ( ! empty( $occurrence_ids ) ) {
95
+ $sql = 'DELETE FROM ' . $this->GetTable() . ' WHERE occurrence_id IN (' . implode( ',', $occurrence_ids ) . ')';
 
 
 
 
 
96
  // Execute query.
97
  parent::DeleteQuery( $sql );
98
  }
99
  }
100
 
101
+ public function LoadByNameAndOccurrenceId( $meta_name, $occurrence_id ) {
102
+ return $this->Load( 'occurrence_id = %d AND name = %s', array( $occurrence_id, $meta_name ) );
 
 
 
 
 
 
 
103
  }
104
 
105
  /**
127
  public function create_indexes() {
128
  $db_connection = $this->get_connection();
129
  // check if an index exists.
130
+ $index_exists = false;
131
  if ( $db_connection->query( 'SELECT COUNT(1) IndexIsThere FROM INFORMATION_SCHEMA.STATISTICS WHERE table_schema=DATABASE() AND table_name="' . $this->GetTable() . '" AND index_name="name_value"' ) ) {
132
  // query succeeded, does index exist?
133
  $index_exists = ( isset( $db_connection->last_result[0]->IndexIsThere ) ) ? $db_connection->last_result[0]->IndexIsThere : false;
classes/Adapters/MySQL/OccurrenceAdapter.php CHANGED
@@ -84,15 +84,6 @@ class WSAL_Adapters_MySQL_Occurrence extends WSAL_Adapters_MySQL_ActiveRecord im
84
  */
85
  public $is_migrated = false;
86
 
87
- /**
88
- * Method: Constructor.
89
- *
90
- * @param array $conn - Connection array.
91
- */
92
- public function __construct( $conn ) {
93
- parent::__construct( $conn );
94
- }
95
-
96
  /**
97
  * SQL table options (constraints, foreign keys, indexes etc).
98
  *
@@ -292,27 +283,6 @@ class WSAL_Adapters_MySQL_Occurrence extends WSAL_Adapters_MySQL_ActiveRecord im
292
  );
293
  }
294
 
295
- /**
296
- * Gets occurrences of the same type by IP within specified time frame.
297
- *
298
- * @param array $args - Query Arguments.
299
- * @return WSAL_Models_Occurrence[]
300
- */
301
- public function CheckAlert404( $args = array() ) {
302
- $tt2 = new WSAL_Adapters_MySQL_Meta( $this->connection );
303
- return $this->LoadMultiQuery(
304
- 'SELECT occurrence.* FROM `' . $this->GetTable() . '` occurrence
305
- INNER JOIN `' . $tt2->GetTable() . '` ipMeta on ipMeta.occurrence_id = occurrence.id
306
- and ipMeta.name = "ClientIP" and ipMeta.value = %s
307
- INNER JOIN `' . $tt2->GetTable() . '` usernameMeta on usernameMeta.occurrence_id = occurrence.id
308
- and usernameMeta.name = "Username" and usernameMeta.value = %s
309
- WHERE occurrence.alert_id = %d AND occurrence.site_id = %d
310
- AND (created_on BETWEEN %d AND %d)
311
- GROUP BY occurrence.id',
312
- $args
313
- );
314
- }
315
-
316
  /**
317
  * Create relevant indexes on the occurrence table.
318
  */
84
  */
85
  public $is_migrated = false;
86
 
 
 
 
 
 
 
 
 
 
87
  /**
88
  * SQL table options (constraints, foreign keys, indexes etc).
89
  *
283
  );
284
  }
285
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
286
  /**
287
  * Create relevant indexes on the occurrence table.
288
  */
classes/Adapters/MySQL/QueryAdapter.php CHANGED
@@ -106,11 +106,16 @@ class WSAL_Adapters_MySQL_Query implements WSAL_Adapters_QueryInterface {
106
  $args[] = $search_condition['args'];
107
  }
108
 
 
 
 
 
 
109
  $sql = 'SELECT ' . $fields
110
  . ' FROM ' . implode( ',', $from_data_sets )
111
  . $join_clause
112
  . $s_where_clause
113
- . ( ! empty( $search_condition ) ? (empty( $s_where_clause ) ? ' WHERE ' . $search_condition['sql'] : ' AND ' . $search_condition['sql']) : '')
114
  // @todo GROUP BY goes here
115
  . ( ! empty( $order_bys ) ? (' ORDER BY ' . implode( ', ', array_keys( $order_bys ) ) . ' ' . implode( ', ', array_values( $order_bys ) )) : '')
116
  . $s_limit_clause;
@@ -211,7 +216,7 @@ class WSAL_Adapters_MySQL_Query implements WSAL_Adapters_QueryInterface {
211
  $occ_ids[] = $data['id'];
212
  }
213
  $meta = new WSAL_Adapters_MySQL_Meta( $this->connection );
214
- $meta->DeleteByOccurenceIds( $occ_ids );
215
  }
216
 
217
  /**
106
  $args[] = $search_condition['args'];
107
  }
108
 
109
+ $search_statement = '';
110
+ if ( ! empty( $search_condition ) ) {
111
+ $search_statement = empty( $s_where_clause ) ? ' WHERE ' . $search_condition['sql'] : ' AND ' . $search_condition['sql'];
112
+ }
113
+
114
  $sql = 'SELECT ' . $fields
115
  . ' FROM ' . implode( ',', $from_data_sets )
116
  . $join_clause
117
  . $s_where_clause
118
+ . $search_statement
119
  // @todo GROUP BY goes here
120
  . ( ! empty( $order_bys ) ? (' ORDER BY ' . implode( ', ', array_keys( $order_bys ) ) . ' ' . implode( ', ', array_values( $order_bys ) )) : '')
121
  . $s_limit_clause;
216
  $occ_ids[] = $data['id'];
217
  }
218
  $meta = new WSAL_Adapters_MySQL_Meta( $this->connection );
219
+ $meta->DeleteByOccurrenceIds( $occ_ids );
220
  }
221
 
222
  /**
classes/Adapters/MySQL/TmpUserAdapter.php CHANGED
@@ -40,15 +40,6 @@ class WSAL_Adapters_MySQL_TmpUser extends WSAL_Adapters_MySQL_ActiveRecord {
40
  return new WSAL_Models_TmpUser();
41
  }
42
 
43
- /**
44
- * Method: Constructor.
45
- *
46
- * @param array $conn - Connection array.
47
- */
48
- public function __construct( $conn ) {
49
- parent::__construct( $conn );
50
- }
51
-
52
  /**
53
  * Must return SQL for creating table.
54
  *
40
  return new WSAL_Models_TmpUser();
41
  }
42
 
 
 
 
 
 
 
 
 
 
43
  /**
44
  * Must return SQL for creating table.
45
  *
classes/Alert.php CHANGED
@@ -124,25 +124,25 @@ final class WSAL_Alert {
124
  */
125
  protected function GetFormattedMesg( $orig_mesg, $meta_data = array(), $meta_formatter = null, $occurrence_id = 0, $highlight = null ) {
126
  // Tokenize message with regex.
127
- $mesg = preg_split( '/(%.*?%)/', (string) $orig_mesg, -1, PREG_SPLIT_DELIM_CAPTURE );
128
- if ( ! is_array( $mesg ) ) {
129
  return (string) $orig_mesg;
130
  }
131
  // Handle tokenized message.
132
- foreach ( $mesg as $i => $token ) {
133
  // Handle escaped percent sign.
134
  if ( '%%' == $token ) {
135
- $mesg[ $i ] = '%';
136
  } elseif ( substr( $token, 0, 1 ) == '%' && substr( $token, -1, 1 ) == '%' ) {
137
  // Handle complex expressions.
138
- $mesg[ $i ] = $this->GetMetaExprValue( substr( $token, 1, -1 ), $meta_data );
139
  if ( $meta_formatter ) {
140
- $mesg[ $i ] = call_user_func( $meta_formatter, $token, $mesg[ $i ], $occurrence_id, $highlight );
141
  }
142
  }
143
  }
144
  // Compact message and return.
145
- return implode( '', $mesg );
146
  }
147
 
148
  /**
124
  */
125
  protected function GetFormattedMesg( $orig_mesg, $meta_data = array(), $meta_formatter = null, $occurrence_id = 0, $highlight = null ) {
126
  // Tokenize message with regex.
127
+ $message = preg_split( '/(%.*?%)/', (string) $orig_mesg, -1, PREG_SPLIT_DELIM_CAPTURE );
128
+ if ( ! is_array( $message ) ) {
129
  return (string) $orig_mesg;
130
  }
131
  // Handle tokenized message.
132
+ foreach ( $message as $i => $token ) {
133
  // Handle escaped percent sign.
134
  if ( '%%' == $token ) {
135
+ $message[ $i ] = '%';
136
  } elseif ( substr( $token, 0, 1 ) == '%' && substr( $token, -1, 1 ) == '%' ) {
137
  // Handle complex expressions.
138
+ $message[ $i ] = $this->GetMetaExprValue( substr( $token, 1, -1 ), $meta_data );
139
  if ( $meta_formatter ) {
140
+ $message[ $i ] = call_user_func( $meta_formatter, $token, $message[ $i ], $occurrence_id, $highlight );
141
  }
142
  }
143
  }
144
  // Compact message and return.
145
+ return implode( '', $message );
146
  }
147
 
148
  /**
classes/AlertManager.php CHANGED
@@ -256,7 +256,7 @@ final class WSAL_AlertManager {
256
  }
257
 
258
  // Get current user roles.
259
- if ( isset( $old_user ) && ! false === $old_user ) {
260
  // looks like this is a switched user so setup original user
261
  // roles and values for later user.
262
  $roles = $old_user->roles;
@@ -345,13 +345,15 @@ final class WSAL_AlertManager {
345
  /**
346
  * Method: Commit an alert now.
347
  *
348
- * @param int $type - Alert type.
349
  * @param array $data - Data of the alert.
350
  * @param array $cond - Condition for the alert.
351
- * @param bool $_retry - Retry.
352
- * @internal
353
  *
 
354
  * @throws Exception - Error if alert is not registered.
 
 
355
  */
356
  protected function _CommitItem( $type, $data, $cond, $_retry = true ) {
357
  // Double NOT operation here is intentional. Same as ! ( bool ) [ $value ]
@@ -448,6 +450,8 @@ final class WSAL_AlertManager {
448
  *
449
  * @param array $groups - An array with group name as the index and an array of group items as the value.
450
  * Item values is an array of [type, code, description, message, object, event type] respectively.
 
 
451
  */
452
  public function RegisterGroup( $groups ) {
453
  foreach ( $groups as $name => $group ) {
@@ -874,13 +878,14 @@ final class WSAL_AlertManager {
874
  * is back.
875
  *
876
  * @return boolean
 
877
  */
878
  public function log_temp_alerts() {
879
  // Get temporary alerts.
880
  $temp_alerts = $this->plugin->GetGlobalSetting( 'temp_alerts', array() );
881
 
882
  if ( empty( $temp_alerts ) ) {
883
- return;
884
  }
885
 
886
  // Get DB connector.
@@ -897,7 +902,7 @@ final class WSAL_AlertManager {
897
  // Check DB connection.
898
  if ( $connection ) { // If connected then log temporary alerts in DB.
899
  // Log each alert.
900
- foreach ( $temp_alerts as $timestamp => $alert ) {
901
  $is_migrated = $alert['alert']['is_migrated'];
902
  $created_on = $alert['alert']['created_on'];
903
  $alert_id = $alert['alert']['alert_id'];
@@ -1105,7 +1110,7 @@ final class WSAL_AlertManager {
1105
  *
1106
  * @param array $public_events - Array of public event ids.
1107
  */
1108
- return apply_filters( 'wsal_public_event_ids', array( 1000, 1002, 1003, 1004, 1005, 1007, 2126, 4000, 4012, 6023 ) ); // Public events.
1109
  }
1110
 
1111
  /**
@@ -1423,7 +1428,9 @@ final class WSAL_AlertManager {
1423
  foreach ( $value as $post_meta ) {
1424
  if ( $last_value === $post_meta ) {
1425
  continue;
1426
- } elseif ( 'postname' === $prefix ) {
 
 
1427
  $sql .= "( (meta.value LIKE '$post_meta') > 0 ) OR ";
1428
  } else {
1429
  $sql .= "meta.value='$post_meta' OR ";
@@ -1661,12 +1668,7 @@ final class WSAL_AlertManager {
1661
  }
1662
 
1663
  $t = $this->get_alert_details( $entry->id, $entry->alert_id, $entry->site_id, $entry->created_on, $entry->user_id, $roles, $ip, $ua );
1664
-
1665
- if ( ! empty( $ip_addresses ) && in_array( $entry->ip, $ip_addresses, true ) ) {
1666
- array_push( $data, $t );
1667
- } else {
1668
- array_push( $data, $t );
1669
- }
1670
  }
1671
  }
1672
 
256
  }
257
 
258
  // Get current user roles.
259
+ if ( isset( $old_user ) && false !== $old_user ) {
260
  // looks like this is a switched user so setup original user
261
  // roles and values for later user.
262
  $roles = $old_user->roles;
345
  /**
346
  * Method: Commit an alert now.
347
  *
348
+ * @param int $type - Alert type.
349
  * @param array $data - Data of the alert.
350
  * @param array $cond - Condition for the alert.
351
+ * @param bool $_retry - Retry.
 
352
  *
353
+ * @return mixed
354
  * @throws Exception - Error if alert is not registered.
355
+ * @internal
356
+ *
357
  */
358
  protected function _CommitItem( $type, $data, $cond, $_retry = true ) {
359
  // Double NOT operation here is intentional. Same as ! ( bool ) [ $value ]
450
  *
451
  * @param array $groups - An array with group name as the index and an array of group items as the value.
452
  * Item values is an array of [type, code, description, message, object, event type] respectively.
453
+ *
454
+ * @throws Exception
455
  */
456
  public function RegisterGroup( $groups ) {
457
  foreach ( $groups as $name => $group ) {
878
  * is back.
879
  *
880
  * @return boolean
881
+ * @throws Freemius_Exception
882
  */
883
  public function log_temp_alerts() {
884
  // Get temporary alerts.
885
  $temp_alerts = $this->plugin->GetGlobalSetting( 'temp_alerts', array() );
886
 
887
  if ( empty( $temp_alerts ) ) {
888
+ return true;
889
  }
890
 
891
  // Get DB connector.
902
  // Check DB connection.
903
  if ( $connection ) { // If connected then log temporary alerts in DB.
904
  // Log each alert.
905
+ foreach ( $temp_alerts as $alert ) {
906
  $is_migrated = $alert['alert']['is_migrated'];
907
  $created_on = $alert['alert']['created_on'];
908
  $alert_id = $alert['alert']['alert_id'];
1110
  *
1111
  * @param array $public_events - Array of public event ids.
1112
  */
1113
+ return apply_filters( 'wsal_public_event_ids', array( 1000, 1002, 1003, 1004, 1005, 1007, 2126, 4000, 4012 ) ); // Public events.
1114
  }
1115
 
1116
  /**
1428
  foreach ( $value as $post_meta ) {
1429
  if ( $last_value === $post_meta ) {
1430
  continue;
1431
+ }
1432
+
1433
+ if ( 'postname' === $prefix ) {
1434
  $sql .= "( (meta.value LIKE '$post_meta') > 0 ) OR ";
1435
  } else {
1436
  $sql .= "meta.value='$post_meta' OR ";
1668
  }
1669
 
1670
  $t = $this->get_alert_details( $entry->id, $entry->alert_id, $entry->site_id, $entry->created_on, $entry->user_id, $roles, $ip, $ua );
1671
+ array_push( $data, $t );
 
 
 
 
 
1672
  }
1673
  }
1674
 
classes/AuditLogGridView.php CHANGED
@@ -346,6 +346,9 @@ class WSAL_AuditLogGridView extends WP_List_Table {
346
  case 'message':
347
  $cols['mesg'] = __( 'Message', 'wp-security-audit-log' );
348
  break;
 
 
 
349
  }
350
  }
351
  }
@@ -398,14 +401,10 @@ class WSAL_AuditLogGridView extends WP_List_Table {
398
  $code = $this->_plugin->alerts->GetAlert( $item->alert_id );
399
  $extra_msg = '';
400
  $data_link = '';
401
- $modification_alerts = array( 1002, 1003, 6007, 6023 );
402
  if ( in_array( $item->alert_id, $modification_alerts, true ) ) {
403
  $extra_msg = '. Modify this alert.';
404
- if ( 1002 === $item->alert_id || 1003 === $item->alert_id ) {
405
- $data_link = add_query_arg( 'page', 'wsal-togglealerts#tab-users-profiles---activity', admin_url( 'admin.php' ) );
406
- } elseif ( 6007 === $item->alert_id || 6023 === $item->alert_id ) {
407
- $data_link = add_query_arg( 'page', 'wsal-togglealerts#tab-system-activity', admin_url( 'admin.php' ) );
408
- }
409
  }
410
 
411
  if ( ! $this->_plugin->settings()->CurrentUserCan( 'edit' ) ) {
@@ -413,7 +412,7 @@ class WSAL_AuditLogGridView extends WP_List_Table {
413
  }
414
  // add description to $extra_msg only if one is available.
415
  $extra_msg = ( isset( $code->desc ) ) ? ' - ' . esc_html( $code->desc ) . $extra_msg : $extra_msg;
416
- return '<span class="log-disable" data-disable-alert-nonce="' . wp_create_nonce( 'disable-alert-nonce' . $item->alert_id ) . '" data-tooltip="' . __( 'Disable this type of events.', 'wp-security-audit-log' ) . '<br>' . $item->alert_id . $extra_msg . '" data-alert-id="' . $item->alert_id . '" ' . esc_attr( 'data-link=' . $data_link ) . ' >'
417
  . str_pad( $item->alert_id, 4, '0', STR_PAD_LEFT ) . ' </span>';
418
 
419
  case 'code':
@@ -439,11 +438,6 @@ class WSAL_AuditLogGridView extends WP_List_Table {
439
  }
440
  return ob_get_clean();
441
  case 'info':
442
- $code = $this->_plugin->alerts->GetAlert( $item->alert_id );
443
- $extra_msg = '';
444
- $data_link = '';
445
- $modification_alerts = array( 1002, 1003, 6007, 6023 );
446
-
447
  $date_format = $this->_plugin->settings()->GetDateFormat();
448
  $show_microseconds = $this->_plugin->settings()->get_show_milliseconds();
449
  if ( ! $show_microseconds ) {
@@ -538,7 +532,7 @@ class WSAL_AuditLogGridView extends WP_List_Table {
538
  $scip = str_replace( array( '"', '[', ']' ), '', $scip );
539
  }
540
 
541
- $oips = array(); // $item->GetOtherIPs();
542
 
543
  // If there's no IP...
544
  if ( is_null( $scip ) || '' == $scip ) {
@@ -675,7 +669,7 @@ class WSAL_AuditLogGridView extends WP_List_Table {
675
 
676
  case '%MetaLink%' == $name:
677
  if ( ! empty( $value ) ) {
678
- return "<a href=\"#\" data-disable-custom-nonce='" . wp_create_nonce( 'disable-custom-nonce' . $value ) . "' onclick=\"WsalDisableCustom(this, '" . $value . "');\"> Exclude Custom Field from the Monitoring</a>";
679
  } else {
680
  return '';
681
  }
@@ -718,17 +712,6 @@ class WSAL_AuditLogGridView extends WP_List_Table {
718
  return '<i>unknown</i>';
719
  }
720
 
721
- case '%LinkFile%' === $name:
722
- if ( 'NULL' != $value ) {
723
- $site_id = $this->get_view_site_id(); // Site id for multisite.
724
- return '<a href="javascript:;" onclick="download_404_log( this )" data-log-file="' . esc_attr( $value ) . '" data-site-id="' . esc_attr( $site_id ) . '" data-nonce-404="' . esc_attr( wp_create_nonce( 'wsal-download-404-log-' . $value ) ) . '" title="' . esc_html__( 'Download the log file', 'wp-security-audit-log' ) . '">' . esc_html__( 'Download the log file', 'wp-security-audit-log' ) . '</a>';
725
- } else {
726
- return 'Click <a href="' . esc_url( admin_url( 'admin.php?page=wsal-togglealerts#tab-system-activity' ) ) . '">here</a> to log such requests to file';
727
- }
728
-
729
- case '%URL%' === $name:
730
- return ' or <a href="javascript:;" data-exclude-url="' . esc_url( $value ) . '" data-exclude-url-nonce="' . wp_create_nonce( 'wsal-exclude-url-' . $value ) . '" onclick="wsal_exclude_url( this )">exclude this URL</a> from being reported.';
731
-
732
  case '%LogFileLink%' === $name: // Failed login file link.
733
  return '';
734
 
346
  case 'message':
347
  $cols['mesg'] = __( 'Message', 'wp-security-audit-log' );
348
  break;
349
+ default:
350
+ // fallback for any new columns would go here
351
+ break;
352
  }
353
  }
354
  }
401
  $code = $this->_plugin->alerts->GetAlert( $item->alert_id );
402
  $extra_msg = '';
403
  $data_link = '';
404
+ $modification_alerts = array( 1002, 1003 );
405
  if ( in_array( $item->alert_id, $modification_alerts, true ) ) {
406
  $extra_msg = '. Modify this alert.';
407
+ $data_link = add_query_arg( 'page', 'wsal-togglealerts#tab-users-profiles---activity', admin_url( 'admin.php' ) );
 
 
 
 
408
  }
409
 
410
  if ( ! $this->_plugin->settings()->CurrentUserCan( 'edit' ) ) {
412
  }
413
  // add description to $extra_msg only if one is available.
414
  $extra_msg = ( isset( $code->desc ) ) ? ' - ' . esc_html( $code->desc ) . $extra_msg : $extra_msg;
415
+ return '<span class="log-disable" data-disable-alert-nonce="' . wp_create_nonce( 'disable-alert-nonce' . $item->alert_id ) . '" data-tooltip="<strong>' . __( 'Disable this type of events.', 'wp-security-audit-log' ) . '</strong><br>' . $item->alert_id . $extra_msg . '" data-alert-id="' . $item->alert_id . '" ' . esc_attr( 'data-link=' . $data_link ) . ' >'
416
  . str_pad( $item->alert_id, 4, '0', STR_PAD_LEFT ) . ' </span>';
417
 
418
  case 'code':
438
  }
439
  return ob_get_clean();
440
  case 'info':
 
 
 
 
 
441
  $date_format = $this->_plugin->settings()->GetDateFormat();
442
  $show_microseconds = $this->_plugin->settings()->get_show_milliseconds();
443
  if ( ! $show_microseconds ) {
532
  $scip = str_replace( array( '"', '[', ']' ), '', $scip );
533
  }
534
 
535
+ $oips = array();
536
 
537
  // If there's no IP...
538
  if ( is_null( $scip ) || '' == $scip ) {
669
 
670
  case '%MetaLink%' == $name:
671
  if ( ! empty( $value ) ) {
672
+ return "<a href=\"#\" data-disable-custom-nonce='" . wp_create_nonce( 'disable-custom-nonce' . $value ) . "' onclick=\"return WsalDisableCustom(this, '" . $value . "');\"> Exclude Custom Field from the Monitoring</a>";
673
  } else {
674
  return '';
675
  }
712
  return '<i>unknown</i>';
713
  }
714
 
 
 
 
 
 
 
 
 
 
 
 
715
  case '%LogFileLink%' === $name: // Failed login file link.
716
  return '';
717
 
classes/AuditLogListView.php CHANGED
@@ -316,15 +316,6 @@ class WSAL_AuditLogListView extends WP_List_Table {
316
  * @return array
317
  */
318
  public function get_columns() {
319
- // Get user information from settings.
320
- // if ( empty( $this->name_type ) ) {
321
- // $this->name_type = $this->_plugin->settings()->get_type_username();
322
- // }
323
- // if ( 'display_name' === $this->name_type || 'first_last_name' === $this->name_type ) {
324
- // $name_column = __( 'User', 'wp-security-audit-log' );
325
- // } elseif ( 'username' === $this->name_type ) {
326
- // $name_column = __( 'Username', 'wp-security-audit-log' );
327
- // }
328
  // Audit log columns.
329
  $cols = array(
330
  'type' => __( 'ID', 'wp-security-audit-log' ),
@@ -381,6 +372,9 @@ class WSAL_AuditLogListView extends WP_List_Table {
381
  case 'message':
382
  $cols['mesg'] = __( 'Message', 'wp-security-audit-log' );
383
  break;
 
 
 
384
  }
385
  }
386
  }
@@ -449,21 +443,17 @@ class WSAL_AuditLogListView extends WP_List_Table {
449
  );
450
  $extra_msg = '';
451
  $data_link = '';
452
- $modification_alerts = array( 1002, 1003, 6007, 6023 );
453
  if ( in_array( $item->alert_id, $modification_alerts, true ) ) {
454
  $extra_msg = '. Modify this alert.';
455
- if ( 1002 === $item->alert_id || 1003 === $item->alert_id ) {
456
- $data_link = add_query_arg( 'page', 'wsal-togglealerts#tab-users-profiles---activity', admin_url( 'admin.php' ) );
457
- } elseif ( 6007 === $item->alert_id || 6023 === $item->alert_id ) {
458
- $data_link = add_query_arg( 'page', 'wsal-togglealerts#tab-system-activity', admin_url( 'admin.php' ) );
459
- }
460
  }
461
 
462
  if ( ! $this->_plugin->settings()->CurrentUserCan( 'edit' ) ) {
463
  return '<span class="log-disable">' . str_pad( $item->alert_id, 4, '0', STR_PAD_LEFT ) . ' </span>';
464
  }
465
 
466
- return '<span class="log-disable" data-disable-alert-nonce="' . wp_create_nonce( 'disable-alert-nonce' . $item->alert_id ) . '" data-tooltip="' . __( 'Disable this type of events.', 'wp-security-audit-log' ) . '<br>' . $item->alert_id . ' - ' . esc_html( $code->desc ) . $extra_msg . '" data-alert-id="' . $item->alert_id . '" ' . esc_attr( 'data-link=' . $data_link ) . ' >'
467
  . str_pad( $item->alert_id, 4, '0', STR_PAD_LEFT ) . ' </span>';
468
  case 'code':
469
  $code = $this->_plugin->alerts->GetAlert( $item->alert_id );
@@ -562,7 +552,7 @@ class WSAL_AuditLogListView extends WP_List_Table {
562
  $scip = str_replace( array( '"', '[', ']' ), '', $scip );
563
  }
564
 
565
- $oips = array(); // $item->GetOtherIPs();
566
 
567
  // If there's no IP...
568
  if ( is_null( $scip ) || '' == $scip ) {
@@ -675,7 +665,7 @@ class WSAL_AuditLogListView extends WP_List_Table {
675
 
676
  case '%MetaLink%' == $name:
677
  if ( ! empty( $value ) ) {
678
- return "<a href=\"#\" data-disable-custom-nonce='" . wp_create_nonce( 'disable-custom-nonce' . $value ) . "' onclick=\"WsalDisableCustom(this, '" . $value . "');\"> Exclude Custom Field from the Monitoring</a>";
679
  } else {
680
  return '';
681
  }
@@ -718,17 +708,6 @@ class WSAL_AuditLogListView extends WP_List_Table {
718
  return '<i>unknown</i>';
719
  }
720
 
721
- case '%LinkFile%' === $name:
722
- if ( 'NULL' != $value ) {
723
- $site_id = $this->get_view_site_id(); // Site id for multisite.
724
- return '<a href="javascript:;" onclick="download_404_log( this )" data-log-file="' . esc_attr( $value ) . '" data-site-id="' . esc_attr( $site_id ) . '" data-nonce-404="' . esc_attr( wp_create_nonce( 'wsal-download-404-log-' . $value ) ) . '" title="' . esc_html__( 'Download the log file', 'wp-security-audit-log' ) . '">' . esc_html__( 'Download the log file', 'wp-security-audit-log' ) . '</a>';
725
- } else {
726
- return 'Click <a href="' . esc_url( admin_url( 'admin.php?page=wsal-togglealerts#tab-system-activity' ) ) . '">here</a> to log such requests to file';
727
- }
728
-
729
- case '%URL%' === $name:
730
- return ' or <a href="javascript:;" data-exclude-url="' . esc_url( $value ) . '" data-exclude-url-nonce="' . wp_create_nonce( 'wsal-exclude-url-' . $value ) . '" onclick="wsal_exclude_url( this )">exclude this URL</a> from being reported.';
731
-
732
  case '%LogFileLink%' === $name: // Failed login file link.
733
  return '';
734
 
316
  * @return array
317
  */
318
  public function get_columns() {
 
 
 
 
 
 
 
 
 
319
  // Audit log columns.
320
  $cols = array(
321
  'type' => __( 'ID', 'wp-security-audit-log' ),
372
  case 'message':
373
  $cols['mesg'] = __( 'Message', 'wp-security-audit-log' );
374
  break;
375
+ default:
376
+ // fallback for any new columns would go here
377
+ break;
378
  }
379
  }
380
  }
443
  );
444
  $extra_msg = '';
445
  $data_link = '';
446
+ $modification_alerts = array( 1002, 1003 );
447
  if ( in_array( $item->alert_id, $modification_alerts, true ) ) {
448
  $extra_msg = '. Modify this alert.';
449
+ $data_link = add_query_arg( 'page', 'wsal-togglealerts#tab-users-profiles---activity', admin_url( 'admin.php' ) );
 
 
 
 
450
  }
451
 
452
  if ( ! $this->_plugin->settings()->CurrentUserCan( 'edit' ) ) {
453
  return '<span class="log-disable">' . str_pad( $item->alert_id, 4, '0', STR_PAD_LEFT ) . ' </span>';
454
  }
455
 
456
+ return '<span class="log-disable" data-disable-alert-nonce="' . wp_create_nonce( 'disable-alert-nonce' . $item->alert_id ) . '" data-tooltip="<strong>' . __( 'Disable this type of events.', 'wp-security-audit-log' ) . '</strong><br>' . $item->alert_id . ' - ' . esc_html( $code->desc ) . $extra_msg . '" data-alert-id="' . $item->alert_id . '" ' . esc_attr( 'data-link=' . $data_link ) . ' >'
457
  . str_pad( $item->alert_id, 4, '0', STR_PAD_LEFT ) . ' </span>';
458
  case 'code':
459
  $code = $this->_plugin->alerts->GetAlert( $item->alert_id );
552
  $scip = str_replace( array( '"', '[', ']' ), '', $scip );
553
  }
554
 
555
+ $oips = array();
556
 
557
  // If there's no IP...
558
  if ( is_null( $scip ) || '' == $scip ) {
665
 
666
  case '%MetaLink%' == $name:
667
  if ( ! empty( $value ) ) {
668
+ return "<a href=\"#\" data-disable-custom-nonce='" . wp_create_nonce( 'disable-custom-nonce' . $value ) . "' onclick=\"return WsalDisableCustom(this, '" . $value . "');\"> Exclude Custom Field from the Monitoring</a>";
669
  } else {
670
  return '';
671
  }
708
  return '<i>unknown</i>';
709
  }
710
 
 
 
 
 
 
 
 
 
 
 
 
711
  case '%LogFileLink%' === $name: // Failed login file link.
712
  return '';
713
 
classes/Connector/ConnectorInterface.php CHANGED
@@ -50,8 +50,20 @@ interface WSAL_Connector_ConnectorInterface {
50
 
51
  /**
52
  * Install all.
 
 
 
 
 
 
 
 
 
 
 
 
53
  */
54
- public function installAll();
55
 
56
  /**
57
  * Uninstall all.
50
 
51
  /**
52
  * Install all.
53
+ *
54
+ * @param bool $is_external_database
55
+ */
56
+ public function installAll( $is_external_database = false );
57
+
58
+ /**
59
+ * Install single.
60
+ *
61
+ * @param $class_name
62
+ * @param bool $is_external_database
63
+ *
64
+ * @since 4.1.4.1
65
  */
66
+ public function installSingle( $class_name, $is_external_database = false );
67
 
68
  /**
69
  * Uninstall all.
classes/Connector/MySQLDB.php CHANGED
@@ -120,8 +120,7 @@ class WSAL_Connector_MySQLDB extends WSAL_Connector_AbstractConnector implements
120
  */
121
  public function closeConnection() {
122
  $current_wpdb = $this->getConnection();
123
- $result = $current_wpdb->close();
124
- return $result;
125
  }
126
 
127
  /**
@@ -167,37 +166,45 @@ class WSAL_Connector_MySQLDB extends WSAL_Connector_AbstractConnector implements
167
  return $table === $wpdb->get_var( "SHOW TABLES LIKE '" . $table . "'" );
168
  }
169
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
  /**
171
  * Install all DB tables.
172
  *
173
  * @param bool $is_external_database If true, some tables will not be created.
174
  */
175
  public function installAll( $is_external_database = false ) {
176
- $plugin = WpSecurityAuditLog::GetInstance();
177
  $adapter_list = glob( $this->getAdaptersDirectory() . DIRECTORY_SEPARATOR . '*.php' );
178
- $adapter_list = apply_filters( 'wsal_install_apapters_list', $adapter_list );
179
  foreach ( $adapter_list as $file ) {
180
  $file_path = explode( DIRECTORY_SEPARATOR, $file );
181
  $file_name = $file_path[ count( $file_path ) - 1 ];
182
  $class_name = $this->getAdapterClassName( str_replace( 'Adapter.php', '', $file_name ) );
183
-
184
- if ( class_exists( $class_name ) ) {
185
- $class = new $class_name( $this->getConnection() );
186
- }
187
-
188
- if ( $is_external_database && $class instanceof WSAL_Adapters_MySQL_Session ) {
189
- // sessions table should only ever exist only in local database
190
- continue;
191
- }
192
-
193
- if ( ! $is_external_database && $class instanceof WSAL_Adapters_MySQL_TmpUser ) {
194
- // exclude the tmp_users table for local database
195
- continue;
196
- }
197
-
198
- if ( is_subclass_of( $class, 'WSAL_Adapters_MySQL_ActiveRecord' ) ) {
199
- $class->Install();
200
- }
201
  }
202
  }
203
 
@@ -205,8 +212,6 @@ class WSAL_Connector_MySQLDB extends WSAL_Connector_AbstractConnector implements
205
  * Uninstall all DB tables.
206
  */
207
  public function uninstallAll() {
208
- $plugin = WpSecurityAuditLog::GetInstance();
209
-
210
  foreach ( glob( $this->getAdaptersDirectory() . DIRECTORY_SEPARATOR . '*.php' ) as $file ) {
211
  $file_path = explode( DIRECTORY_SEPARATOR, $file );
212
  $file_name = $file_path[ count( $file_path ) - 1 ];
@@ -236,6 +241,8 @@ class WSAL_Connector_MySQLDB extends WSAL_Connector_AbstractConnector implements
236
  *
237
  * @param integer $index - Index.
238
  * @param integer $limit - Limit.
 
 
239
  */
240
  public function MigrateMeta( $index, $limit ) {
241
  $result = null;
@@ -262,7 +269,12 @@ class WSAL_Connector_MySQLDB extends WSAL_Connector_AbstractConnector implements
262
  $sql = 'INSERT INTO ' . $meta_new->GetTable() . ' (occurrence_id, name, value) VALUES ';
263
  foreach ( $metadata as $entry ) {
264
  $occurrence_id = intval( $entry['occurrence_id'] ) + $increase_occurrence_id;
265
- $sql .= '(' . $occurrence_id . ', \'' . $entry['name'] . '\', \'' . str_replace( array( "'", "\'" ), "\'", $entry['value'] ) . '\'), ';
 
 
 
 
 
266
  }
267
  $sql = rtrim( $sql, ', ' );
268
  $_wpdb->query( $sql );
@@ -281,6 +293,8 @@ class WSAL_Connector_MySQLDB extends WSAL_Connector_AbstractConnector implements
281
  *
282
  * @param integer $index - Index.
283
  * @param integer $limit - Limit.
 
 
284
  */
285
  public function MigrateOccurrence( $index, $limit ) {
286
  $result = null;
@@ -305,7 +319,13 @@ class WSAL_Connector_MySQLDB extends WSAL_Connector_AbstractConnector implements
305
  $index++;
306
  $sql = 'INSERT INTO ' . $occurrence_new->GetTable() . ' (site_id, alert_id, created_on, is_read) VALUES ';
307
  foreach ( $occurrences as $entry ) {
308
- $sql .= '(' . $entry['site_id'] . ', ' . $entry['alert_id'] . ', ' . $entry['created_on'] . ', ' . $entry['is_read'] . '), ';
 
 
 
 
 
 
309
  }
310
  $sql = rtrim( $sql, ', ' );
311
  $_wpdb->query( $sql );
@@ -350,7 +370,14 @@ class WSAL_Connector_MySQLDB extends WSAL_Connector_AbstractConnector implements
350
  $index++;
351
  $sql = 'INSERT INTO ' . $occurrence_wp->GetWPTable() . ' (id, site_id, alert_id, created_on, is_read) VALUES ';
352
  foreach ( $occurrences as $entry ) {
353
- $sql .= '(' . $entry['id'] . ', ' . $entry['site_id'] . ', ' . $entry['alert_id'] . ', ' . $entry['created_on'] . ', ' . $entry['is_read'] . '), ';
 
 
 
 
 
 
 
354
  }
355
  $sql = rtrim( $sql, ', ' );
356
  $wpdb->query( $sql );
@@ -368,6 +395,8 @@ class WSAL_Connector_MySQLDB extends WSAL_Connector_AbstractConnector implements
368
  *
369
  * @param integer $index - Index.
370
  * @param integer $limit - Limit.
 
 
371
  */
372
  public function MigrateBackMeta( $index, $limit ) {
373
  $result = null;
@@ -391,7 +420,12 @@ class WSAL_Connector_MySQLDB extends WSAL_Connector_AbstractConnector implements
391
  $index++;
392
  $sql = 'INSERT INTO ' . $meta_wp->GetWPTable() . ' (occurrence_id, name, value) VALUES ';
393
  foreach ( $metadata as $entry ) {
394
- $sql .= '(' . $entry['occurrence_id'] . ', \'' . $entry['name'] . '\', \'' . str_replace( array( "'", "\'" ), "\'", $entry['value'] ) . '\'), ';
 
 
 
 
 
395
  }
396
  $sql = rtrim( $sql, ', ' );
397
  $wpdb->query( $sql );
@@ -495,6 +529,8 @@ class WSAL_Connector_MySQLDB extends WSAL_Connector_AbstractConnector implements
495
  * Read from current DB and copy into Mirroring DB.
496
  *
497
  * @param array $args - Archive Database and limit by date.
 
 
498
  */
499
  public function MirroringAlertsToDB( $args ) {
500
  $last_event = null;
@@ -524,7 +560,14 @@ class WSAL_Connector_MySQLDB extends WSAL_Connector_AbstractConnector implements
524
  $sql = 'INSERT INTO ' . $occurrence_new->GetTable() . ' (id, site_id, alert_id, created_on, is_read) VALUES ';
525
 
526
  foreach ( $occurrences as $entry ) {
527
- $sql .= '(' . $entry['id'] . ', ' . $entry['site_id'] . ', ' . $entry['alert_id'] . ', ' . $entry['created_on'] . ', ' . $entry['is_read'] . '), ';
 
 
 
 
 
 
 
528
 
529
  // Save the first id.
530
  if ( is_null( $first_occurrence_id ) ) {
@@ -554,7 +597,12 @@ class WSAL_Connector_MySQLDB extends WSAL_Connector_AbstractConnector implements
554
  $sql = 'INSERT INTO ' . $meta_new->GetTable() . ' (occurrence_id, name, value) VALUES ';
555
 
556
  foreach ( $metadata as $entry ) {
557
- $sql .= '(' . $entry['occurrence_id'] . ', \'' . $entry['name'] . '\', \'' . str_replace( array( "'", "\'" ), "\'", $entry['value'] ) . '\'), ';
 
 
 
 
 
558
  }
559
 
560
  $sql = rtrim( $sql, ', ' );
@@ -570,9 +618,12 @@ class WSAL_Connector_MySQLDB extends WSAL_Connector_AbstractConnector implements
570
  * Read from current DB and copy into Archive DB.
571
  *
572
  * @param array $args - Archive Database and limit by count OR by date.
 
 
573
  */
574
  public function ArchiveOccurrence( $args ) {
575
  $_wpdb = $this->getConnection();
 
576
  $archive_db = $args['archive_db'];
577
 
578
  // Load data Occurrences from WP.
@@ -603,14 +654,21 @@ class WSAL_Connector_MySQLDB extends WSAL_Connector_AbstractConnector implements
603
  if ( ! empty( $occurrences ) ) {
604
  $last = end( $occurrences );
605
  $args['last_created_on'] = $last['created_on'];
606
- $args['occurence_ids'] = array();
607
 
608
  $occurrence_new = new WSAL_Adapters_MySQL_Occurrence( $archive_db );
609
 
610
  $sql = 'INSERT INTO ' . $occurrence_new->GetTable() . ' (id, site_id, alert_id, created_on, is_read) VALUES ';
611
  foreach ( $occurrences as $entry ) {
612
- $sql .= '(' . $entry['id'] . ', ' . $entry['site_id'] . ', ' . $entry['alert_id'] . ', ' . $entry['created_on'] . ', ' . $entry['is_read'] . '), ';
613
- $args['occurence_ids'][] = $entry['id'];
 
 
 
 
 
 
 
614
  }
615
  $sql = rtrim( $sql, ', ' );
616
  $archive_db->query( $sql );
@@ -625,9 +683,12 @@ class WSAL_Connector_MySQLDB extends WSAL_Connector_AbstractConnector implements
625
  * Read from current DB and copy into Archive DB.
626
  *
627
  * @param array $args - Archive Database and occurrences IDs.
 
 
628
  */
629
  public function ArchiveMeta( $args ) {
630
  $_wpdb = $this->getConnection();
 
631
  $archive_db = $args['archive_db'];
632
 
633
  // Load data Meta from WP.
@@ -635,8 +696,8 @@ class WSAL_Connector_MySQLDB extends WSAL_Connector_AbstractConnector implements
635
  if ( ! $meta->IsInstalled() ) {
636
  return null;
637
  }
638
- $s_occurence_ids = implode( ', ', $args['occurence_ids'] );
639
- $sql = 'SELECT * FROM ' . $meta->GetTable() . ' WHERE occurrence_id IN (' . $s_occurence_ids . ')';
640
  $metadata = $_wpdb->get_results( $sql, ARRAY_A );
641
 
642
  // Insert data to Archive DB.
@@ -645,7 +706,12 @@ class WSAL_Connector_MySQLDB extends WSAL_Connector_AbstractConnector implements
645
 
646
  $sql = 'INSERT INTO ' . $meta_new->GetTable() . ' (occurrence_id, name, value) VALUES ';
647
  foreach ( $metadata as $entry ) {
648
- $sql .= '(' . $entry['occurrence_id'] . ', \'' . $entry['name'] . '\', \'' . str_replace( array( "'", "\'" ), "\'", $entry['value'] ) . '\'), ';
 
 
 
 
 
649
  }
650
  $sql = rtrim( $sql, ', ' );
651
  $archive_db->query( $sql );
@@ -662,16 +728,15 @@ class WSAL_Connector_MySQLDB extends WSAL_Connector_AbstractConnector implements
662
  */
663
  public function DeleteAfterArchive( $args ) {
664
  $_wpdb = $this->getConnection();
665
- $archive_db = $args['archive_db'];
666
 
667
- $s_occurence_ids = implode( ', ', $args['occurence_ids'] );
668
 
669
  $occurrence = new WSAL_Adapters_MySQL_Occurrence( $_wpdb );
670
- $sql = 'DELETE FROM ' . $occurrence->GetTable() . ' WHERE id IN (' . $s_occurence_ids . ')';
671
  $_wpdb->query( $sql );
672
 
673
  $meta = new WSAL_Adapters_MySQL_Meta( $_wpdb );
674
- $sql = 'DELETE FROM ' . $meta->GetTable() . ' WHERE occurrence_id IN (' . $s_occurence_ids . ')';
675
  $_wpdb->query( $sql );
676
  }
677
 
120
  */
121
  public function closeConnection() {
122
  $current_wpdb = $this->getConnection();
123
+ return $current_wpdb->close();
 
124
  }
125
 
126
  /**
166
  return $table === $wpdb->get_var( "SHOW TABLES LIKE '" . $table . "'" );
167
  }
168
 
169
+ /**
170
+ * Installs single database table based on its adapter class name.
171
+ *
172
+ * @param string $class_name
173
+ * @param bool $is_external_database
174
+ */
175
+ public function installSingle( $class_name, $is_external_database = false ) {
176
+ if ( class_exists( $class_name ) ) {
177
+ $class = new $class_name( $this->getConnection() );
178
+ }
179
+
180
+ if ( $is_external_database && $class instanceof WSAL_Adapters_MySQL_Session ) {
181
+ // sessions table should only ever exist only in local database
182
+ return;
183
+ }
184
+
185
+ if ( ! $is_external_database && $class instanceof WSAL_Adapters_MySQL_TmpUser ) {
186
+ // exclude the tmp_users table for local database
187
+ return;
188
+ }
189
+
190
+ if ( is_subclass_of( $class, 'WSAL_Adapters_MySQL_ActiveRecord' ) ) {
191
+ $class->Install();
192
+ }
193
+ }
194
+
195
  /**
196
  * Install all DB tables.
197
  *
198
  * @param bool $is_external_database If true, some tables will not be created.
199
  */
200
  public function installAll( $is_external_database = false ) {
 
201
  $adapter_list = glob( $this->getAdaptersDirectory() . DIRECTORY_SEPARATOR . '*.php' );
202
+ $adapter_list = apply_filters( 'wsal_install_adapters_list', $adapter_list );
203
  foreach ( $adapter_list as $file ) {
204
  $file_path = explode( DIRECTORY_SEPARATOR, $file );
205
  $file_name = $file_path[ count( $file_path ) - 1 ];
206
  $class_name = $this->getAdapterClassName( str_replace( 'Adapter.php', '', $file_name ) );
207
+ $this->installSingle( $class_name, $is_external_database );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
208
  }
209
  }
210
 
212
  * Uninstall all DB tables.
213
  */
214
  public function uninstallAll() {
 
 
215
  foreach ( glob( $this->getAdaptersDirectory() . DIRECTORY_SEPARATOR . '*.php' ) as $file ) {
216
  $file_path = explode( DIRECTORY_SEPARATOR, $file );
217
  $file_name = $file_path[ count( $file_path ) - 1 ];
241
  *
242
  * @param integer $index - Index.
243
  * @param integer $limit - Limit.
244
+ *
245
+ * @return array
246
  */
247
  public function MigrateMeta( $index, $limit ) {
248
  $result = null;
269
  $sql = 'INSERT INTO ' . $meta_new->GetTable() . ' (occurrence_id, name, value) VALUES ';
270
  foreach ( $metadata as $entry ) {
271
  $occurrence_id = intval( $entry['occurrence_id'] ) + $increase_occurrence_id;
272
+ $sql .= $_wpdb->prepare(
273
+ '( %d, %s, %s ), ',
274
+ $occurrence_id,
275
+ $entry['name'],
276
+ $entry['value']
277
+ );
278
  }
279
  $sql = rtrim( $sql, ', ' );
280
  $_wpdb->query( $sql );
293
  *
294
  * @param integer $index - Index.
295
  * @param integer $limit - Limit.
296
+ *
297
+ * @return array
298
  */
299
  public function MigrateOccurrence( $index, $limit ) {
300
  $result = null;
319
  $index++;
320
  $sql = 'INSERT INTO ' . $occurrence_new->GetTable() . ' (site_id, alert_id, created_on, is_read) VALUES ';
321
  foreach ( $occurrences as $entry ) {
322
+ $sql .= $_wpdb->prepare(
323
+ '( %d, %d, %d, %d ), ',
324
+ intval( $entry['site_id'] ),
325
+ intval( $entry['alert_id'] ),
326
+ $entry['created_on'],
327
+ $entry['is_read']
328
+ );
329
  }
330
  $sql = rtrim( $sql, ', ' );
331
  $_wpdb->query( $sql );
370
  $index++;
371
  $sql = 'INSERT INTO ' . $occurrence_wp->GetWPTable() . ' (id, site_id, alert_id, created_on, is_read) VALUES ';
372
  foreach ( $occurrences as $entry ) {
373
+ $sql .= $wpdb->prepare(
374
+ '( %d, %d, %d, %d, %d ), ',
375
+ intval( $entry['id'] ),
376
+ intval( $entry['site_id'] ),
377
+ intval( $entry['alert_id'] ),
378
+ $entry['created_on'],
379
+ $entry['is_read']
380
+ );
381
  }
382
  $sql = rtrim( $sql, ', ' );
383
  $wpdb->query( $sql );
395
  *
396
  * @param integer $index - Index.
397
  * @param integer $limit - Limit.
398
+ *
399
+ * @return array
400
  */
401
  public function MigrateBackMeta( $index, $limit ) {
402
  $result = null;
420
  $index++;
421
  $sql = 'INSERT INTO ' . $meta_wp->GetWPTable() . ' (occurrence_id, name, value) VALUES ';
422
  foreach ( $metadata as $entry ) {
423
+ $sql .= $wpdb->prepare(
424
+ '( %d, %s, %s ), ',
425
+ intval( $entry['occurrence_id'] ),
426
+ $entry['name'],
427
+ $entry['value']
428
+ );
429
  }
430
  $sql = rtrim( $sql, ', ' );
431
  $wpdb->query( $sql );
529
  * Read from current DB and copy into Mirroring DB.
530
  *
531
  * @param array $args - Archive Database and limit by date.
532
+ *
533
+ * @return mixed|null
534
  */
535
  public function MirroringAlertsToDB( $args ) {
536
  $last_event = null;
560
  $sql = 'INSERT INTO ' . $occurrence_new->GetTable() . ' (id, site_id, alert_id, created_on, is_read) VALUES ';
561
 
562
  foreach ( $occurrences as $entry ) {
563
+ $sql .= $mirroring_db->prepare(
564
+ '( %d, %d, %d, %d, %d ), ',
565
+ intval( $entry['id'] ),
566
+ intval( $entry['site_id'] ),
567
+ intval( $entry['alert_id'] ),
568
+ $entry['created_on'],
569
+ $entry['is_read']
570
+ );
571
 
572
  // Save the first id.
573
  if ( is_null( $first_occurrence_id ) ) {
597
  $sql = 'INSERT INTO ' . $meta_new->GetTable() . ' (occurrence_id, name, value) VALUES ';
598
 
599
  foreach ( $metadata as $entry ) {
600
+ $sql .= $mirroring_db->prepare(
601
+ '( %d, %s, %s ), ',
602
+ intval( $entry['occurrence_id'] ),
603
+ $entry['name'],
604
+ $entry['value']
605
+ );
606
  }
607
 
608
  $sql = rtrim( $sql, ', ' );
618
  * Read from current DB and copy into Archive DB.
619
  *
620
  * @param array $args - Archive Database and limit by count OR by date.
621
+ *
622
+ * @return array|false|null
623
  */
624
  public function ArchiveOccurrence( $args ) {
625
  $_wpdb = $this->getConnection();
626
+ /** @var wpdbCustom $archive_db */
627
  $archive_db = $args['archive_db'];
628
 
629
  // Load data Occurrences from WP.
654
  if ( ! empty( $occurrences ) ) {
655
  $last = end( $occurrences );
656
  $args['last_created_on'] = $last['created_on'];
657
+ $args['occurrence_ids'] = array();
658
 
659
  $occurrence_new = new WSAL_Adapters_MySQL_Occurrence( $archive_db );
660
 
661
  $sql = 'INSERT INTO ' . $occurrence_new->GetTable() . ' (id, site_id, alert_id, created_on, is_read) VALUES ';
662
  foreach ( $occurrences as $entry ) {
663
+ $sql .= $archive_db->prepare(
664
+ '( %d, %d, %d, %d, %d ), ',
665
+ intval( $entry['id'] ),
666
+ intval( $entry['site_id'] ),
667
+ intval( $entry['alert_id'] ),
668
+ $entry['created_on'],
669
+ $entry['is_read']
670
+ );
671
+ $args['occurrence_ids'][] = $entry['id'];
672
  }
673
  $sql = rtrim( $sql, ', ' );
674
  $archive_db->query( $sql );
683
  * Read from current DB and copy into Archive DB.
684
  *
685
  * @param array $args - Archive Database and occurrences IDs.
686
+ *
687
+ * @return array|false|null
688
  */
689
  public function ArchiveMeta( $args ) {
690
  $_wpdb = $this->getConnection();
691
+ /** @var wpdbCustom $archive_db */
692
  $archive_db = $args['archive_db'];
693
 
694
  // Load data Meta from WP.
696
  if ( ! $meta->IsInstalled() ) {
697
  return null;
698
  }
699
+ $s_occurrence_ids = implode( ', ', $args['occurrence_ids'] );
700
+ $sql = 'SELECT * FROM ' . $meta->GetTable() . ' WHERE occurrence_id IN (' . $s_occurrence_ids . ')';
701
  $metadata = $_wpdb->get_results( $sql, ARRAY_A );
702
 
703
  // Insert data to Archive DB.
706
 
707
  $sql = 'INSERT INTO ' . $meta_new->GetTable() . ' (occurrence_id, name, value) VALUES ';
708
  foreach ( $metadata as $entry ) {
709
+ $sql .= $archive_db->prepare(
710
+ '( %d, %s, %s ), ',
711
+ intval( $entry['occurrence_id'] ),
712
+ $entry['name'],
713
+ $entry['value']
714
+ );
715
  }
716
  $sql = rtrim( $sql, ', ' );
717
  $archive_db->query( $sql );
728
  */
729
  public function DeleteAfterArchive( $args ) {
730
  $_wpdb = $this->getConnection();
 
731
 
732
+ $s_occurrence_ids = implode( ', ', $args['occurrence_ids'] );
733
 
734
  $occurrence = new WSAL_Adapters_MySQL_Occurrence( $_wpdb );
735
+ $sql = 'DELETE FROM ' . $occurrence->GetTable() . ' WHERE id IN (' . $s_occurrence_ids . ')';
736
  $_wpdb->query( $sql );
737
 
738
  $meta = new WSAL_Adapters_MySQL_Meta( $_wpdb );
739
+ $sql = 'DELETE FROM ' . $meta->GetTable() . ' WHERE occurrence_id IN (' . $s_occurrence_ids . ')';
740
  $_wpdb->query( $sql );
741
  }
742
 
classes/Connector/wp-db-custom.php CHANGED
@@ -108,14 +108,7 @@ class wpdbCustom extends wpdb {
108
  */
109
  public function db_connect( $allow_bail = true ) {
110
  $this->is_mysql = true;
111
-
112
- /*
113
- * Deprecated in 3.9+ when using MySQLi. No equivalent
114
- * $new_link parameter exists for mysqli_* functions.
115
- */
116
- $new_link = defined( 'MYSQL_NEW_LINK' ) ? MYSQL_NEW_LINK : true;
117
  $client_flags = defined( 'MYSQL_CLIENT_FLAGS' ) ? MYSQL_CLIENT_FLAGS : 0;
118
-
119
  if ( $this->use_mysqli ) {
120
  $this->dbh = mysqli_init();
121
 
@@ -185,11 +178,9 @@ class wpdbCustom extends wpdb {
185
  */
186
  $attempt_fallback = true;
187
 
188
- if ( $this->has_connected ) {
189
- $attempt_fallback = false;
190
- } elseif ( defined( 'WP_USE_EXT_MYSQL' ) && ! WP_USE_EXT_MYSQL ) {
191
- $attempt_fallback = false;
192
- } elseif ( ! function_exists( 'mysql_connect' ) ) {
193
  $attempt_fallback = false;
194
  }
195
 
108
  */
109
  public function db_connect( $allow_bail = true ) {
110
  $this->is_mysql = true;
 
 
 
 
 
 
111
  $client_flags = defined( 'MYSQL_CLIENT_FLAGS' ) ? MYSQL_CLIENT_FLAGS : 0;
 
112
  if ( $this->use_mysqli ) {
113
  $this->dbh = mysqli_init();
114
 
178
  */
179
  $attempt_fallback = true;
180
 
181
+ if ( $this->has_connected
182
+ || ( defined( 'WP_USE_EXT_MYSQL' ) && ! WP_USE_EXT_MYSQL )
183
+ || ( ! function_exists( 'mysql_connect' ) ) ) {
 
 
184
  $attempt_fallback = false;
185
  }
186
 
classes/ConstantManager.php CHANGED
@@ -126,7 +126,7 @@ class WSAL_ConstantManager {
126
  }
127
 
128
  // If we got matches then get the last one in the array,
129
- if ( count( $possible_matches ) >= 1 ) {
130
  return end( $possible_matches );
131
  }
132
  }
126
  }
127
 
128
  // If we got matches then get the last one in the array,
129
+ if ( ! empty( $possible_matches ) ) {
130
  return end( $possible_matches );
131
  }
132
  }
classes/Loggers/Database.php CHANGED
@@ -98,16 +98,6 @@ class WSAL_Loggers_Database extends WSAL_AbstractLogger {
98
  $this->store_events_in_buffer( $occ, $data );
99
  }
100
 
101
- /**
102
- * Inject for promoting the paid add-ons.
103
- *
104
- * @deprecated 3.2.4
105
- */
106
- // $type = (int) $type;
107
- // if ( 9999 !== $type ) {
108
- // $this->AlertInject( $occ );
109
- // }
110
-
111
  /**
112
  * Fires immediately after an alert is logged.
113
  *
@@ -209,44 +199,6 @@ class WSAL_Loggers_Database extends WSAL_AbstractLogger {
209
  do_action( 'wsal_prune', $deleted_count, vsprintf( $result['sql'], $result['args'] ) );
210
  }
211
 
212
- /**
213
- * Inject Promo alert every $count alerts if no Add-ons are activated.
214
- *
215
- * @param WSAL_Models_Occurrence $occurrence - Occurrence, instance of WSAL_Models_Occurrence.
216
- *
217
- * @deprecated 3.2.4
218
- */
219
- private function AlertInject( $occurrence ) {
220
- $count = $this->CheckPromoToShow();
221
- if ( $count && $occurrence->getId() != 0 ) {
222
- if ( ( $occurrence->getId() % $count ) == 0 ) {
223
- $promo_to_send = $this->GetPromoAlert();
224
- if ( ! empty( $promo_to_send ) ) {
225
- $upgrade_link = add_query_arg( 'page', 'wsal-auditlog-pricing', admin_url( 'admin.php' ) );
226
- $more_info_link = add_query_arg(
227
- array(
228
- 'utm_source' => 'plugin',
229
- 'utm_medium' => 'referral',
230
- 'utm_campaign' => 'WSAL',
231
- 'utm_content' => 'db+integrations',
232
- ),
233
- 'https://wpactivitylog.com/features/'
234
- );
235
- $upgrade = '<a href="' . $upgrade_link . '">' . __( 'Upgrade to Premium', 'wp-security-audit-log' ) . '</a>';
236
- $more_info = '<a href="' . $more_info_link . '" target="_blank">' . __( 'More Information', 'wp-security-audit-log' ) . '</a>';
237
- $this->Log(
238
- 9999, array(
239
- 'ClientIP' => '127.0.0.1',
240
- 'Username' => 'Plugin',
241
- 'PromoMessage' => sprintf( $promo_to_send['message'], $upgrade, $more_info ),
242
- 'PromoName' => $promo_to_send['name'],
243
- )
244
- );
245
- }
246
- }
247
- }
248
- }
249
-
250
  /**
251
  * Get the promo id, to send each time a different promo,
252
  * keeping the last id saved in the DB.
98
  $this->store_events_in_buffer( $occ, $data );
99
  }
100
 
 
 
 
 
 
 
 
 
 
 
101
  /**
102
  * Fires immediately after an alert is logged.
103
  *
199
  do_action( 'wsal_prune', $deleted_count, vsprintf( $result['sql'], $result['args'] ) );
200
  }
201
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  /**
203
  * Get the promo id, to send each time a different promo,
204
  * keeping the last id saved in the DB.
classes/Models/Meta.php CHANGED
@@ -76,13 +76,14 @@ class WSAL_Models_Meta extends WSAL_Models_ActiveRecord {
76
  /**
77
  * Update Metadata by name and occurrence_id.
78
  *
79
- * @see WSAL_Adapters_MySQL_Meta::LoadByNameAndOccurenceId()
80
  * @param string $name - Meta name.
81
- * @param mixed $value - Meta value.
82
  * @param integer $occurrence_id - Occurrence_id.
 
 
83
  */
84
  public function UpdateByNameAndOccurenceId( $name, $value, $occurrence_id ) {
85
- $meta = $this->getAdapter()->LoadByNameAndOccurenceId( $name, $occurrence_id );
86
  if ( ! empty( $meta ) ) {
87
  $this->id = $meta['id'];
88
  $this->occurrence_id = $meta['occurrence_id'];
76
  /**
77
  * Update Metadata by name and occurrence_id.
78
  *
 
79
  * @param string $name - Meta name.
80
+ * @param mixed $value - Meta value.
81
  * @param integer $occurrence_id - Occurrence_id.
82
+ *
83
+ *@see WSAL_Adapters_MySQL_Meta::LoadByNameAndOccurrenceId()
84
  */
85
  public function UpdateByNameAndOccurenceId( $name, $value, $occurrence_id ) {
86
+ $meta = $this->getAdapter()->LoadByNameAndOccurrenceId( $name, $occurrence_id );
87
  if ( ! empty( $meta ) ) {
88
  $this->id = $meta['id'];
89
  $this->occurrence_id = $meta['occurrence_id'];
classes/Models/Occurrence.php CHANGED
@@ -207,7 +207,6 @@ class WSAL_Models_Occurrence extends WSAL_Models_ActiveRecord {
207
 
208
  $installer_nonce = wp_create_nonce( 'wsal-install-addon' );
209
  foreach ( $addon_event_codes as $key => $addon ) {
210
- $f1 = in_array( $this->alert_id, $addon['event_ids'], true );
211
  if ( in_array( $this->alert_id, $addon['event_ids'], true ) ) {
212
  // check key and update message here.
213
  $message = sprintf(
@@ -223,8 +222,8 @@ class WSAL_Models_Occurrence extends WSAL_Models_ActiveRecord {
223
  }
224
  $this->_cachedmessage = isset( $cached_message ) ? $cached_message : sprintf(
225
  /* Translators: 1: html that opens a link, 2: html that closes a link. */
226
- __( 'Alert message was not available, this may have been a custom alert that no longer exists. Read more about custom events %1$shere%2$s.', 'wp-security-audit-log' ),
227
- '<a href="https://wpactivitylog.com/support/kb/create-custom-events-wordpress-activity-log/" target="_blank">',
228
  '</a>'
229
  );
230
  }
@@ -275,6 +274,9 @@ class WSAL_Models_Occurrence extends WSAL_Models_ActiveRecord {
275
  case 'CurrentUserID' === $meta->name:
276
  $data = get_userdata( $meta->value );
277
  return $data ? $data->user_login : null;
 
 
 
278
  }
279
  }
280
  } else {
@@ -380,15 +382,4 @@ class WSAL_Models_Occurrence extends WSAL_Models_ActiveRecord {
380
  public function GetByPostID( $post_id ) {
381
  return $this->getAdapter()->GetByPostID( $post_id );
382
  }
383
-
384
- /**
385
- * Gets occurrences of the same type by IP within specified time frame.
386
- *
387
- * @see WSAL_Adapters_MySQL_Occurrence::CheckAlert404()
388
- * @param array $args - Query args.
389
- * @return WSAL_Models_Occurrence[]
390
- */
391
- public function CheckAlert404( $args = array() ) {
392
- return $this->getAdapter()->CheckAlert404( $args );
393
- }
394
  }
207
 
208
  $installer_nonce = wp_create_nonce( 'wsal-install-addon' );
209
  foreach ( $addon_event_codes as $key => $addon ) {
 
210
  if ( in_array( $this->alert_id, $addon['event_ids'], true ) ) {
211
  // check key and update message here.
212
  $message = sprintf(
222
  }
223
  $this->_cachedmessage = isset( $cached_message ) ? $cached_message : sprintf(
224
  /* Translators: 1: html that opens a link, 2: html that closes a link. */
225
+ __( 'This type of activity / change is no longer monitored. You can create your own custom event IDs to keep a log of such change. Read more about custom events %1$shere%2$s.', 'wp-security-audit-log' ),
226
+ '<a href="https://wpactivitylog.com/support/kb/create-custom-events-wordpress-activity-log/" rel="noopener noreferrer" target="_blank">',
227
  '</a>'
228
  );
229
  }
274
  case 'CurrentUserID' === $meta->name:
275
  $data = get_userdata( $meta->value );
276
  return $data ? $data->user_login : null;
277
+ default:
278
+ // fallback for any other cases would go here
279
+ break;
280
  }
281
  }
282
  } else {
382
  public function GetByPostID( $post_id ) {
383
  return $this->getAdapter()->GetByPostID( $post_id );
384
  }
 
 
 
 
 
 
 
 
 
 
 
385
  }
classes/Multisite/NetworkWide/CPTsTracker.php CHANGED
@@ -133,8 +133,7 @@ final class CPTsTracker extends AbstractTracker {
133
  // if the network doesn't have data for this site or the data it
134
  // has is differs then perform the update.
135
  $network_wide_list = array();
136
- foreach ( $network_data['site'] as $site => $list ) {
137
- $items_list = array();
138
  // loop through each item in a site and add uniques to a list.
139
  foreach ( $list as $item ) {
140
  if ( ! in_array( $item, $network_wide_list, true ) ) {
133
  // if the network doesn't have data for this site or the data it
134
  // has is differs then perform the update.
135
  $network_wide_list = array();
136
+ foreach ( $network_data['site'] as $list ) {
 
137
  // loop through each item in a site and add uniques to a list.
138
  foreach ( $list as $item ) {
139
  if ( ! in_array( $item, $network_wide_list, true ) ) {
classes/Nicer.php CHANGED
@@ -238,6 +238,9 @@ class WSAL_Nicer {
238
  case 'object':
239
  $d .= ', ' . get_class( $val ) . ', ' . count( get_object_vars( $val ) ) . ' properties';
240
  break;
 
 
 
241
  }
242
 
243
  $cls = $this->css_class;
238
  case 'object':
239
  $d .= ', ' . get_class( $val ) . ', ' . count( get_object_vars( $val ) ) . ' properties';
240
  break;
241
+ default:
242
+ // fallback for any other types would go here
243
+ break;
244
  }
245
 
246
  $cls = $this->css_class;
classes/Ref.php CHANGED
@@ -864,13 +864,14 @@ class WSAL_Ref {
864
  }
865
 
866
 
867
-
868
  /**
869
  * Set or get configuration options
870
  *
871
- * @param string $key
872
- * @param mixed|null $value
 
873
  * @return mixed
 
874
  */
875
  public static function config( $key, $value = null ) {
876
 
@@ -1270,8 +1271,9 @@ class WSAL_Ref {
1270
  $url = sprintf( 'http://queryposts.com/function/%s', urlencode( strtolower( $reflector->getName() ) ) );
1271
  break;
1272
  }
1273
-
1274
- // @todo: handle more apps
 
1275
  }
1276
  }
1277
 
@@ -1306,13 +1308,14 @@ class WSAL_Ref {
1306
  }
1307
 
1308
 
1309
-
1310
  /**
1311
  * Evaluates the given variable
1312
  *
1313
- * @param mixed &$subject Variable to query
1314
- * @param bool $specialStr Should this be interpreted as a special string?
 
1315
  * @return mixed Result (both HTML and text modes generate strings)
 
1316
  */
1317
  protected function evaluate( &$subject, $specialStr = false ) {
1318
 
@@ -1376,6 +1379,7 @@ class WSAL_Ref {
1376
  // restoring original value
1377
  $value = $buffer;
1378
  }
 
1379
 
1380
  $this->fmt->text( 'array' );
1381
  $count = count( $subject );
@@ -1416,6 +1420,7 @@ class WSAL_Ref {
1416
  $this->fmt->endRow();
1417
  }
1418
 
 
1419
  unset( $subject[ static::MARKER_KEY ] );
1420
 
1421
  $this->fmt->endGroup();
@@ -1508,6 +1513,10 @@ class WSAL_Ref {
1508
  $meta = stream_get_meta_data( $subject );
1509
  break;
1510
 
 
 
 
 
1511
  }
1512
 
1513
  if ( ! $meta ) {
@@ -1755,6 +1764,9 @@ class WSAL_Ref {
1755
  }
1756
 
1757
  return;
 
 
 
1758
  }
1759
 
1760
  // if we reached this point, $subject must be an object
@@ -2686,7 +2698,6 @@ class RHtmlFormatter extends RFormatter {
2686
  }
2687
 
2688
  $tip = " {$this->def['tipRef']}=\"{$tipIdx}\"";
2689
- // $tip = sprintf('%s="%d"', $this->def['tipRef'], $tipIdx);
2690
  }
2691
 
2692
  // wrap text in a link?
@@ -2700,7 +2711,6 @@ class RHtmlFormatter extends RFormatter {
2700
  }
2701
 
2702
  $this->out .= "<{$this->def['base']}{$typeStr}{$tip}>{$text}</{$this->def['base']}>";
2703
- // $this->out .= sprintf('<%1$s%2$s %3$s>%4$s</%1$s>', $this->def['base'], $typeStr, $tip, $text);
2704
  }
2705
 
2706
  public function startContain( $type, $label = false ) {
@@ -2792,7 +2802,7 @@ class RHtmlFormatter extends RFormatter {
2792
  $this->out .= "<{$this->def['base']} data-mod>";
2793
 
2794
  foreach ( $items as $info ) {
2795
- $this->out .= $this->text( 'mod-' . strtolower( $info[1] ), $info[0], $info[1] );
2796
  }
2797
 
2798
  $this->out .= "</{$this->def['base']}>";
@@ -2806,7 +2816,6 @@ class RHtmlFormatter extends RFormatter {
2806
  if ( WSAL_Ref::config( 'showBacktrace' ) && ($trace = WSAL_Ref::getBacktrace()) ) {
2807
  $docRoot = isset( $_SERVER['DOCUMENT_ROOT'] ) ? $_SERVER['DOCUMENT_ROOT'] : '';
2808
  $path = strpos( $trace['file'], $docRoot ) !== 0 ? $trace['file'] : ltrim( str_replace( $docRoot, '', $trace['file'] ), '/' );
2809
- // $this->out .= "<{$this->def['base']} data-backtrace>{$path}:{$trace['line']}</{$this->def['base']}>";
2810
  }
2811
 
2812
  $this->out .= "</{$this->def['base']}><{$this->def['base']} data-output>";
@@ -3085,6 +3094,7 @@ class RTextFormatter extends RFormatter {
3085
  }
3086
 
3087
  public function endRow() {
 
3088
  }
3089
 
3090
  public function colDiv( $padLen = null ) {
864
  }
865
 
866
 
 
867
  /**
868
  * Set or get configuration options
869
  *
870
+ * @param string $key
871
+ * @param mixed|null $value
872
+ *
873
  * @return mixed
874
+ * @throws Exception
875
  */
876
  public static function config( $key, $value = null ) {
877
 
1271
  $url = sprintf( 'http://queryposts.com/function/%s', urlencode( strtolower( $reflector->getName() ) ) );
1272
  break;
1273
  }
1274
+ default:
1275
+ // fallback for any other apps would go here
1276
+ break;
1277
  }
1278
  }
1279
 
1308
  }
1309
 
1310
 
 
1311
  /**
1312
  * Evaluates the given variable
1313
  *
1314
+ * @param mixed &$subject Variable to query
1315
+ * @param bool $specialStr Should this be interpreted as a special string?
1316
+ *
1317
  * @return mixed Result (both HTML and text modes generate strings)
1318
+ * @throws ReflectionException
1319
  */
1320
  protected function evaluate( &$subject, $specialStr = false ) {
1321
 
1379
  // restoring original value
1380
  $value = $buffer;
1381
  }
1382
+ unset( $value );
1383
 
1384
  $this->fmt->text( 'array' );
1385
  $count = count( $subject );
1420
  $this->fmt->endRow();
1421
  }
1422
 
1423
+ unset( $value );
1424
  unset( $subject[ static::MARKER_KEY ] );
1425
 
1426
  $this->fmt->endGroup();
1513
  $meta = stream_get_meta_data( $subject );
1514
  break;
1515
 
1516
+ default:
1517
+ // fallback for any other resources would go here
1518
+ break;
1519
+
1520
  }
1521
 
1522
  if ( ! $meta ) {
1764
  }
1765
 
1766
  return;
1767
+ default:
1768
+ // fallback for any other types would go here
1769
+ break;
1770
  }
1771
 
1772
  // if we reached this point, $subject must be an object
2698
  }
2699
 
2700
  $tip = " {$this->def['tipRef']}=\"{$tipIdx}\"";
 
2701
  }
2702
 
2703
  // wrap text in a link?
2711
  }
2712
 
2713
  $this->out .= "<{$this->def['base']}{$typeStr}{$tip}>{$text}</{$this->def['base']}>";
 
2714
  }
2715
 
2716
  public function startContain( $type, $label = false ) {
2802
  $this->out .= "<{$this->def['base']} data-mod>";
2803
 
2804
  foreach ( $items as $info ) {
2805
+ $this->text( 'mod-' . strtolower( $info[1] ), $info[0], $info[1] );
2806
  }
2807
 
2808
  $this->out .= "</{$this->def['base']}>";
2816
  if ( WSAL_Ref::config( 'showBacktrace' ) && ($trace = WSAL_Ref::getBacktrace()) ) {
2817
  $docRoot = isset( $_SERVER['DOCUMENT_ROOT'] ) ? $_SERVER['DOCUMENT_ROOT'] : '';
2818
  $path = strpos( $trace['file'], $docRoot ) !== 0 ? $trace['file'] : ltrim( str_replace( $docRoot, '', $trace['file'] ), '/' );
 
2819
  }
2820
 
2821
  $this->out .= "</{$this->def['base']}><{$this->def['base']} data-output>";
3094
  }
3095
 
3096
  public function endRow() {
3097
+ // not needed in text formatter
3098
  }
3099
 
3100
  public function colDiv( $padLen = null ) {
classes/SensorManager.php CHANGED
@@ -39,12 +39,6 @@ final class WSAL_SensorManager extends WSAL_AbstractSensor {
39
 
40
  // Check sensors before loading for optimization.
41
  add_filter( 'wsal_before_sensor_load', array( $this, 'check_sensor_before_load' ), 10, 2 );
42
-
43
- if ( doing_action( 'wp_loaded' ) && ! is_user_logged_in() && WpSecurityAuditLog::is_frontend() && ! WpSecurityAuditLog::is_rest_api() && WpSecurityAuditLog::should_load_frontend() ) {
44
- // If WSAL loads on `wp_loaded` hook, then hook the following to see if need to load frontend 404 sensor or not.
45
- add_action( 'wp', array( $this, 'load_frontend_system_sensor' ) );
46
- }
47
-
48
  foreach ( glob( dirname( __FILE__ ) . '/Sensors/*.php' ) as $file ) {
49
  $this->AddFromFile( $file );
50
  }
@@ -202,9 +196,8 @@ final class WSAL_SensorManager extends WSAL_AbstractSensor {
202
 
203
  // Check to see if LogInOut, FrontendLogin, and FrontendRegister sensors should load on login page.
204
  if ( WpSecurityAuditLog::is_login_screen() ) {
205
- if ( 'FrontendRegister' === $filename && ! empty( $frontend_events['register'] ) ) {
206
- return true;
207
- } elseif ( 'LogInOut' === $filename ) {
208
  return true;
209
  }
210
  return false; // Any other sensor should not load here.
@@ -221,8 +214,7 @@ final class WSAL_SensorManager extends WSAL_AbstractSensor {
221
  *
222
  * @param array $public_sensors - List of sensors to be loaded for visitors.
223
  */
224
- $public_sensors = apply_filters( 'wsal_load_public_sensors', array( 'FrontendLogin', 'FrontendSystem', 'FrontendRegister' ) );
225
-
226
  if ( WpSecurityAuditLog::is_frontend() && ! is_user_logged_in() && ! in_array( $filename, $public_sensors, true ) ) {
227
  return false;
228
  }
@@ -255,13 +247,6 @@ final class WSAL_SensorManager extends WSAL_AbstractSensor {
255
  }
256
  break;
257
 
258
- case 'WooCommerce':
259
- // Check if WooCommerce plugin exists.
260
- if ( ! WpSecurityAuditLog::is_woocommerce_active() ) {
261
- $load_sensor = false;
262
- }
263
- break;
264
-
265
  case 'YoastSEO':
266
  // Check if Yoast SEO (Free or Premium) plugin exists.
267
  if ( WpSecurityAuditLog::is_wpseo_active() ) {
@@ -296,12 +281,6 @@ final class WSAL_SensorManager extends WSAL_AbstractSensor {
296
  }
297
  break;
298
 
299
- case 'FrontendWooCommerce':
300
- if ( is_user_logged_in() || ! WpSecurityAuditLog::is_woocommerce_active() || empty( $frontend_events['woocommerce'] ) ) {
301
- $load_sensor = false;
302
- }
303
- break;
304
-
305
  case 'FrontendRegister':
306
  if ( is_user_logged_in() || empty( $frontend_events['register'] ) ) {
307
  $load_sensor = false;
@@ -314,33 +293,10 @@ final class WSAL_SensorManager extends WSAL_AbstractSensor {
314
  }
315
  break;
316
 
317
- case 'FrontendSystem':
318
- if ( is_user_logged_in() || empty( $frontend_events['system'] ) ) {
319
- $load_sensor = false;
320
- } elseif ( ! is_404() ) {
321
- $load_sensor = false;
322
- }
323
- break;
324
-
325
  default:
326
  break;
327
  }
328
  }
329
  return $load_sensor;
330
  }
331
-
332
- /**
333
- * Lazy load frontend system sensor to detect 404 errors.
334
- * This is because our plugin loads a bit early on the
335
- * frontend, i.e., just before setting up wp query.
336
- */
337
- public function load_frontend_system_sensor() {
338
- $frontend_events = WSAL_Settings::get_frontend_events();
339
-
340
- if ( ! empty( $frontend_events['system'] ) && is_404() ) {
341
- $sensor = new WSAL_Sensors_FrontendSystem( $this->plugin );
342
- $this->AddInstance( $sensor );
343
- $sensor->HookEvents();
344
- }
345
- }
346
  }
39
 
40
  // Check sensors before loading for optimization.
41
  add_filter( 'wsal_before_sensor_load', array( $this, 'check_sensor_before_load' ), 10, 2 );
 
 
 
 
 
 
42
  foreach ( glob( dirname( __FILE__ ) . '/Sensors/*.php' ) as $file ) {
43
  $this->AddFromFile( $file );
44
  }
196
 
197
  // Check to see if LogInOut, FrontendLogin, and FrontendRegister sensors should load on login page.
198
  if ( WpSecurityAuditLog::is_login_screen() ) {
199
+ if ( 'FrontendRegister' === $filename && ! empty( $frontend_events['register'] )
200
+ || 'LogInOut' === $filename ) {
 
201
  return true;
202
  }
203
  return false; // Any other sensor should not load here.
214
  *
215
  * @param array $public_sensors - List of sensors to be loaded for visitors.
216
  */
217
+ $public_sensors = apply_filters( 'wsal_load_public_sensors', array( 'FrontendLogin', 'FrontendRegister' ) );
 
218
  if ( WpSecurityAuditLog::is_frontend() && ! is_user_logged_in() && ! in_array( $filename, $public_sensors, true ) ) {
219
  return false;
220
  }
247
  }
248
  break;
249
 
 
 
 
 
 
 
 
250
  case 'YoastSEO':
251
  // Check if Yoast SEO (Free or Premium) plugin exists.
252
  if ( WpSecurityAuditLog::is_wpseo_active() ) {
281
  }
282
  break;
283
 
 
 
 
 
 
 
284
  case 'FrontendRegister':
285
  if ( is_user_logged_in() || empty( $frontend_events['register'] ) ) {
286
  $load_sensor = false;
293
  }
294
  break;
295
 
 
 
 
 
 
 
 
 
296
  default:
297
  break;
298
  }
299
  }
300
  return $load_sensor;
301
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
302
  }
classes/Sensors/Comments.php CHANGED
@@ -210,19 +210,4 @@ class WSAL_Sensors_Comments extends WSAL_AbstractSensor {
210
  }
211
  }
212
  }
213
-
214
- /**
215
- * Shows the username if the comment is owned by a user
216
- * and the email if the comment was posted by a non WordPress user
217
- *
218
- * @param stdClass $comment - Comment.
219
- * @return string - Author username or email.
220
- */
221
- private function CheckAuthor( $comment ) {
222
- if ( username_exists( $comment->comment_author ) ) {
223
- return $comment->comment_author;
224
- } else {
225
- return $comment->comment_author_email;
226
- }
227
- }
228
  }
210
  }
211
  }
212
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213
  }
classes/Sensors/Content.php CHANGED
@@ -177,7 +177,9 @@ class WSAL_Sensors_Content extends WSAL_AbstractSensor {
177
  // If block editor is selected and users are not allowed to switch editors then it is Gutenberg's second request.
178
  if ( 'block' === $editor_replace && 'disallow' === $allow_users ) {
179
  return;
180
- } elseif ( 'allow' === $allow_users ) { // Else if users are allowed to switch then it is Gutenberg's second request.
 
 
181
  return;
182
  }
183
  }
@@ -229,7 +231,7 @@ class WSAL_Sensors_Content extends WSAL_AbstractSensor {
229
  }
230
 
231
  // Support for Admin Columns Pro plugin and its add-on.
232
- if ( ! isset( $_POST['_ajax_nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['_ajax_nonce'] ) ), 'ac-ajax' ) ) {
233
  return;
234
  }
235
 
@@ -1159,9 +1161,9 @@ class WSAL_Sensors_Content extends WSAL_AbstractSensor {
1159
  /**
1160
  * Categories changed.
1161
  *
1162
- * @param array $old_cats - Old categories.
1163
- * @param array $new_cats - New categories.
1164
- * @param WP_Post $post - The post.
1165
  */
1166
  protected function check_categories_change( $old_cats, $new_cats, $post ) {
1167
  $old_cats = implode( ', ', (array) $old_cats );
@@ -1181,10 +1183,36 @@ class WSAL_Sensors_Content extends WSAL_AbstractSensor {
1181
  $editor_link['name'] => $editor_link['value'],
1182
  );
1183
  $this->plugin->alerts->Trigger( 2016, $alert_data );
1184
- return 1;
1185
  }
1186
  }
1187
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1188
  /**
1189
  * Tags changed.
1190
  *
@@ -1193,61 +1221,22 @@ class WSAL_Sensors_Content extends WSAL_AbstractSensor {
1193
  * @param WP_Post $post - The post.
1194
  */
1195
  protected function check_tags_change( $old_tags, $new_tags, $post ) {
 
 
 
 
 
 
1196
  // Check for added tags.
1197
  $added_tags = array_diff( (array) $new_tags, (array) $old_tags );
 
 
 
1198
 
1199
  // Check for removed tags.
1200
  $removed_tags = array_diff( (array) $old_tags, (array) $new_tags );
1201
-
1202
- // Convert tags arrays to string.
1203
- $old_tags = implode( ', ', (array) $old_tags );
1204
- $new_tags = implode( ', ', (array) $new_tags );
1205
- $added_tags = implode( ', ', $added_tags );
1206
- $removed_tags = implode( ', ', $removed_tags );
1207
-
1208
- // Declare event variables.
1209
- $add_event = '';
1210
- $remove_event = '';
1211
- if ( $old_tags !== $new_tags && ! empty( $added_tags ) ) {
1212
- $add_event = 2119;
1213
- $editor_link = $this->get_editor_link( $post );
1214
- $post_status = ( 'publish' === $post->post_status ) ? 'published' : $post->post_status;
1215
- $this->plugin->alerts->Trigger(
1216
- $add_event,
1217
- array(
1218
- 'PostID' => $post->ID,
1219
- 'PostType' => $post->post_type,
1220
- 'PostStatus' => $post_status,
1221
- 'PostTitle' => $post->post_title,
1222
- 'PostDate' => $post->post_date,
1223
- 'PostUrl' => get_permalink( $post->ID ),
1224
- 'tag' => $added_tags ? $added_tags : 'no tags',
1225
- $editor_link['name'] => $editor_link['value'],
1226
- )
1227
- );
1228
- }
1229
-
1230
- if ( $old_tags !== $new_tags && ! empty( $removed_tags ) ) {
1231
- $remove_event = 2120;
1232
- $editor_link = $this->get_editor_link( $post );
1233
- $post_status = ( 'publish' === $post->post_status ) ? 'published' : $post->post_status;
1234
- $this->plugin->alerts->Trigger(
1235
- $remove_event,
1236
- array(
1237
- 'PostID' => $post->ID,
1238
- 'PostType' => $post->post_type,
1239
- 'PostStatus' => $post_status,
1240
- 'PostTitle' => $post->post_title,
1241
- 'PostDate' => $post->post_date,
1242
- 'PostUrl' => get_permalink( $post->ID ),
1243
- 'tag' => $removed_tags ? $removed_tags : 'no tags',
1244
- $editor_link['name'] => $editor_link['value'],
1245
- )
1246
- );
1247
- }
1248
-
1249
- if ( $add_event || $remove_event ) {
1250
- return 1;
1251
  }
1252
  }
1253
 
@@ -1414,21 +1403,13 @@ class WSAL_Sensors_Content extends WSAL_AbstractSensor {
1414
  * @return bool
1415
  */
1416
  public function must_not_contain_events( WSAL_AlertManager $manager ) {
1417
- if ( $manager->WillOrHasTriggered( 2016 ) ) {
1418
- return false;
1419
- } elseif ( $manager->WillOrHasTriggered( 2048 ) ) {
1420
- return false;
1421
- } elseif ( $manager->WillOrHasTriggered( 2049 ) ) {
1422
- return false;
1423
- } elseif ( $manager->WillOrHasTriggered( 2050 ) ) {
1424
- return false;
1425
- } elseif ( $manager->WillOrHasTriggered( 2119 ) ) {
1426
- return false;
1427
- } elseif ( $manager->WillOrHasTriggered( 2120 ) ) {
1428
- return false;
1429
- } elseif ( $manager->WillOrHasTriggered( 2016 ) ) {
1430
- return false;
1431
- } elseif ( $manager->WillOrHasTriggered( 2017 ) ) {
1432
  return false;
1433
  }
1434
  return true;
177
  // If block editor is selected and users are not allowed to switch editors then it is Gutenberg's second request.
178
  if ( 'block' === $editor_replace && 'disallow' === $allow_users ) {
179
  return;
180
+ }
181
+
182
+ if ( 'allow' === $allow_users ) { // if users are allowed to switch then it is Gutenberg's second request.
183
  return;
184
  }
185
  }
231
  }
232
 
233
  // Support for Admin Columns Pro plugin and its add-on.
234
+ if ( isset( $_POST['_ajax_nonce'] ) && ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['_ajax_nonce'] ) ), 'ac-ajax' ) ) {
235
  return;
236
  }
237
 
1161
  /**
1162
  * Categories changed.
1163
  *
1164
+ * @param array $old_cats - Old categories.
1165
+ * @param array $new_cats - New categories.
1166
+ * @param WP_Post $post - The post.
1167
  */
1168
  protected function check_categories_change( $old_cats, $new_cats, $post ) {
1169
  $old_cats = implode( ', ', (array) $old_cats );
1183
  $editor_link['name'] => $editor_link['value'],
1184
  );
1185
  $this->plugin->alerts->Trigger( 2016, $alert_data );
 
1186
  }
1187
  }
1188
 
1189
+ /**
1190
+ * Reports tags change event. This could be tags addition, removal and possibly other in the future.
1191
+ *
1192
+ * @since 4.1.5
1193
+ *
1194
+ * @param int $event_code
1195
+ * @param WP_Post $post
1196
+ * @param string[] $tags_changed
1197
+ */
1198
+ private function report_tags_change_event( $event_code, $post, $tags_changed ) {
1199
+ $editor_link = $this->get_editor_link( $post );
1200
+ $post_status = ( 'publish' === $post->post_status ) ? 'published' : $post->post_status;
1201
+ $this->plugin->alerts->Trigger(
1202
+ $event_code,
1203
+ array(
1204
+ 'PostID' => $post->ID,
1205
+ 'PostType' => $post->post_type,
1206
+ 'PostStatus' => $post_status,
1207
+ 'PostTitle' => $post->post_title,
1208
+ 'PostDate' => $post->post_date,
1209
+ 'PostUrl' => get_permalink( $post->ID ),
1210
+ 'tag' => ! empty( $tags_changed ) ? implode( ', ', $tags_changed ) : __('no tags', 'wp-security-audit-log'),
1211
+ $editor_link['name'] => $editor_link['value'],
1212
+ )
1213
+ );
1214
+ }
1215
+
1216
  /**
1217
  * Tags changed.
1218
  *
1221
  * @param WP_Post $post - The post.
1222
  */
1223
  protected function check_tags_change( $old_tags, $new_tags, $post ) {
1224
+ $intersection = array_intersect( $old_tags, $new_tags );
1225
+ if ( count( $intersection ) === count( $old_tags ) ) {
1226
+ // no change, let's leave
1227
+ return;
1228
+ }
1229
+
1230
  // Check for added tags.
1231
  $added_tags = array_diff( (array) $new_tags, (array) $old_tags );
1232
+ if ( ! empty( $added_tags ) ) {
1233
+ $this->report_tags_change_event( 2119, $post, $added_tags );
1234
+ }
1235
 
1236
  // Check for removed tags.
1237
  $removed_tags = array_diff( (array) $old_tags, (array) $new_tags );
1238
+ if ( ! empty( $removed_tags ) ) {
1239
+ $this->report_tags_change_event( 2120, $post, $removed_tags );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1240
  }
1241
  }
1242
 
1403
  * @return bool
1404
  */
1405
  public function must_not_contain_events( WSAL_AlertManager $manager ) {
1406
+ if ( $manager->WillOrHasTriggered( 2016 )
1407
+ || $manager->WillOrHasTriggered( 2048 )
1408
+ || $manager->WillOrHasTriggered( 2049 )
1409
+ || $manager->WillOrHasTriggered( 2050 )
1410
+ || $manager->WillOrHasTriggered( 2119 )
1411
+ || $manager->WillOrHasTriggered( 2120 )
1412
+ || $manager->WillOrHasTriggered( 2017 ) ) {
 
 
 
 
 
 
 
 
1413
  return false;
1414
  }
1415
  return true;
classes/Sensors/Database.php CHANGED
@@ -51,6 +51,15 @@ class WSAL_Sensors_Database extends WSAL_AbstractSensor {
51
  */
52
  public static $enabled = true;
53
 
 
 
 
 
 
 
 
 
 
54
  /**
55
  * Listening to events using WP hooks.
56
  */
@@ -83,9 +92,14 @@ class WSAL_Sensors_Database extends WSAL_AbstractSensor {
83
  array_push( $table_names, $str[2] );
84
  }
85
  $query_type = 'delete';
86
- } elseif ( preg_match( '|CREATE TABLE IF NOT EXISTS ([^ ]*)|', $query ) ) {
87
- $table_name = str_replace( '`', '', $str[5] );
88
- if ( $table_name !== $wpdb->get_var( "SHOW TABLES LIKE '" . $table_name . "'" ) ) {
 
 
 
 
 
89
  /**
90
  * Some plugins keep trying to create tables even
91
  * when they already exist - would result in too
@@ -120,8 +134,14 @@ class WSAL_Sensors_Database extends WSAL_AbstractSensor {
120
  foreach ( $table_names as $table_name ) {
121
  $alert_options = $this->GetEventOptions( $actor );
122
  $event_code = $this->GetEventCode( $actor, $query_type );
 
 
 
 
 
123
  $alert_options['TableNames'] = $table_name;
124
  $this->plugin->alerts->Trigger( $event_code, $alert_options );
 
125
  }
126
  }
127
  }
@@ -321,14 +341,19 @@ class WSAL_Sensors_Database extends WSAL_AbstractSensor {
321
  foreach ( $queries as $qry ) {
322
  $qry = str_replace( '`', '', $qry );
323
  $str = explode( ' ', $qry );
324
- if ( preg_match( '|CREATE TABLE ([^ ]*)|', $qry ) ) {
325
- if ( $str[2] !== $wpdb->get_var( "SHOW TABLES LIKE '" . $str[2] . "'" ) ) {
 
 
 
 
 
326
  /**
327
  * Some plugins keep trying to create tables even
328
  * when they already exist- would result in too
329
  * many alerts.
330
  */
331
- array_push( $query_types['create'], $str[2] );
332
  }
333
  } elseif ( preg_match( '|ALTER TABLE ([^ ]*)|', $qry ) ) {
334
  array_push( $query_types['update'], $str[2] );
51
  */
52
  public static $enabled = true;
53
 
54
+ /**
55
+ * List of already logged operation during current request. It is used to prevent duplicate events. Values in the
56
+ * array are strings in form of "{operation type}_{table name}".
57
+ *
58
+ * @var string[]
59
+ * @since 4.1.5
60
+ */
61
+ private static $already_logged = [];
62
+
63
  /**
64
  * Listening to events using WP hooks.
65
  */
92
  array_push( $table_names, $str[2] );
93
  }
94
  $query_type = 'delete';
95
+ } elseif ( preg_match( '/CREATE TABLE (IF NOT EXISTS)? ([^ ]*)/i', $query, $matches ) ) {
96
+ $table_name = $matches[count($matches) - 1];
97
+ $table_exists_query = $wpdb->prepare(
98
+ "SHOW TABLES LIKE %s;",
99
+ $table_name
100
+ );
101
+
102
+ if ( $table_name !== $wpdb->get_var( $table_exists_query ) ) {
103
  /**
104
  * Some plugins keep trying to create tables even
105
  * when they already exist - would result in too
134
  foreach ( $table_names as $table_name ) {
135
  $alert_options = $this->GetEventOptions( $actor );
136
  $event_code = $this->GetEventCode( $actor, $query_type );
137
+ $db_op_key = $query_type . '_' . $table_name;
138
+ if ( in_array( $db_op_key, self::$already_logged ) ) {
139
+ continue;
140
+ }
141
+
142
  $alert_options['TableNames'] = $table_name;
143
  $this->plugin->alerts->Trigger( $event_code, $alert_options );
144
+ array_push( self::$already_logged, $db_op_key );
145
  }
146
  }
147
  }
341
  foreach ( $queries as $qry ) {
342
  $qry = str_replace( '`', '', $qry );
343
  $str = explode( ' ', $qry );
344
+ if ( preg_match( '/CREATE TABLE (IF NOT EXISTS)? ([^ ]*)/i', $qry, $matches ) ) {
345
+ $table_name = $matches[count($matches) - 1];
346
+ $table_exists_query = $wpdb->prepare(
347
+ "SHOW TABLES LIKE %s;",
348
+ $table_name
349
+ );
350
+ if ( $table_name !== $wpdb->get_var( $table_exists_query ) ) {
351
  /**
352
  * Some plugins keep trying to create tables even
353
  * when they already exist- would result in too
354
  * many alerts.
355
  */
356
+ array_push( $query_types['create'], $table_name );
357
  }
358
  } elseif ( preg_match( '|ALTER TABLE ([^ ]*)|', $qry ) ) {
359
  array_push( $query_types['update'], $str[2] );
classes/Sensors/FrontendLogin.php CHANGED
@@ -24,7 +24,14 @@ class WSAL_Sensors_FrontendLogin extends WSAL_AbstractSensor {
24
  /**
25
  * Event Login.
26
  *
27
- * TODO: update params doc block to match the new hook it's attached to.
 
 
 
 
 
 
 
28
  */
29
  public function event_login( $auth_cookie, $expire, $expiration, $user_id, $scheme, $token ) {
30
 
@@ -45,6 +52,8 @@ class WSAL_Sensors_FrontendLogin extends WSAL_AbstractSensor {
45
  'Username' => $user_login,
46
  'CurrentUserRoles' => $user_roles,
47
  );
 
 
48
  if ( class_exists( 'WSAL_UserSessions_Helpers' ) ) {
49
  $alert_data['SessionID'] = $this->hash_token( $token );
50
  }
24
  /**
25
  * Event Login.
26
  *
27
+ * @param string $auth_cookie Authentication cookie value.
28
+ * @param int $expire The time the login grace period expires as a UNIX timestamp.
29
+ * Default is 12 hours past the cookie's expiration time.
30
+ * @param int $expiration The time when the authentication cookie expires as a UNIX timestamp.
31
+ * Default is 14 days from now.
32
+ * @param int $user_id User ID.
33
+ * @param string $scheme Authentication scheme. Values include 'auth' or 'secure_auth'.
34
+ * @param string $token User's session token to use for this cookie.
35
  */
36
  public function event_login( $auth_cookie, $expire, $expiration, $user_id, $scheme, $token ) {
37
 
52
  'Username' => $user_login,
53
  'CurrentUserRoles' => $user_roles,
54
  );
55
+
56
+ // @todo attach this using a filter, it should also remove the need for duplicated function hash_token below
57
  if ( class_exists( 'WSAL_UserSessions_Helpers' ) ) {
58
  $alert_data['SessionID'] = $this->hash_token( $token );
59
  }
classes/Sensors/FrontendRegister.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Frontend user registeration sensor.
4
  *
5
  * @package wsal
6
  */
@@ -10,7 +10,7 @@ if ( ! defined( 'ABSPATH' ) ) {
10
  }
11
 
12
  /**
13
- * Frontend user registeration sensor.
14
  */
15
  class WSAL_Sensors_FrontendRegister extends WSAL_AbstractSensor {
16
 
@@ -18,34 +18,45 @@ class WSAL_Sensors_FrontendRegister extends WSAL_AbstractSensor {
18
  * Listening to events using WP hooks.
19
  */
20
  public function HookEvents() {
21
- add_action( 'user_register', array( $this, 'event_user_register' ) );
 
 
 
 
 
22
  }
23
 
24
  /**
25
  * Triggered when a user is registered.
26
  *
 
 
 
27
  * @param int $user_id - User ID of the registered user.
28
  */
29
  public function event_user_register( $user_id ) {
 
30
  $user = get_userdata( $user_id );
31
- $ismu = function_exists( 'is_multisite' ) && is_multisite();
32
- $event = $ismu ? 4012 : ( is_user_logged_in() ? 4001 : 4000 );
33
  $current_user = wp_get_current_user();
34
 
35
- $this->plugin->alerts->Trigger(
36
- $event,
37
- array(
38
- 'NewUserID' => $user_id,
39
- 'UserChanger' => ! empty( $current_user ) ? $current_user->user_login : '',
40
- 'NewUserData' => (object) array(
41
- 'Username' => $user->user_login,
42
- 'FirstName' => $user->user_firstname,
43
- 'LastName' => $user->user_lastname,
44
- 'Email' => $user->user_email,
45
- 'Roles' => is_array( $user->roles ) ? implode( ', ', $user->roles ) : $user->roles,
46
- ),
47
- ),
48
- true
49
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  }
51
  }
1
  <?php
2
  /**
3
+ * Frontend user registration sensor.
4
  *
5
  * @package wsal
6
  */
10
  }
11
 
12
  /**
13
+ * Frontend user registration sensor.
14
  */
15
  class WSAL_Sensors_FrontendRegister extends WSAL_AbstractSensor {
16
 
18
  * Listening to events using WP hooks.
19
  */
20
  public function HookEvents() {
21
+ /*
22
+ * We hook into action 'user_register' because it is part of the function 'wp_insert_user'. Default WordPress
23
+ * registration utilizes action 'register_new_user', but we cannot rely a front-end registration implemented
24
+ * by a third party to use it.
25
+ */
26
+ add_action( 'user_register', array( $this, 'event_user_register' ), 10, 1 );
27
  }
28
 
29
  /**
30
  * Triggered when a user is registered.
31
  *
32
+ * This function is identical to function WSAL_Sensors_Public::event_user_register. We will keep the duplication
33
+ * until some autoloading improvements are made.
34
+ *
35
  * @param int $user_id - User ID of the registered user.
36
  */
37
  public function event_user_register( $user_id ) {
38
+ $plugin = WpSecurityAuditLog::GetInstance();
39
  $user = get_userdata( $user_id );
40
+ $event = $plugin->IsMultisite() ? 4012 : ( is_user_logged_in() ? 4001 : 4000 );
 
41
  $current_user = wp_get_current_user();
42
 
43
+ $new_user_data = array(
44
+ 'Username' => $user->user_login,
45
+ 'Email' => $user->user_email,
46
+ 'Roles' => is_array( $user->roles ) ? implode( ', ', $user->roles ) : $user->roles,
 
 
 
 
 
 
 
 
 
 
47
  );
48
+
49
+ if ( 4000 != $event ) {
50
+ $new_user_data['FirstName'] = ! empty( $user->user_firstname ) ? $user->user_firstname : '';
51
+ $new_user_data['LastName'] = ! empty( $user->user_lastname ) ? $user->user_lastname : '';
52
+ }
53
+
54
+ $event_data = array(
55
+ 'NewUserID' => $user_id,
56
+ 'UserChanger' => ! empty( $current_user ) ? $current_user->user_login : '',
57
+ 'NewUserData' => (object) $new_user_data,
58
+ );
59
+
60
+ $plugin->alerts->Trigger( $event, $event_data, true );
61
  }
62
  }
classes/Sensors/FrontendSystem.php DELETED
@@ -1,286 +0,0 @@
1
- <?php
2
- /**
3
- * Frontend system sensor.
4
- *
5
- * @package wsal
6
- */
7
-
8
- if ( ! defined( 'ABSPATH' ) ) {
9
- exit; // Exit if accessed directly.
10
- }
11
-
12
- /**
13
- * Frontend system sensor to detect 404 requests.
14
- */
15
- class WSAL_Sensors_FrontendSystem extends WSAL_AbstractSensor {
16
-
17
- /**
18
- * 404 Visitor Transient.
19
- *
20
- * WordPress will prefix the name with "_transient_"
21
- * or "_transient_timeout_" in the options table.
22
- */
23
- const TRANSIENT_VISITOR_404 = 'wsal-visitor-404-attempts';
24
-
25
- /**
26
- * Listening to events using WP hooks.
27
- */
28
- public function HookEvents() {
29
- add_filter( 'template_redirect', array( $this, 'event_404' ) );
30
- }
31
-
32
- /**
33
- * Event 404 Not found.
34
- */
35
- public function event_404() {
36
- $attempts = 1;
37
-
38
- global $wp_query;
39
- if ( ! $wp_query->is_404 ) {
40
- return;
41
- }
42
-
43
- $msg = 'times';
44
- list( $y, $m, $d ) = explode( '-', date( 'Y-m-d' ) );
45
- $site_id = function_exists( 'get_current_blog_id' ) ? get_current_blog_id() : 0;
46
- $ip = $this->plugin->settings()->GetMainClientIP();
47
-
48
- if ( ! is_user_logged_in() ) {
49
- $username = 'Unregistered user';
50
- } else {
51
- $username = wp_get_current_user()->user_login;
52
- }
53
-
54
- // Request URL.
55
- $request_uri = filter_input( INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_STRING );
56
- if ( ! empty( $request_uri ) ) {
57
- $url_404 = home_url() . $request_uri;
58
- } elseif ( isset( $_SERVER['REQUEST_URI'] ) && ! empty( $_SERVER['REQUEST_URI'] ) ) {
59
- $url_404 = home_url() . sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) );
60
- }
61
-
62
- // Remove forward slash from the URL.
63
- $url_404 = untrailingslashit( $url_404 );
64
-
65
- // Check for excluded 404 URls.
66
- if ( $this->is_excluded_url( $url_404 ) ) {
67
- return;
68
- }
69
-
70
- if ( 'Website Visitor' === $username || 'Unregistered user' === $username ) {
71
- // Check if the alert is disabled from the "Enable/Disable Alerts" section.
72
- if ( ! $this->plugin->alerts->IsEnabled( 6023 ) ) {
73
- return;
74
- }
75
-
76
- if ( $this->is_past_visitor_404_limit( $site_id, $username, $ip ) ) {
77
- return;
78
- }
79
-
80
- $obj_occurrence = new WSAL_Models_Occurrence();
81
- $occurrence = $obj_occurrence->CheckAlert404(
82
- array(
83
- $ip,
84
- $username,
85
- 6023,
86
- $site_id,
87
- mktime( 0, 0, 0, $m, $d, $y ),
88
- mktime( 0, 0, 0, $m, $d + 1, $y ) - 1,
89
- )
90
- );
91
-
92
- $occurrence = count( $occurrence ) ? $occurrence[0] : null;
93
- if ( ! empty( $occurrence ) ) {
94
- // Update existing record.
95
- $this->increment_visitor_404( $site_id, $username, $ip );
96
- $new = ( (int) $occurrence->GetMetaValue( 'Attempts', 0 ) ) + 1;
97
-
98
- if ( $new > $this->get_visitor_404_log_limit() ) {
99
- $new = 'more than ' . $this->get_visitor_404_log_limit();
100
- $msg .= ' This could possible be a scan, therefore keep an eye on the activity from this IP Address';
101
- }
102
-
103
- $link_file = $this->write_log( $new, $ip, $username, $url_404 );
104
-
105
- $occurrence->UpdateMetaValue( 'Attempts', $new );
106
- $occurrence->UpdateMetaValue( 'Username', $username );
107
- $occurrence->UpdateMetaValue( 'Msg', $msg );
108
- $occurrence->UpdateMetaValue( 'URL', $url_404 );
109
- if ( ! empty( $link_file ) ) {
110
- $occurrence->UpdateMetaValue( 'LinkFile', $link_file );
111
- }
112
- $occurrence->created_on = null;
113
- $occurrence->Save();
114
- } else {
115
- $link_file = $this->write_log( 1, $ip, $username, $url_404 );
116
- // Create a new record.
117
- $fields = array(
118
- 'Attempts' => 1,
119
- 'Username' => $username,
120
- 'Msg' => $msg,
121
- 'URL' => $url_404,
122
- );
123
- if ( ! empty( $link_file ) ) {
124
- $fields['LinkFile'] = $link_file;
125
- }
126
- $this->plugin->alerts->Trigger( 6023, $fields );
127
- }
128
- }
129
- }
130
-
131
- /**
132
- * Check visitor 404 limit.
133
- *
134
- * @param integer $site_id - Blog ID.
135
- * @param string $username - Username.
136
- * @param string $ip - IP address.
137
- * @return boolean passed limit true|false
138
- */
139
- protected function is_past_visitor_404_limit( $site_id, $username, $ip ) {
140
- $get_fn = $this->plugin->IsMultisite() ? 'get_site_transient' : 'get_transient';
141
- $data = $get_fn( self::TRANSIENT_VISITOR_404 );
142
- return ( false !== $data ) && isset( $data[ $site_id . ':' . $username . ':' . $ip ] ) && ( $data[ $site_id . ':' . $username . ':' . $ip ] > $this->get_visitor_404_log_limit() );
143
- }
144
-
145
- /**
146
- * Increment visitor 404 limit.
147
- *
148
- * @param integer $site_id - Blog ID.
149
- * @param string $username - Username.
150
- * @param string $ip - IP address.
151
- */
152
- protected function increment_visitor_404( $site_id, $username, $ip ) {
153
- $get_fn = $this->plugin->IsMultisite() ? 'get_site_transient' : 'get_transient';
154
- $set_fn = $this->plugin->IsMultisite() ? 'set_site_transient' : 'set_transient';
155
- $data = $get_fn( self::TRANSIENT_VISITOR_404 );
156
-
157
- if ( ! $data ) {
158
- $data = array();
159
- }
160
-
161
- if ( ! isset( $data[ $site_id . ':' . $username . ':' . $ip ] ) ) {
162
- $data[ $site_id . ':' . $username . ':' . $ip ] = 1;
163
- }
164
- $data[ $site_id . ':' . $username . ':' . $ip ]++;
165
- $set_fn( self::TRANSIENT_VISITOR_404, $data, DAY_IN_SECONDS );
166
- }
167
-
168
- /**
169
- * 404 visitor limit count.
170
- *
171
- * @return integer limit
172
- */
173
- protected function get_visitor_404_log_limit() {
174
- return $this->plugin->settings()->GetVisitor404LogLimit();
175
- }
176
-
177
- /**
178
- * Method: Return true if URL is excluded otherwise false.
179
- *
180
- * @param string $url - 404 URL.
181
- * @return boolean
182
- */
183
- public function is_excluded_url( $url ) {
184
- if ( empty( $url ) ) {
185
- return false;
186
- }
187
-
188
- if ( in_array( $url, $this->plugin->settings()->get_excluded_urls() ) ) {
189
- return true;
190
- }
191
- }
192
-
193
- /**
194
- * Write Log.
195
- *
196
- * Write a new line on 404 log file.
197
- * Folder: {plugin working folder}/404s/
198
- *
199
- * @param int $attempts - Number of attempt.
200
- * @param string $ip - IP address.
201
- * @param string $username - Username.
202
- * @param string $url - 404 URL.
203
- *
204
- * @return string|null
205
- */
206
- private function write_log( $attempts, $ip, $username = '', $url = null ) {
207
- $name_file = null;
208
-
209
- if ( $this->plugin->GetGlobalBooleanSetting( 'log-visitor-404', false ) ) {
210
- // Get option to log referrer.
211
- $log_referrer = $this->plugin->GetGlobalBooleanSetting( 'log-visitor-404-referrer' );
212
-
213
- // Check localhost.
214
- if ( '127.0.0.1' == $ip || '::1' == $ip ) {
215
- $ip = 'localhost';
216
- }
217
-
218
- if ( 'on' === $log_referrer ) {
219
- // Get the referer.
220
- $referrer = filter_input( INPUT_SERVER, 'HTTP_REFERER', FILTER_SANITIZE_STRING );
221
- if ( empty( $referrer ) && isset( $_SERVER['HTTP_REFERER'] ) && ! empty( $_SERVER['HTTP_REFERER'] ) ) {
222
- $referrer = sanitize_text_field( wp_unslash( $_SERVER['HTTP_REFERER'] ) );
223
- }
224
-
225
- // Data to write.
226
- $data = '';
227
-
228
- // Append IP if it exists.
229
- $data = ( $ip ) ? $ip . ',' : '';
230
-
231
- // Create/Append to the log file.
232
- $data = $data . 'Request URL ' . $url . ',Referer ' . $referrer . ',';
233
- } else {
234
- // Data to write.
235
- $data = '';
236
-
237
- // Append IP if it exists.
238
- $data = ( $ip ) ? $ip . ',' : '';
239
-
240
- // Create/Append to the log file.
241
- $data = $data . 'Request URL ' . $url . ',';
242
- }
243
-
244
- // don't store username in a public viewable logfile.
245
- $username = '';
246
-
247
- // get the custom logging path from settings.
248
- $custom_logging_path = $this->plugin->settings()->get_working_dir_path( '404s' );
249
- if ( ! is_wp_error( $custom_logging_path ) ) {
250
- if ( ! file_exists( $custom_logging_path . 'index.php' ) ) {
251
- // make an empty index.php in the directory.
252
- @file_put_contents( $custom_logging_path . 'index.php', '<?php // Silence is golden' );
253
- }
254
-
255
- $filename = '6023_' . date( 'Ymd' ) . '.log';
256
- $fp = $custom_logging_path . $filename;
257
- $custom_logging_url = $this->plugin->settings()->get_working_dir_url( '404s' );
258
- $name_file = $custom_logging_url . $filename;
259
- if ( ! $file = fopen( $fp, 'a' ) ) {
260
- $i = 1;
261
- $file_opened = false;
262
- do {
263
- $fp2 = substr( $fp, 0, -4 ) . '_' . $i . '.log';
264
- if ( ! file_exists( $fp2 ) ) {
265
- if ( $file = fopen( $fp2, 'a' ) ) {
266
- $file_opened = true;
267
- $name_file = $custom_logging_url . substr( $name_file, 0, -4 ) . '_' . $i . '.log';
268
- }
269
- } else {
270
- $latest_filename = $this->GetLastModified( $custom_logging_path, $filename );
271
- $fp_last = $custom_logging_path . $latest_filename;
272
- if ( $file = fopen( $fp_last, 'a' ) ) {
273
- $file_opened = true;
274
- $name_file = $custom_logging_url . $latest_filename;
275
- }
276
- }
277
- $i++;
278
- } while ( ! $file_opened );
279
- }
280
- fwrite( $file, sprintf( "%s\n", $data ) );
281
- fclose( $file );
282
- }
283
- }
284
- return $name_file;
285
- }
286
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/Sensors/FrontendWooCommerce.php DELETED
@@ -1,319 +0,0 @@
1
- <?php
2
- /**
3
- * Frontend WooCommerce sensor.
4
- * Although WC is handled by an extension, this is kept to avoid causing issue.
5
- *
6
- * @package wsal
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit; // Exit if accessed directly.
11
- }
12
-
13
- /**
14
- * Frontend WooCommerce sensor.
15
- */
16
- class WSAL_Sensors_FrontendWooCommerce extends WSAL_AbstractSensor {
17
-
18
- /**
19
- * Listening to events using WP hooks.
20
- */
21
- public function HookEvents() {
22
- // Check if WooCommerce plugin exists.
23
- if ( WpSecurityAuditLog::is_woocommerce_active() ) {
24
- add_action( 'woocommerce_new_order', array( $this, 'event_new_order' ), 10, 1 );
25
- add_filter( 'woocommerce_order_item_quantity', array( $this, 'set_old_stock' ), 10, 3 );
26
- add_action( 'woocommerce_product_set_stock', array( $this, 'product_stock_changed' ), 10, 1 );
27
- add_action( 'woocommerce_variation_set_stock', array( $this, 'product_stock_changed' ), 10, 1 );
28
- }
29
- }
30
-
31
- /**
32
- * New WooCommerce Order Event.
33
- *
34
- * @since 3.3.1
35
- *
36
- * @param integer $order_id – Order id.
37
- */
38
- public function event_new_order( $order_id ) {
39
- if ( empty( $order_id ) ) {
40
- return;
41
- }
42
-
43
- // Get order object.
44
- $new_order = new WC_Order( $order_id );
45
-
46
- if ( $new_order && $new_order instanceof WC_Order ) {
47
- $order_post = get_post( $order_id ); // Get order post object.
48
- $order_title = ( null !== $order_post && $order_post instanceof WP_Post ) ? $order_post->post_title : false;
49
- $editor_link = $this->get_editor_link( $order_post );
50
- $this->plugin->alerts->Trigger(
51
- 9035,
52
- array(
53
- 'OrderID' => $order_id,
54
- 'OrderTitle' => $this->get_order_title( $new_order ),
55
- 'OrderStatus' => $new_order->get_status(),
56
- $editor_link['name'] => $editor_link['value'],
57
- )
58
- );
59
- }
60
- }
61
-
62
- /**
63
- * Triggered before updating stock quantity on customer order.
64
- *
65
- * @since 3.3.1
66
- *
67
- * @param int $order_quantity - Order quantity.
68
- * @param WC_Order $order - Order object.
69
- * @param WC_Order_Item $item - Order item object.
70
- * @return int - Order quantity.
71
- */
72
- public function set_old_stock( $order_quantity, $order, $item ) {
73
- // Get product from order item.
74
- $product = $item->get_product();
75
-
76
- // Get product id.
77
- $product_id_with_stock = $product->get_stock_managed_by_id();
78
-
79
- // Get product with stock.
80
- $product_with_stock = wc_get_product( $product_id_with_stock );
81
-
82
- // Set stock attributes of the product.
83
- $this->_old_stock = $product_with_stock->get_stock_quantity();
84
- $this->_old_stock_status = $product_with_stock->get_stock_status();
85
-
86
- // Return original stock quantity.
87
- return $order_quantity;
88
- }
89
-
90
- /**
91
- * Triggered when stock of a product is changed.
92
- *
93
- * @since 3.3.1
94
- *
95
- * @param WC_Product $product - WooCommerce product object.
96
- */
97
- public function product_stock_changed( $product ) {
98
- // Get product data.
99
- $product_status = false;
100
- if ( $product->is_type( 'variation' ) ) {
101
- $product_id = $product->get_parent_id();
102
- $product_title = $product->get_name(); // Get product title.
103
- $product_status = $product->get_status();
104
- } else {
105
- $product_id = $product->get_id();
106
- $product_title = $product->get_title(); // Get product title.
107
- }
108
-
109
- // Return if current screen is edit post page.
110
- global $pagenow;
111
- if ( is_admin() && ( 'post.php' === $pagenow || defined( 'DOING_AJAX' ) ) ) {
112
- return;
113
- }
114
-
115
- // Get global $_POST array.
116
- $post_array = filter_input_array( INPUT_POST );
117
-
118
- // Special conditions for WooCommerce Bulk Stock Management.
119
- if ( 'edit.php' === $pagenow && isset( $post_array['page'] ) && 'woocommerce-bulk-stock-management' === $post_array['page'] ) {
120
- $old_acc_stock = isset( $post_array['current_stock_quantity'] ) ? $post_array['current_stock_quantity'] : false;
121
- $new_acc_stock = isset( $post_array['stock_quantity'] ) ? $post_array['stock_quantity'] : false;
122
-
123
- // Get old stock quantity.
124
- $old_stock = ! empty( $this->_old_stock ) ? $this->_old_stock : $old_acc_stock[ $product_id ];
125
-
126
- // Following cases handle the stock status.
127
- if ( '0' === $old_acc_stock[ $product_id ] && '0' !== $new_acc_stock[ $product_id ] ) {
128
- $old_stock_status = 'outofstock';
129
- } elseif ( '0' !== $old_acc_stock[ $product_id ] && '0' === $new_acc_stock[ $product_id ] ) {
130
- $old_stock_status = 'instock';
131
- } elseif ( '0' === $old_acc_stock[ $product_id ] && '0' === $new_acc_stock[ $product_id ] ) {
132
- $old_stock_status = 'outofstock';
133
- } elseif ( '0' !== $old_acc_stock[ $product_id ] && '0' !== $new_acc_stock[ $product_id ] ) {
134
- $old_stock_status = 'instock';
135
- } else {
136
- $old_stock_status = '';
137
- }
138
- } else {
139
- $old_stock = $this->_old_stock; // Get old stock quantity.
140
- $old_stock_status = $this->_old_stock_status; // Get old stock status.
141
- }
142
-
143
- $new_stock = $product->get_stock_quantity(); // Get new stock quantity.
144
- $new_stock_status = $product->get_stock_status(); // Get new stock status.
145
-
146
- // Set post object.
147
- $post = get_post( $product_id );
148
-
149
- // Set username.
150
- $username = '';
151
- if ( ! is_user_logged_in() ) {
152
- $username = 'Unregistered user';
153
- } else {
154
- $username = wp_get_current_user()->user_login;
155
- }
156
-
157
- // If stock status has changed then trigger the alert.
158
- if ( ( $old_stock_status && $new_stock_status ) && ( $old_stock_status !== $new_stock_status ) ) {
159
- $editor_link = $this->get_editor_link( $post );
160
- $this->plugin->alerts->Trigger(
161
- 9018,
162
- array(
163
- 'PostID' => $post->ID,
164
- 'ProductTitle' => $product_title,
165
- 'ProductStatus' => ! $product_status ? $post->post_status : $product_status,
166
- 'OldStatus' => $this->get_stock_status( $old_stock_status ),
167
- 'NewStatus' => $this->get_stock_status( $new_stock_status ),
168
- 'Username' => $username,
169
- $editor_link['name'] => $editor_link['value'],
170
- )
171
- );
172
- }
173
-
174
- $wc_all_stock_changes = $this->plugin->GetGlobalBooleanSetting( 'wc-all-stock-changes', true );
175
-
176
- // If stock has changed then trigger the alert.
177
- if ( ( $old_stock !== $new_stock ) && ( $wc_all_stock_changes ) ) {
178
- $editor_link = $this->get_editor_link( $post );
179
-
180
- // Check if this was done via an order by looking for event 9035.
181
- // If so, we are going to add its data.
182
- $query = new WSAL_Models_OccurrenceQuery();
183
- $query->addOrderBy( 'created_on', true );
184
- $query->setLimit( 1 );
185
- $last_occurence = $query->getAdapter()->Execute( $query );
186
- if ( isset( $last_occurence[0] ) && 9035 === $last_occurence[0]->alert_id ) {
187
- $latest_event = $this->plugin->alerts->get_latest_events();
188
- $latest_event = isset( $latest_event[0] ) ? $latest_event[0] : false;
189
- $event_meta = $latest_event ? $latest_event->GetMetaArray() : false;
190
- $order_id = isset( $event_meta['OrderID'] ) ? $event_meta['OrderID'] : false;
191
- $order_title = isset( $event_meta['OrderTitle'] ) ? $event_meta['OrderTitle'] : false;
192
- } else {
193
- $order_id = false;
194
- $order_title = false;
195
- }
196
-
197
- /**
198
- * Event was changed from 9019 to 9105
199
- *
200
- * @since 4.0.3
201
- */
202
- $this->plugin->alerts->Trigger(
203
- 9105,
204
- array(
205
- 'PostID' => $post->ID,
206
- 'ProductTitle' => $product_title,
207
- 'ProductStatus' => ! $product_status ? $post->post_status : $product_status,
208
- 'OldValue' => ! empty( $old_stock ) ? $old_stock : 0,
209
- 'NewValue' => $new_stock,
210
- 'Username' => $username,
211
- 'StockOrderID' => $order_id,
212
- $editor_link['name'] => $editor_link['value'],
213
- )
214
- );
215
- }
216
- }
217
-
218
- /**
219
- * Get Stock Status Name.
220
- *
221
- * @since 3.3.1
222
- *
223
- * @param string $slug - Stock slug.
224
- * @return string
225
- */
226
- private function get_stock_status( $slug ) {
227
- if ( 'instock' === $slug ) {
228
- return __( 'In stock', 'wp-security-audit-log' );
229
- } elseif ( 'outofstock' === $slug ) {
230
- return __( 'Out of stock', 'wp-security-audit-log' );
231
- } elseif ( 'onbackorder' === $slug ) {
232
- return __( 'On backorder', 'wp-security-audit-log' );
233
- }
234
- }
235
-
236
- /**
237
- * Get editor link.
238
- *
239
- * @param WP_Post $post - Product post object.
240
- * @return array $editor_link - Name and value link.
241
- */
242
- private function get_editor_link( $post ) {
243
- // Meta value key.
244
- if ( 'shop_order' === $post->post_type ) {
245
- $name = 'EditorLinkOrder';
246
- } else {
247
- $name = 'EditorLinkProduct';
248
- }
249
-
250
- // Get editor post link URL.
251
- $value = get_edit_post_link( $post->ID );
252
-
253
- // If the URL is not empty then set values.
254
- if ( ! empty( $value ) ) {
255
- $editor_link = array(
256
- 'name' => $name, // Meta key.
257
- 'value' => $value, // Meta value.
258
- );
259
- } else {
260
- // Get post object.
261
- $post = get_post( $post->ID );
262
-
263
- // Set URL action.
264
- if ( 'revision' === $post->post_type ) {
265
- $action = '';
266
- } else {
267
- $action = '&action=edit';
268
- }
269
-
270
- // Get and check post type object.
271
- $post_type_object = get_post_type_object( $post->post_type );
272
- if ( ! $post_type_object ) {
273
- return;
274
- }
275
-
276
- // Set editor link manually.
277
- if ( $post_type_object->_edit_link ) {
278
- $link = admin_url( sprintf( $post_type_object->_edit_link . $action, $post->ID ) );
279
- } else {
280
- $link = '';
281
- }
282
-
283
- $editor_link = array(
284
- 'name' => $name, // Meta key.
285
- 'value' => $link, // Meta value.
286
- );
287
- }
288
-
289
- return $editor_link;
290
- }
291
-
292
- /**
293
- * Formulate Order Title as done by WooCommerce.
294
- *
295
- * @param int|WC_Order $order - Order id or WC Order object.
296
- * @return string
297
- */
298
- private function get_order_title( $order ) {
299
- if ( ! $order ) {
300
- return false;
301
- }
302
- if ( is_int( $order ) ) {
303
- $order = new WC_Order( $order );
304
- }
305
- if ( ! $order instanceof WC_Order ) {
306
- return false;
307
- }
308
-
309
- if ( $order->get_billing_first_name() || $order->get_billing_last_name() ) {
310
- $buyer = trim( sprintf( '%1$s %2$s', $order->get_billing_first_name(), $order->get_billing_last_name() ) );
311
- } elseif ( $order->get_billing_company() ) {
312
- $buyer = trim( $order->get_billing_company() );
313
- } elseif ( $order->get_customer_id() ) {
314
- $user = get_user_by( 'id', $order->get_customer_id() );
315
- $buyer = ucwords( $user->display_name );
316
- }
317
- return '#' . $order->get_order_number() . ' ' . $buyer;
318
- }
319
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/Sensors/LogInOut.php CHANGED
@@ -534,36 +534,6 @@ class WSAL_Sensors_LogInOut extends WSAL_AbstractSensor {
534
  );
535
  }
536
 
537
- /**
538
- * Get the latest file modified.
539
- *
540
- * @param string $uploads_dir_path - Uploads directory path.
541
- * @param string $filename - File name.
542
- * @return string $latest_filename - File name.
543
- */
544
- private function GetLastModified( $uploads_dir_path, $filename ) {
545
- $filename = substr( $filename, 0, -4 );
546
- $latest_mtime = 0;
547
- $latest_filename = '';
548
- if ( $handle = opendir( $uploads_dir_path ) ) {
549
- while ( false !== ( $entry = readdir( $handle ) ) ) {
550
- if ( '.' != $entry && '..' != $entry ) {
551
- $entry = strip_tags( $entry ); // Strip HTML Tags.
552
- $entry = preg_replace( '/[\r\n\t ]+/', ' ', $entry ); // Remove Break/Tabs/Return Carriage.
553
- $entry = preg_replace( '/[\"\*\/\:\<\>\?\'\|]+/', ' ', $entry ); // Remove Illegal Chars for folder and filename.
554
- if ( preg_match( '/^' . $filename . '/i', $entry ) > 0 ) {
555
- if ( filemtime( $uploads_dir_path . $entry ) > $latest_mtime ) {
556
- $latest_mtime = filemtime( $uploads_dir_path . $entry );
557
- $latest_filename = $entry;
558
- }
559
- }
560
- }
561
- }
562
- closedir( $handle );
563
- }
564
- return $latest_filename;
565
- }
566
-
567
  /**
568
  * User Switched.
569
  *
534
  );
535
  }
536
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
537
  /**
538
  * User Switched.
539
  *
classes/Sensors/MainWP.php CHANGED
@@ -64,7 +64,8 @@ class WSAL_Sensors_MainWP extends WSAL_AbstractSensor {
64
  add_action( 'mainwp_child_theme_action', array( $this, 'mainwp_child_uninstall_theme' ), 10, 1 );
65
 
66
  // Update theme/plugin from MainWP dashboard.
67
- add_action( 'mainwp_child_upgradePluginTheme', array( $this, 'mainwp_child_update_assets' ), 10, 1 );
 
68
  }
69
  }
70
 
@@ -352,14 +353,15 @@ class WSAL_Sensors_MainWP extends WSAL_AbstractSensor {
352
  }
353
  }
354
 
355
- /**
356
- * Method: Handle plugin/theme update event
357
- * from MainWP dashboard on child site.
358
- *
359
- * @param array $args - Array of arguments related to asset updated.
360
- * @since 3.2.2
361
- */
362
- public function mainwp_child_update_assets( $args ) {
 
363
  if ( empty( $args ) || ! is_array( $args ) ) {
364
  return;
365
  }
@@ -372,47 +374,32 @@ class WSAL_Sensors_MainWP extends WSAL_AbstractSensor {
372
  isset( $post_array['function'] ) && 'upgradeplugintheme' === $post_array['function']
373
  && isset( $post_array['mainwpsignature'] ) && ! empty( $post_array['mainwpsignature'] )
374
  && isset( $post_array['list'] ) && ! empty( $post_array['list'] )
375
- && isset( $args['type'] ) && ! empty( $args['type'] )
376
- && isset( $args['name'] ) && ! empty( $args['name'] )
377
  ) {
378
  if ( 'theme' === $args['type'] ) {
379
  // Site themes updated.
380
- $site_themes = explode( ',', $post_array['list'] );
381
-
382
- // Theme name.
383
- $theme_name = $args['name'];
384
 
385
- // Get theme object.
386
- $theme = WSAL_Sensors_PluginsThemes::get_theme_by_name( $theme_name );
 
 
387
 
388
- if ( ! empty( $theme ) && $theme instanceof WP_Theme && in_array( $theme->stylesheet, $site_themes, true ) ) {
389
- $this->plugin->alerts->Trigger(
390
- 5031,
391
- array(
392
- 'Theme' => (object) array(
393
- 'Name' => $theme->Name,
394
- 'ThemeURI' => $theme->ThemeURI,
395
- 'Description' => $theme->Description,
396
- 'Author' => $theme->Author,
397
- 'Version' => $theme->Version,
398
- 'get_template_directory' => $theme->get_template_directory(),
399
- ),
400
- )
401
- );
402
- }
403
  } elseif ( 'plugin' === $args['type'] ) {
404
- // Plugin name.
405
- $plugin_name = $args['name'];
406
-
407
- // Get plugin filename.
408
- $plugin_file = WSAL_Sensors_PluginsThemes::get_plugin_file_name( $plugin_name );
409
-
410
- // If plugin file is empty then return.
411
- if ( empty( $plugin_file ) ) {
412
- return;
413
- }
414
-
415
- WSAL_Sensors_PluginsThemes::LogPluginUpdatedEvent( $plugin_file );
416
  }
417
  }
418
  }
64
  add_action( 'mainwp_child_theme_action', array( $this, 'mainwp_child_uninstall_theme' ), 10, 1 );
65
 
66
  // Update theme/plugin from MainWP dashboard.
67
+ add_action( 'upgrader_process_complete', array( $this, 'mainwp_child_update_assets' ), 10, 2 );
68
+
69
  }
70
  }
71
 
353
  }
354
  }
355
 
356
+ /**
357
+ * Method: Handle plugin/theme update event
358
+ * from MainWP dashboard on child site.
359
+ *
360
+ * @param WP_Upgrader $upgrader
361
+ * @param array $args - Array of arguments related to asset updated.
362
+ * @since 3.2.2
363
+ */
364
+ public function mainwp_child_update_assets( $upgrader, $args ) {
365
  if ( empty( $args ) || ! is_array( $args ) ) {
366
  return;
367
  }
374
  isset( $post_array['function'] ) && 'upgradeplugintheme' === $post_array['function']
375
  && isset( $post_array['mainwpsignature'] ) && ! empty( $post_array['mainwpsignature'] )
376
  && isset( $post_array['list'] ) && ! empty( $post_array['list'] )
377
+ && isset( $args['action'] ) && 'update' === $args['action']
378
+ && isset( $args['type'] ) && ! empty( $args['type'] )
379
  ) {
380
  if ( 'theme' === $args['type'] ) {
381
  // Site themes updated.
382
+ $site_themes = array_key_exists( 'themes', $args ) ? $args['themes'] : explode( ',', $post_array['list'] );
 
 
 
383
 
384
+ if ( empty( $site_themes ) ) {
385
+ // no themes in any of the lists
386
+ return;
387
+ }
388
 
389
+ foreach ( $site_themes as $theme_name ) {
390
+ WSAL_Sensors_PluginsThemes::LogThemeUpdatedEvent( $theme_name );
391
+ }
 
 
 
 
 
 
 
 
 
 
 
 
392
  } elseif ( 'plugin' === $args['type'] ) {
393
+ // Site plugins updated.
394
+ if ( ! array_key_exists( 'plugins', $args ) || empty( $args['plugins'] ) ) {
395
+ // no plugins in the list
396
+ return;
397
+ }
398
+
399
+ $plugins = $args['plugins'];
400
+ foreach ( $plugins as $plugin_file ) {
401
+ WSAL_Sensors_PluginsThemes::LogPluginUpdatedEvent( $plugin_file );
402
+ }
 
 
403
  }
404
  }
405
  }
classes/Sensors/Multisite.php CHANGED
@@ -19,14 +19,15 @@ if ( ! defined( 'ABSPATH' ) ) {
19
  * 4010 Existing user added to a site
20
  * 4011 User removed from site
21
  * 4012 New network user created
 
 
22
  * 7000 New site added on the network
23
  * 7001 Existing site archived
24
  * 7002 Archived site has been unarchived
25
  * 7003 Deactivated site has been activated
26
  * 7004 Site has been deactivated
27
  * 7005 Existing site deleted from network
28
- * 5008 Activated theme on network
29
- * 5009 Deactivated theme from network
30
  *
31
  * @package Wsal
32
  * @subpackage Sensors
@@ -56,6 +57,27 @@ class WSAL_Sensors_Multisite extends WSAL_AbstractSensor {
56
  add_action( 'delete_blog', array( $this, 'EventDeleteBlog' ) );
57
  add_action( 'add_user_to_blog', array( $this, 'EventUserAddedToBlog' ), 10, 3 );
58
  add_action( 'remove_user_from_blog', array( $this, 'EventUserRemovedFromBlog' ), 10, 2 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  }
60
 
61
  /**
19
  * 4010 Existing user added to a site
20
  * 4011 User removed from site
21
  * 4012 New network user created
22
+ * 5008 Activated theme on network
23
+ * 5009 Deactivated theme from network
24
  * 7000 New site added on the network
25
  * 7001 Existing site archived
26
  * 7002 Archived site has been unarchived
27
  * 7003 Deactivated site has been activated
28
  * 7004 Site has been deactivated
29
  * 7005 Existing site deleted from network
30
+ * 7012 Network registration option updated
 
31
  *
32
  * @package Wsal
33
  * @subpackage Sensors
57
  add_action( 'delete_blog', array( $this, 'EventDeleteBlog' ) );
58
  add_action( 'add_user_to_blog', array( $this, 'EventUserAddedToBlog' ), 10, 3 );
59
  add_action( 'remove_user_from_blog', array( $this, 'EventUserRemovedFromBlog' ), 10, 2 );
60
+ add_action( 'update_site_option_registration', array( $this, 'on_network_registration_option_change'), 10, 4 );
61
+ }
62
+
63
+ /**
64
+ * Fires when the network registration option is updated.
65
+ *
66
+ * @since 4.1.5
67
+ *
68
+ * @param string $option Name of the network option.
69
+ * @param mixed $value Current value of the network option.
70
+ * @param mixed $old_value Old value of the network option.
71
+ * @param int $network_id ID of the network.
72
+ */
73
+ public function on_network_registration_option_change( $option, $value, $old_value, $network_id ) {
74
+ $this->plugin->alerts->Trigger(
75
+ 7012,
76
+ array(
77
+ 'previous_setting' => $old_value,
78
+ 'new_setting' => $value
79
+ )
80
+ );
81
  }
82
 
83
  /**
classes/Sensors/PhpErrors.php CHANGED
@@ -161,7 +161,7 @@ class WSAL_Sensors_PhpErrors extends WSAL_AbstractSensor {
161
  return;
162
  }
163
 
164
- if ( ! ! ($e = error_get_last()) && ($this->_maybe_last_error != $this->GetErrorHash( $e['type'], $e['message'], $e['file'], $e['line'] )) ) {
165
  $data = array(
166
  'Code' => $e['type'],
167
  'Message' => $e['message'],
161
  return;
162
  }
163
 
164
+ if ( ($e = error_get_last()) && ($this->_maybe_last_error != $this->GetErrorHash( $e['type'], $e['message'], $e['file'], $e['line'] )) ) {
165
  $data = array(
166
  'Code' => $e['type'],
167
  'Message' => $e['message'],
classes/Sensors/PluginsThemes.php CHANGED
@@ -94,7 +94,7 @@ class WSAL_Sensors_PluginsThemes extends WSAL_AbstractSensor {
94
  if ( ! empty( $script_name ) ) {
95
  $actype = basename( $script_name, '.php' );
96
  }
97
- $is_themes = 'themes' === $actype;
98
  $is_plugins = 'plugins' === $actype;
99
 
100
  // Install plugin.
@@ -358,27 +358,11 @@ class WSAL_Sensors_PluginsThemes extends WSAL_AbstractSensor {
358
  } elseif ( isset( $post_array['themes'] ) ) {
359
  $themes = explode( ',', $post_array['themes'] );
360
  }
361
- if ( isset( $themes ) ) {
362
- foreach ( $themes as $theme_name ) {
363
- $theme = wp_get_theme( $theme_name );
364
- $this->plugin->alerts->Trigger(
365
- 5031,
366
- array(
367
- 'Theme' => (object) array(
368
- 'Name' => $theme->Name,
369
- 'ThemeURI' => $theme->ThemeURI,
370
- 'Description' => $theme->Description,
371
- 'Author' => $theme->Author,
372
- 'Version' => $theme->Version,
373
- 'get_template_directory' => $theme->get_template_directory(),
374
- ),
375
- )
376
- );
377
-
378
- // Set theme to skip file changes alert.
379
- $this->skip_theme_change_alerts( $theme_name );
380
- }
381
- }
382
  }
383
 
384
  // Install theme.
@@ -499,23 +483,6 @@ class WSAL_Sensors_PluginsThemes extends WSAL_AbstractSensor {
499
  }
500
  }
501
 
502
- /**
503
- * Get editor link.
504
- *
505
- * @param object $post - The post object.
506
- * @return array $editor_link name and value link.
507
- */
508
- private function GetEditorLink( $post ) {
509
- $name = 'EditorLink';
510
- $name .= ( 'page' == $post->post_type ) ? 'Page' : 'Post';
511
- $value = get_edit_post_link( $post->ID );
512
- $editor_link = array(
513
- 'name' => $name,
514
- 'value' => $value,
515
- );
516
- return $editor_link;
517
- }
518
-
519
  /**
520
  * Method: Remove the PHP file after `/` in the plugin
521
  * directory name.
@@ -567,22 +534,23 @@ class WSAL_Sensors_PluginsThemes extends WSAL_AbstractSensor {
567
  *
568
  * @param string $theme_name - Theme name.
569
  *
570
- * @return WP_Theme
571
  */
572
  public static function get_theme_by_name( $theme_name ) {
573
  // Check if $theme_name is empty.
574
  if ( empty( $theme_name ) ) {
575
- return;
576
  }
577
 
578
  // Get all themes.
579
  $all_themes = wp_get_themes();
580
 
581
- $theme = '';
582
  if ( ! empty( $all_themes ) ) {
583
- foreach ( $all_themes as $stylesheet => $theme_obj ) {
584
- if ( $theme_name === $theme_obj->Name ) {
585
  $theme = $theme_obj;
 
586
  }
587
  }
588
  }
@@ -701,4 +669,33 @@ class WSAL_Sensors_PluginsThemes extends WSAL_AbstractSensor {
701
  )
702
  );
703
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
704
  }
94
  if ( ! empty( $script_name ) ) {
95
  $actype = basename( $script_name, '.php' );
96
  }
97
+
98
  $is_plugins = 'plugins' === $actype;
99
 
100
  // Install plugin.
358
  } elseif ( isset( $post_array['themes'] ) ) {
359
  $themes = explode( ',', $post_array['themes'] );
360
  }
361
+ if ( isset( $themes ) ) {
362
+ foreach ( $themes as $theme_name ) {
363
+ WSAL_Sensors_PluginsThemes::LogThemeUpdatedEvent( $theme_name );
364
+ }
365
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
366
  }
367
 
368
  // Install theme.
483
  }
484
  }
485
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
486
  /**
487
  * Method: Remove the PHP file after `/` in the plugin
488
  * directory name.
534
  *
535
  * @param string $theme_name - Theme name.
536
  *
537
+ * @return WP_Theme|null
538
  */
539
  public static function get_theme_by_name( $theme_name ) {
540
  // Check if $theme_name is empty.
541
  if ( empty( $theme_name ) ) {
542
+ return null;
543
  }
544
 
545
  // Get all themes.
546
  $all_themes = wp_get_themes();
547
 
548
+ $theme = null;
549
  if ( ! empty( $all_themes ) ) {
550
+ foreach ( $all_themes as $theme_slug => $theme_obj ) {
551
+ if ( $theme_name === $theme_slug|| $theme_name === $theme_obj->get('Name') ) {
552
  $theme = $theme_obj;
553
+ break;
554
  }
555
  }
556
  }
669
  )
670
  );
671
  }
672
+
673
+ /**
674
+ * Log theme updated event.
675
+ *
676
+ * @param string $theme_name Theme name.
677
+ *
678
+ * @since 4.1.5
679
+ */
680
+ public static function LogThemeUpdatedEvent( $theme_name ) {
681
+ $theme = WSAL_Sensors_PluginsThemes::get_theme_by_name($theme_name);
682
+ if ( ! $theme instanceof WP_Theme ) {
683
+ return;
684
+ }
685
+
686
+ $wsal = WpSecurityAuditLog::GetInstance();
687
+ $wsal->alerts->Trigger(
688
+ 5031,
689
+ array(
690
+ 'Theme' => (object) array(
691
+ 'Name' => $theme->Name,
692
+ 'ThemeURI' => $theme->ThemeURI,
693
+ 'Description' => $theme->Description,
694
+ 'Author' => $theme->Author,
695
+ 'Version' => $theme->Version,
696
+ 'get_template_directory' => $theme->get_template_directory(),
697
+ ),
698
+ )
699
+ );
700
+ }
701
  }
classes/Sensors/Public.php CHANGED
@@ -20,401 +20,44 @@ if ( ! defined( 'ABSPATH' ) ) {
20
  */
21
  class WSAL_Sensors_Public extends WSAL_AbstractSensor {
22
 
23
- /**
24
- * Visitor Events.
25
- *
26
- * @var boolean
27
- */
28
- protected $visitor_events;
29
-
30
- /**
31
- * Old Product Stock Quantity.
32
- *
33
- * @var int
34
- */
35
- protected $_old_stock = null;
36
-
37
- /**
38
- * Old Product Stock Status.
39
- *
40
- * @var string
41
- */
42
- protected $_old_stock_status = null;
43
-
44
  /**
45
  * Listening to events using WP hooks.
46
  */
47
  public function HookEvents() {
48
- // Hook the events if user is logged in OR if user is not logged in and visitor events are allowed to load.
49
- if ( is_user_logged_in() ) {
50
- add_action( 'user_register', array( $this, 'event_user_register' ) );
51
-
52
- // Check if WooCommerce plugin exists.
53
- if ( WpSecurityAuditLog::is_woocommerce_active() ) {
54
- add_action( 'woocommerce_new_order', array( $this, 'event_new_order' ), 10, 1 );
55
- add_filter( 'woocommerce_order_item_quantity', array( $this, 'set_old_stock' ), 10, 3 );
56
- add_filter( 'woocommerce_update_product_stock_query', array( $this, 'set_old_stock_for_orders' ), 10, 3 );
57
- add_action( 'woocommerce_product_set_stock', array( $this, 'product_stock_changed' ), 10, 1 );
58
- add_action( 'woocommerce_variation_set_stock', array( $this, 'product_stock_changed' ), 10, 1 );
59
- }
60
- }
61
  }
62
 
63
  /**
64
  * Triggered when a user is registered.
65
  *
 
 
 
66
  * @param int $user_id - User ID of the registered user.
67
  */
68
  public function event_user_register( $user_id ) {
 
69
  $user = get_userdata( $user_id );
70
- $ismu = function_exists( 'is_multisite' ) && is_multisite();
71
- $event = $ismu ? 4012 : ( is_user_logged_in() ? 4001 : 4000 );
72
  $current_user = wp_get_current_user();
73
 
74
- $this->plugin->alerts->Trigger(
75
- $event,
76
- array(
77
- 'NewUserID' => $user_id,
78
- 'UserChanger' => ! empty( $current_user ) ? $current_user->user_login : '',
79
- 'NewUserData' => (object) array(
80
- 'Username' => $user->user_login,
81
- 'FirstName' => $user->user_firstname,
82
- 'LastName' => $user->user_lastname,
83
- 'Email' => $user->user_email,
84
- 'Roles' => is_array( $user->roles ) ? implode( ', ', $user->roles ) : $user->roles,
85
- ),
86
- 'EditUserLink' => add_query_arg( 'user_id', $user_id, admin_url( 'user-edit.php' ) ),
87
- ),
88
- true
89
  );
90
- }
91
 
92
- /**
93
- * Shows the username if the comment is owned by a user
94
- * and the email if the comment was posted by a non WordPress user
95
- *
96
- * @param WP_Comment $comment – WP Comment object.
97
- * @return string – Author username or email.
98
- */
99
- private function check_author( $comment ) {
100
- if ( username_exists( $comment->comment_author ) ) {
101
- return $comment->comment_author;
102
- } else {
103
- return $comment->comment_author_email;
104
  }
105
- }
106
-
107
- /**
108
- * Get editor link.
109
- *
110
- * @since 3.3.1
111
- *
112
- * @param WP_Post $post - Product post object.
113
- * @return array $editor_link - Name and value link.
114
- */
115
- private function get_editor_link( $post ) {
116
- // Meta value key.
117
- if ( 'shop_order' === $post->post_type ) {
118
- $name = 'EditorLinkOrder';
119
- } else {
120
- $name = 'EditorLinkProduct';
121
- }
122
-
123
- // Get editor post link URL.
124
- $value = get_edit_post_link( $post->ID );
125
-
126
- // If the URL is not empty then set values.
127
- if ( ! empty( $value ) ) {
128
- $editor_link = array(
129
- 'name' => $name, // Meta key.
130
- 'value' => $value, // Meta value.
131
- );
132
- } else {
133
- // Get post object.
134
- $post = get_post( $post->ID );
135
-
136
- // Set URL action.
137
- if ( 'revision' === $post->post_type ) {
138
- $action = '';
139
- } else {
140
- $action = '&action=edit';
141
- }
142
-
143
- // Get and check post type object.
144
- $post_type_object = get_post_type_object( $post->post_type );
145
- if ( ! $post_type_object ) {
146
- return;
147
- }
148
-
149
- // Set editor link manually.
150
- if ( $post_type_object->_edit_link ) {
151
- $link = admin_url( sprintf( $post_type_object->_edit_link . $action, $post->ID ) );
152
- } else {
153
- $link = '';
154
- }
155
-
156
- $editor_link = array(
157
- 'name' => $name, // Meta key.
158
- 'value' => $link, // Meta value.
159
- );
160
- }
161
-
162
- return $editor_link;
163
- }
164
-
165
- /**
166
- * Formulate Order Title as done by WooCommerce.
167
- *
168
- * @since 3.3.1
169
- *
170
- * @param int|WC_Order $order - Order id or WC Order object.
171
- * @return string
172
- */
173
- private function get_order_title( $order ) {
174
- if ( ! $order ) {
175
- return false;
176
- }
177
- if ( is_int( $order ) ) {
178
- $order = new WC_Order( $order );
179
- }
180
- if ( ! $order instanceof WC_Order ) {
181
- return false;
182
- }
183
-
184
- if ( $order->get_billing_first_name() || $order->get_billing_last_name() ) {
185
- $buyer = trim( sprintf( '%1$s %2$s', $order->get_billing_first_name(), $order->get_billing_last_name() ) );
186
- } elseif ( $order->get_billing_company() ) {
187
- $buyer = trim( $order->get_billing_company() );
188
- } elseif ( $order->get_customer_id() ) {
189
- $user = get_user_by( 'id', $order->get_customer_id() );
190
- $buyer = ucwords( $user->display_name );
191
- }
192
- return '#' . $order->get_order_number() . ' ' . $buyer;
193
- }
194
-
195
- /**
196
- * New WooCommerce Order Event.
197
- *
198
- * @since 3.3.1
199
- *
200
- * @param integer $order_id – Order id.
201
- */
202
- public function event_new_order( $order_id ) {
203
- if ( empty( $order_id ) ) {
204
- return;
205
- }
206
-
207
- // Get order object.
208
- $new_order = new WC_Order( $order_id );
209
 
210
- if ( $new_order && $new_order instanceof WC_Order ) {
211
- $order_post = get_post( $order_id ); // Get order post object.
212
- $order_title = ( null !== $order_post && $order_post instanceof WP_Post ) ? $order_post->post_title : false;
213
- $editor_link = $this->get_editor_link( $order_post );
214
- $this->plugin->alerts->Trigger(
215
- 9035,
216
- array(
217
- 'OrderID' => $order_id,
218
- 'OrderTitle' => $this->get_order_title( $new_order ),
219
- 'OrderStatus' => $new_order->get_status(),
220
- $editor_link['name'] => $editor_link['value'],
221
- )
222
- );
223
- }
224
- }
225
-
226
- /**
227
- * Triggered before updating stock quantity on customer order.
228
- *
229
- * @since 3.3.1
230
- *
231
- * @param int $order_quantity - Order quantity.
232
- * @param WC_Order $order - Order object.
233
- * @param WC_Order_Item $item - Order item object.
234
- * @return int - Order quantity.
235
- */
236
- public function set_old_stock( $order_quantity, $order, $item ) {
237
- // Get product from order item.
238
- $product = $item->get_product();
239
-
240
- // Get product id.
241
- $product_id_with_stock = $product->get_stock_managed_by_id();
242
-
243
- // Get product with stock.
244
- $product_with_stock = wc_get_product( $product_id_with_stock );
245
-
246
- // Set stock attributes of the product.
247
- $this->_old_stock = $product_with_stock->get_stock_quantity();
248
- $this->_old_stock_status = $product_with_stock->get_stock_status();
249
-
250
- // Return original stock quantity.
251
- return $order_quantity;
252
- }
253
-
254
- /**
255
- * Triggered before updating stock quantity on customer order from admin panel.
256
- *
257
- * @param string $sql - Stock update SQL query.
258
- * @param integer $product_id - Product id.
259
- * @return string
260
- */
261
- public function set_old_stock_for_orders( $sql, $product_id ) {
262
- $old_product = wc_get_product( $product_id );
263
-
264
- // Set stock attributes of the product.
265
- $this->_old_stock = $old_product->get_stock_quantity();
266
- $this->_old_stock_status = $old_product->get_stock_status();
267
-
268
- // Return the original sql.
269
- return $sql;
270
- }
271
-
272
- /**
273
- * Triggered when stock of a product is changed.
274
- *
275
- * @since 3.3.1
276
- *
277
- * @param WC_Product $product - WooCommerce product object.
278
- */
279
- public function product_stock_changed( $product ) {
280
- if ( is_null( $this->_old_stock ) && is_null( $this->_old_stock_status ) ) {
281
- return;
282
- }
283
-
284
- // Get product data.
285
- $product_status = false;
286
-
287
- if ( $product->is_type( 'variation' ) ) {
288
- $product_id = $product->get_parent_id();
289
- $product_title = $product->get_name(); // Get product title.
290
- $product_status = $product->get_status();
291
- } else {
292
- $product_id = $product->get_id();
293
- $product_title = $product->get_title(); // Get product title.
294
- }
295
-
296
- // Return if current screen is edit post page.
297
- global $pagenow;
298
-
299
- // Get global $_POST array.
300
- $post_array = filter_input_array( INPUT_POST );
301
-
302
- // Special conditions for WooCommerce Bulk Stock Management.
303
- if ( 'edit.php' === $pagenow && isset( $post_array['page'] ) && 'woocommerce-bulk-stock-management' === $post_array['page'] ) {
304
- $old_acc_stock = isset( $post_array['current_stock_quantity'] ) ? $post_array['current_stock_quantity'] : false;
305
- $new_acc_stock = isset( $post_array['stock_quantity'] ) ? $post_array['stock_quantity'] : false;
306
-
307
- // Get old stock quantity.
308
- $old_stock = ! empty( $this->_old_stock ) ? $this->_old_stock : $old_acc_stock[ $product_id ];
309
-
310
- // Following cases handle the stock status.
311
- if ( '0' === $old_acc_stock[ $product_id ] && '0' !== $new_acc_stock[ $product_id ] ) {
312
- $old_stock_status = 'outofstock';
313
- } elseif ( '0' !== $old_acc_stock[ $product_id ] && '0' === $new_acc_stock[ $product_id ] ) {
314
- $old_stock_status = 'instock';
315
- } elseif ( '0' === $old_acc_stock[ $product_id ] && '0' === $new_acc_stock[ $product_id ] ) {
316
- $old_stock_status = 'outofstock';
317
- } elseif ( '0' !== $old_acc_stock[ $product_id ] && '0' !== $new_acc_stock[ $product_id ] ) {
318
- $old_stock_status = 'instock';
319
- } else {
320
- $old_stock_status = '';
321
- }
322
- } else {
323
- $old_stock = $this->_old_stock; // Get old stock quantity.
324
- $old_stock_status = $this->_old_stock_status; // Get old stock status.
325
- }
326
-
327
- $new_stock = $product->get_stock_quantity(); // Get new stock quantity.
328
- $new_stock_status = $product->get_stock_status(); // Get new stock status.
329
-
330
- // Set post object.
331
- $post = get_post( $product_id );
332
-
333
- // Set username.
334
- $username = '';
335
- if ( ! is_user_logged_in() ) {
336
- $username = 'Unregistered user';
337
- } else {
338
- $username = wp_get_current_user()->user_login;
339
- }
340
-
341
- // If stock status has changed then trigger the alert.
342
- if ( ( $old_stock_status && $new_stock_status ) && ( $old_stock_status !== $new_stock_status ) ) {
343
- $editor_link = $this->get_editor_link( $post );
344
- $this->plugin->alerts->Trigger(
345
- 9018,
346
- array(
347
- 'PostID' => $post->ID,
348
- 'ProductTitle' => $product_title,
349
- 'ProductStatus' => ! $product_status ? $post->post_status : $product_status,
350
- 'OldStatus' => $this->get_stock_status( $old_stock_status ),
351
- 'NewStatus' => $this->get_stock_status( $new_stock_status ),
352
- 'Username' => $username,
353
- $editor_link['name'] => $editor_link['value'],
354
- )
355
- );
356
- }
357
-
358
- $wc_all_stock_changes = $this->plugin->GetGlobalBooleanSetting( 'wc-all-stock-changes', true );
359
-
360
- // If stock has changed then trigger the alert.
361
- if ( ( $old_stock !== $new_stock ) && ( $wc_all_stock_changes ) ) {
362
- $editor_link = $this->get_editor_link( $post );
363
-
364
- // Check if this was done via an order by looking for event 9035.
365
- // If so, we are going to add its data.
366
- $query = new WSAL_Models_OccurrenceQuery();
367
- $query->addOrderBy( 'created_on', true );
368
- $query->setLimit( 1 );
369
- $last_occurence = $query->getAdapter()->Execute( $query );
370
- if ( isset( $last_occurence[0] ) && 9035 === $last_occurence[0]->alert_id ) {
371
- $latest_event = $this->plugin->alerts->get_latest_events();
372
- $latest_event = isset( $latest_event[0] ) ? $latest_event[0] : false;
373
- $event_meta = $latest_event ? $latest_event->GetMetaArray() : false;
374
- $order_id = isset( $event_meta['OrderID'] ) ? $event_meta['OrderID'] : false;
375
- $order_title = isset( $event_meta['OrderTitle'] ) ? $event_meta['OrderTitle'] : false;
376
- } else {
377
- $order_id = false;
378
- $order_title = false;
379
- }
380
-
381
- /**
382
- * Event was changed from 9019 to 9105
383
- *
384
- * @since 4.0.3
385
- */
386
- $this->plugin->alerts->Trigger(
387
- 9105,
388
- array(
389
- 'PostID' => $post->ID,
390
- 'ProductTitle' => $product_title,
391
- 'ProductStatus' => ! $product_status ? $post->post_status : $product_status,
392
- 'OldValue' => ! empty( $old_stock ) ? $old_stock : 0,
393
- 'NewValue' => $new_stock,
394
- 'Username' => $username,
395
- 'StockOrderID' => $order_id,
396
- 'Username' => $username,
397
- $editor_link['name'] => $editor_link['value'],
398
- )
399
- );
400
- }
401
- }
402
 
403
- /**
404
- * Get Stock Status Name.
405
- *
406
- * @since 3.3.1
407
- *
408
- * @param string $slug - Stock slug.
409
- * @return string
410
- */
411
- private function get_stock_status( $slug ) {
412
- if ( 'instock' === $slug ) {
413
- return __( 'In stock', 'wp-security-audit-log' );
414
- } elseif ( 'outofstock' === $slug ) {
415
- return __( 'Out of stock', 'wp-security-audit-log' );
416
- } elseif ( 'onbackorder' === $slug ) {
417
- return __( 'On backorder', 'wp-security-audit-log' );
418
- }
419
  }
420
  }
20
  */
21
  class WSAL_Sensors_Public extends WSAL_AbstractSensor {
22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  /**
24
  * Listening to events using WP hooks.
25
  */
26
  public function HookEvents() {
27
+ add_action( 'user_register', array( $this, 'event_user_register' ) );
 
 
 
 
 
 
 
 
 
 
 
 
28
  }
29
 
30
  /**
31
  * Triggered when a user is registered.
32
  *
33
+ * This function is identical to function WSAL_Sensors_FrontendRegister::event_user_register. We will keep the
34
+ * duplication until some autoloading improvements are made.
35
+ *
36
  * @param int $user_id - User ID of the registered user.
37
  */
38
  public function event_user_register( $user_id ) {
39
+ $plugin = WpSecurityAuditLog::GetInstance();
40
  $user = get_userdata( $user_id );
41
+ $event = $plugin->IsMultisite() ? 4012 : ( is_user_logged_in() ? 4001 : 4000 );
 
42
  $current_user = wp_get_current_user();
43
 
44
+ $new_user_data = array(
45
+ 'Username' => $user->user_login,
46
+ 'Email' => $user->user_email,
47
+ 'Roles' => is_array( $user->roles ) ? implode( ', ', $user->roles ) : $user->roles,
 
 
 
 
 
 
 
 
 
 
 
48
  );
 
49
 
50
+ if ( 4000 != $event ) {
51
+ $new_user_data['FirstName'] = ! empty( $user->user_firstname ) ? $user->user_firstname : '';
52
+ $new_user_data['LastName'] = ! empty( $user->user_lastname ) ? $user->user_lastname : '';
 
 
 
 
 
 
 
 
 
53
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
 
55
+ $event_data = array(
56
+ 'NewUserID' => $user_id,
57
+ 'UserChanger' => ! empty( $current_user ) ? $current_user->user_login : '',
58
+ 'NewUserData' => (object) $new_user_data,
59
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
 
61
+ $plugin->alerts->Trigger( $event, $event_data, true );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  }
63
  }
classes/Sensors/System.php CHANGED
@@ -22,7 +22,6 @@ if ( ! defined( 'ABSPATH' ) ) {
22
  * 6003 WordPress Administrator Notification email changed
23
  * 6004 WordPress was updated
24
  * 6005 User changes the WordPress Permalinks
25
- * 6007 User requests non-existing pages (404 Error Pages)
26
  * 8009 User changed forum's role
27
  * 8010 User changed option of a forum
28
  * 8012 User changed time to disallow post editing
@@ -46,49 +45,14 @@ if ( ! defined( 'ABSPATH' ) ) {
46
  */
47
  class WSAL_Sensors_System extends WSAL_AbstractSensor {
48
 
49
- const SCHEDULED_HOOK_LOG_FILE_PRUDING = 'wsal_log_files_pruning';
50
- /**
51
- * 404 User Transient.
52
- *
53
- * WordPress will prefix the name with "_transient_"
54
- * or "_transient_timeout_" in the options table.
55
- */
56
- const TRANSIENT_404 = 'wsal-404-attempts';
57
-
58
  /**
59
  * Listening to events using WP hooks.
60
  */
61
  public function HookEvents() {
62
  add_action( 'wsal_prune', array( $this, 'EventPruneEvents' ), 10, 2 );
63
  add_action( 'admin_init', array( $this, 'EventAdminInit' ) );
64
-
65
  add_action( 'automatic_updates_complete', array( $this, 'WPUpdate' ), 10, 1 );
66
 
67
- add_filter( 'template_redirect', array( $this, 'Event404' ) );
68
-
69
- // get the logging location.
70
- $custom_logging_path_base = $this->plugin->settings()->get_working_dir_path( '404s' );
71
- if ( ! is_wp_error( $custom_logging_path_base ) ) {
72
- if ( ! file_exists( $custom_logging_path_base . 'index.php' ) ) {
73
- // make an empty index.php in the directory.
74
- @file_put_contents( $custom_logging_path_base . 'index.php', '<?php // Silence is golden' );
75
- }
76
-
77
- // Directory for logged in users log files.
78
- $user_upload_path = $custom_logging_path_base . 'users' . DIRECTORY_SEPARATOR;
79
- $this->remove_sub_directories( $user_upload_path ); // Remove it.
80
-
81
- // Directory for visitor log files.
82
- $visitor_upload_path = $custom_logging_path_base . 'visitors' . DIRECTORY_SEPARATOR;
83
- $this->remove_sub_directories( $visitor_upload_path ); // Remove it.
84
- }
85
-
86
- if ( ! wp_next_scheduled( self::SCHEDULED_HOOK_LOG_FILE_PRUDING ) ) {
87
- wp_schedule_event( time(), 'daily', self::SCHEDULED_HOOK_LOG_FILE_PRUDING );
88
- }
89
-
90
- // Cron Job 404 log files pruning.
91
- add_action( self::SCHEDULED_HOOK_LOG_FILE_PRUDING, array( $this, 'LogFilesPruning' ) );
92
  // whitelist options.
93
  add_action( 'allowed_options', array( $this, 'EventOptions' ), 10, 1 );
94
 
@@ -96,33 +60,6 @@ class WSAL_Sensors_System extends WSAL_AbstractSensor {
96
  add_action( 'update_option_admin_email', array( $this, 'admin_email_changed' ), 10, 3 );
97
  }
98
 
99
- /**
100
- * Check if failed login directory exists then delete all
101
- * files within this directory and remove the directory itself.
102
- *
103
- * @param string $sub_dir - Subdirectory.
104
- */
105
- public function remove_sub_directories( $sub_dir ) {
106
- // Check if subdirectory exists.
107
- if ( is_dir( $sub_dir ) ) {
108
- // Get all files inside failed logins folder.
109
- $files = glob( $sub_dir . '*' );
110
-
111
- if ( ! empty( $files ) ) {
112
- // Unlink each file.
113
- foreach ( $files as $file ) {
114
- // Check if valid file.
115
- if ( is_file( $file ) ) {
116
- // Delete the file.
117
- unlink( $file );
118
- }
119
- }
120
- }
121
- // Remove the directory.
122
- rmdir( $sub_dir );
123
- }
124
- }
125
-
126
  /**
127
  * Alert: Admin email changed.
128
  *
@@ -164,178 +101,6 @@ class WSAL_Sensors_System extends WSAL_AbstractSensor {
164
  );
165
  }
166
 
167
- /**
168
- * 404 limit count.
169
- *
170
- * @return integer limit
171
- */
172
- protected function Get404LogLimit() {
173
- return $this->plugin->settings()->Get404LogLimit();
174
- }
175
-
176
- /**
177
- * Expiration of the transient saved in the WP database.
178
- *
179
- * @return integer Time until expiration in seconds from now
180
- */
181
- protected function Get404Expiration() {
182
- return 24 * 60 * 60;
183
- }
184
-
185
- /**
186
- * Check 404 limit.
187
- *
188
- * @param integer $site_id - Blog ID.
189
- * @param string $username - Username.
190
- * @param string $ip - IP address.
191
- * @return boolean passed limit true|false
192
- */
193
- protected function IsPast404Limit( $site_id, $username, $ip ) {
194
- $get_fn = $this->IsMultisite() ? 'get_site_transient' : 'get_transient';
195
- $data = $get_fn( self::TRANSIENT_404 );
196
- return ( false !== $data ) && isset( $data[ $site_id . ':' . $username . ':' . $ip ] ) && ( $data[ $site_id . ':' . $username . ':' . $ip ] > $this->Get404LogLimit() );
197
- }
198
-
199
- /**
200
- * Increment 404 limit.
201
- *
202
- * @param integer $site_id - Blog ID.
203
- * @param string $username - Username.
204
- * @param string $ip - IP address.
205
- */
206
- protected function Increment404( $site_id, $username, $ip ) {
207
- $get_fn = $this->IsMultisite() ? 'get_site_transient' : 'get_transient';
208
- $set_fn = $this->IsMultisite() ? 'set_site_transient' : 'set_transient';
209
-
210
- $data = $get_fn( self::TRANSIENT_404 );
211
- if ( ! $data ) {
212
- $data = array();
213
- }
214
- if ( ! isset( $data[ $site_id . ':' . $username . ':' . $ip ] ) ) {
215
- $data[ $site_id . ':' . $username . ':' . $ip ] = 1;
216
- }
217
- $data[ $site_id . ':' . $username . ':' . $ip ]++;
218
- $set_fn( self::TRANSIENT_404, $data, $this->Get404Expiration() );
219
- }
220
-
221
- /**
222
- * Event 404 Not found.
223
- */
224
- public function Event404() {
225
- $attempts = 1;
226
-
227
- global $wp_query;
228
- if ( ! $wp_query->is_404 ) {
229
- return;
230
- }
231
- $msg = 'times';
232
-
233
- list( $y, $m, $d ) = explode( '-', date( 'Y-m-d' ) );
234
-
235
- $site_id = ( function_exists( 'get_current_blog_id' ) ? get_current_blog_id() : 0 );
236
- $ip = $this->plugin->settings()->GetMainClientIP();
237
-
238
- if ( ! is_user_logged_in() ) {
239
- $username = 'Unregistered user';
240
- } else {
241
- $username = wp_get_current_user()->user_login;
242
- }
243
-
244
- // Request URL.
245
- $request_uri = filter_input( INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_STRING );
246
- if ( ! empty( $request_uri ) ) {
247
- $url_404 = home_url() . $request_uri;
248
- } elseif ( isset( $_SERVER['REQUEST_URI'] ) && ! empty( $_SERVER['REQUEST_URI'] ) ) {
249
- $url_404 = home_url() . sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) );
250
- }
251
-
252
- // Remove forward slash from the URL.
253
- $url_404 = untrailingslashit( $url_404 );
254
-
255
- // Check for excluded 404 URls.
256
- if ( $this->is_excluded_url( $url_404 ) ) {
257
- return;
258
- }
259
-
260
- if ( 'Unregistered user' !== $username ) {
261
- // Check if the alert is disabled from the "Enable/Disable Alerts" section.
262
- if ( ! $this->plugin->alerts->IsEnabled( 6007 ) ) {
263
- return;
264
- }
265
-
266
- if ( $this->IsPast404Limit( $site_id, $username, $ip ) ) {
267
- return;
268
- }
269
-
270
- $obj_occurrence = new WSAL_Models_Occurrence();
271
-
272
- $occ = $obj_occurrence->CheckAlert404(
273
- array(
274
- $ip,
275
- $username,
276
- 6007,
277
- $site_id,
278
- mktime( 0, 0, 0, $m, $d, $y ),
279
- mktime( 0, 0, 0, $m, $d + 1, $y ) - 1,
280
- )
281
- );
282
-
283
- $occ = count( $occ ) ? $occ[0] : null;
284
- if ( ! empty( $occ ) ) {
285
- // Update existing record.
286
- $this->Increment404( $site_id, $username, $ip );
287
- $new = ( (int) $occ->GetMetaValue( 'Attempts', 0 ) ) + 1;
288
-
289
- if ( $new > $this->Get404LogLimit() ) {
290
- $new = 'more than ' . $this->Get404LogLimit();
291
- $msg .= ' This could possible be a scan, therefore keep an eye on the activity from this IP Address';
292
- }
293
-
294
- $link_file = $this->WriteLog( $new, $ip, $username, true, $url_404 );
295
-
296
- $occ->UpdateMetaValue( 'Attempts', $new );
297
- $occ->UpdateMetaValue( 'Username', $username );
298
- $occ->UpdateMetaValue( 'Msg', $msg );
299
- $occ->UpdateMetaValue( 'URL', $url_404 );
300
- if ( ! empty( $link_file ) ) {
301
- $occ->UpdateMetaValue( 'LinkFile', $link_file );
302
- }
303
- $occ->created_on = null;
304
- $occ->Save();
305
- } else {
306
- $link_file = $this->WriteLog( 1, $ip, $username, true, $url_404 );
307
- // Create a new record.
308
- $fields = array(
309
- 'Attempts' => 1,
310
- 'Username' => $username,
311
- 'Msg' => $msg,
312
- 'URL' => $url_404,
313
- );
314
- if ( ! empty( $link_file ) ) {
315
- $fields['LinkFile'] = $link_file;
316
- }
317
- $this->plugin->alerts->Trigger( 6007, $fields );
318
- }
319
- }
320
- }
321
-
322
- /**
323
- * Method: Return true if URL is excluded otherwise false.
324
- *
325
- * @param string $url - 404 URL.
326
- * @return boolean
327
- * @since 3.2.2
328
- */
329
- public function is_excluded_url( $url ) {
330
- if ( empty( $url ) ) {
331
- return false;
332
- }
333
-
334
- if ( in_array( $url, $this->plugin->settings()->get_excluded_urls() ) ) {
335
- return true;
336
- }
337
- }
338
-
339
  /**
340
  * Triggered when a user accesses the admin area.
341
  */
@@ -522,54 +287,12 @@ class WSAL_Sensors_System extends WSAL_AbstractSensor {
522
  }
523
  }
524
 
525
- /**
526
- * Purge log files older than one month.
527
- */
528
- public function LogFilesPruning() {
529
- if ( $this->plugin->GetGlobalBooleanSetting( 'purge-404-log', false ) ) {
530
- $this->Prune404FilesByPrefix( '6007' );
531
- }
532
-
533
- if ( $this->plugin->GetGlobalBooleanSetting( 'purge-visitor-404-log', false ) ) {
534
- $this->Prune404FilesByPrefix( '6023' );
535
- }
536
- }
537
-
538
- /**
539
- * Deletes files in 404s log folder that start with a specific prefix.
540
- *
541
- * @param string $prefix
542
- * @since 4.1.3
543
- */
544
- private function Prune404FilesByPrefix( $prefix ) {
545
- // prevent deleting all files by accident when the prefix is empty or not what we expect
546
- if ( ! is_string( $prefix ) || empty( $prefix ) ) {
547
- return;
548
- }
549
-
550
- $custom_logging_path = $this->plugin->settings()->get_working_dir_path( '404s', true );
551
- if ( is_dir( $custom_logging_path ) ) {
552
- if ( $handle = opendir( $custom_logging_path ) ) {
553
- while ( false !== ( $entry = readdir( $handle ) ) ) {
554
- if ( '.' != $entry && '..' != $entry ) {
555
- if ( strpos( $entry, $prefix ) && file_exists( $custom_logging_path . $entry ) ) {
556
- $modified = filemtime( $custom_logging_path . $entry );
557
- if ( $modified < strtotime( '-4 weeks' ) ) {
558
- // Delete file.
559
- unlink( $custom_logging_path . $entry );
560
- }
561
- }
562
- }
563
- }
564
- closedir( $handle );
565
- }
566
- }
567
- }
568
-
569
  /**
570
  * Events from 6008 to 6018.
571
  *
572
  * @param array $whitelist - White list options.
 
 
573
  */
574
  public function EventOptions( $whitelist = null ) {
575
  // Filter global arrays for security.
@@ -694,134 +417,4 @@ class WSAL_Sensors_System extends WSAL_AbstractSensor {
694
  }
695
  return $whitelist;
696
  }
697
-
698
- /**
699
- * Write Log.
700
- *
701
- * Write a new line on 404 log file.
702
- * Folder: {plugin working folder}/404s/
703
- *
704
- * @param int $attempts - Number of attempt.
705
- * @param string $ip - IP address.
706
- * @param string $username - Username.
707
- * @param bool $logged_in - True if logged in.
708
- * @param string $url - 404 URL.
709
- *
710
- * @return string|null
711
- */
712
- private function WriteLog( $attempts, $ip, $username = '', $logged_in = true, $url = null ) {
713
- $name_file = null;
714
- if ( $logged_in && $this->plugin->GetGlobalBooleanSetting( 'log-404', false ) ) {
715
- // Get option to log referrer.
716
- $log_referrer = $this->plugin->GetGlobalBooleanSetting( 'log-404-referrer' );
717
-
718
- // Check localhost.
719
- if ( '127.0.0.1' == $ip || '::1' == $ip ) {
720
- $ip = 'localhost';
721
- }
722
-
723
- if ( $log_referrer ) {
724
- // Get the referer.
725
- $referrer = filter_input( INPUT_SERVER, 'HTTP_REFERER', FILTER_SANITIZE_STRING );
726
- if ( empty( $referrer ) && isset( $_SERVER['HTTP_REFERER'] ) && ! empty( $_SERVER['HTTP_REFERER'] ) ) {
727
- $referrer = sanitize_text_field( wp_unslash( $_SERVER['HTTP_REFERER'] ) );
728
- }
729
-
730
- // Data to write.
731
- $data = '';
732
-
733
- // Append IP if it exists.
734
- $data = ( $ip ) ? $ip . ',' : '';
735
-
736
- // Create/Append to the log file.
737
- $data = $data . 'Request URL ' . $url . ',Referer ' . $referrer . ',';
738
- } else {
739
- // Data to write.
740
- $data = '';
741
-
742
- // Append IP if it exists.
743
- $data = ( $ip ) ? $ip . ',' : '';
744
-
745
- // Create/Append to the log file.
746
- $data = $data . 'Request URL ' . $url . ',';
747
- }
748
-
749
- if ( ! is_user_logged_in() ) {
750
- $username = '';
751
- } else {
752
- $username = $username . '_';
753
- }
754
-
755
- // get the custom logging path from settings.
756
- $custom_logging_path = $this->plugin->settings()->get_working_dir_path( '404s' );
757
- if ( ! is_wp_error( $custom_logging_path ) ) {
758
- if ( ! file_exists( $custom_logging_path . 'index.php' ) ) {
759
- // make an empty index.php in the directory.
760
- @file_put_contents( $custom_logging_path . 'index.php', '<?php // Silence is golden' );
761
- }
762
-
763
- // Check directory.
764
- if ( $this->CheckDirectory( $custom_logging_path ) ) {
765
- $filename = '6007_' . date( 'Ymd' ) . '.log';
766
- $fp = $custom_logging_path . $filename;
767
- $custom_logging_url = $this->plugin->settings()->get_working_dir_url( '404s' );
768
- $name_file = $custom_logging_url . $filename;
769
- if ( ! $file = fopen( $fp, 'a' ) ) {
770
- $i = 1;
771
- $file_opened = false;
772
- do {
773
- $fp2 = substr( $fp, 0, - 4 ) . '_' . $i . '.log';
774
- if ( ! file_exists( $fp2 ) ) {
775
- if ( $file = fopen( $fp2, 'a' ) ) {
776
- $file_opened = true;
777
- $name_file = $custom_logging_url . substr( $name_file, 0, - 4 ) . '_' . $i . '.log';
778
- }
779
- } else {
780
- $latest_filename = $this->GetLastModified( $custom_logging_path, $filename );
781
- $fp_last = $custom_logging_path . $latest_filename;
782
- if ( $file = fopen( $fp_last, 'a' ) ) {
783
- $file_opened = true;
784
- $name_file = $custom_logging_url . $latest_filename;
785
- }
786
- }
787
- $i ++;
788
- } while ( ! $file_opened );
789
- }
790
- fwrite( $file, sprintf( "%s\n", $data ) );
791
- fclose( $file );
792
- }
793
- }
794
- }
795
- return $name_file;
796
- }
797
-
798
- /**
799
- * Get the latest file modified.
800
- *
801
- * @param string $uploads_dir_path - Uploads directory path.
802
- * @param string $filename - File name.
803
- * @return string $latest_filename - File name.
804
- */
805
- private function GetLastModified( $uploads_dir_path, $filename ) {
806
- $filename = substr( $filename, 0, -4 );
807
- $latest_mtime = 0;
808
- $latest_filename = '';
809
- if ( $handle = opendir( $uploads_dir_path ) ) {
810
- while ( false !== ( $entry = readdir( $handle ) ) ) {
811
- if ( '.' != $entry && '..' != $entry ) {
812
- $entry = strip_tags( $entry ); // Strip HTML Tags.
813
- $entry = preg_replace( '/[\r\n\t ]+/', ' ', $entry ); // Remove Break/Tabs/Return Carriage.
814
- $entry = preg_replace( '/[\"\*\/\:\<\>\?\'\|]+/', ' ', $entry ); // Remove Illegal Chars for folder and filename.
815
- if ( preg_match( '/^' . $filename . '/i', $entry ) > 0 ) {
816
- if ( filemtime( $uploads_dir_path . $entry ) > $latest_mtime ) {
817
- $latest_mtime = filemtime( $uploads_dir_path . $entry );
818
- $latest_filename = $entry;
819
- }
820
- }
821
- }
822
- }
823
- closedir( $handle );
824
- }
825
- return $latest_filename;
826
- }
827
  }
22
  * 6003 WordPress Administrator Notification email changed
23
  * 6004 WordPress was updated
24
  * 6005 User changes the WordPress Permalinks
 
25
  * 8009 User changed forum's role
26
  * 8010 User changed option of a forum
27
  * 8012 User changed time to disallow post editing
45
  */
46
  class WSAL_Sensors_System extends WSAL_AbstractSensor {
47
 
 
 
 
 
 
 
 
 
 
48
  /**
49
  * Listening to events using WP hooks.
50
  */
51
  public function HookEvents() {
52
  add_action( 'wsal_prune', array( $this, 'EventPruneEvents' ), 10, 2 );
53
  add_action( 'admin_init', array( $this, 'EventAdminInit' ) );
 
54
  add_action( 'automatic_updates_complete', array( $this, 'WPUpdate' ), 10, 1 );
55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  // whitelist options.
57
  add_action( 'allowed_options', array( $this, 'EventOptions' ), 10, 1 );
58
 
60
  add_action( 'update_option_admin_email', array( $this, 'admin_email_changed' ), 10, 3 );
61
  }
62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  /**
64
  * Alert: Admin email changed.
65
  *
101
  );
102
  }
103
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  /**
105
  * Triggered when a user accesses the admin area.
106
  */
287
  }
288
  }
289
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
290
  /**
291
  * Events from 6008 to 6018.
292
  *
293
  * @param array $whitelist - White list options.
294
+ *
295
+ * @return array|null
296
  */
297
  public function EventOptions( $whitelist = null ) {
298
  // Filter global arrays for security.
417
  }
418
  return $whitelist;
419
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
420
  }
classes/Sensors/Widgets.php CHANGED
@@ -141,9 +141,11 @@ class WSAL_Sensors_Widgets extends WSAL_AbstractSensor {
141
  foreach ( $value as $k => &$widget_name ) {
142
  $widget_name = preg_replace( '/^([a-z]+-[0-9]+)+?_/i', '', $widget_name );
143
  }
 
144
  $request_sidebars[ $key ] = $value;
145
  }
146
  }
 
147
  }
148
 
149
  if ( $request_sidebars ) {
@@ -305,6 +307,9 @@ class WSAL_Sensors_Widgets extends WSAL_AbstractSensor {
305
  );
306
  }
307
  break;
 
 
 
308
  }
309
  }
310
  }
141
  foreach ( $value as $k => &$widget_name ) {
142
  $widget_name = preg_replace( '/^([a-z]+-[0-9]+)+?_/i', '', $widget_name );
143
  }
144
+ unset( $widget_name );
145
  $request_sidebars[ $key ] = $value;
146
  }
147
  }
148
+ unset( $value );
149
  }
150
 
151
  if ( $request_sidebars ) {
307
  );
308
  }
309
  break;
310
+ default:
311
+ // fallback for any other cases would go here
312
+ break;
313
  }
314
  }
315
  }
classes/Settings.php CHANGED
@@ -116,20 +116,12 @@ class WSAL_Settings {
116
  */
117
  protected $_excluded_ip = array();
118
 
119
- /**
120
- * URLs excluded from monitoring.
121
- *
122
- * @var array
123
- * @since 3.2.2
124
- */
125
- protected $excluded_urls = array();
126
-
127
  /**
128
  * Alerts enabled in Geek mode.
129
  *
130
  * @var array
131
  */
132
- public $geek_alerts = array( 1004, 1005, 1006, 1007, 2023, 2024, 2053, 2054, 2055, 2062, 2100, 2111, 2112, 2124, 2125, 2131, 2132, 2094, 2095, 2043, 2071, 2082, 2083, 2085, 2089, 4014, 4015, 4016, 5010, 5011, 5012, 5019, 5025, 5013, 5014, 5015, 5016, 5017, 5018, 5022, 5023, 5024, 6001, 6002, 6007, 6008, 6010, 6011, 6012, 6013, 6014, 6015, 6016, 6017, 6018, 6023, 6024, 6025 );
133
 
134
  /**
135
  * Current screen object.
@@ -165,7 +157,7 @@ class WSAL_Settings {
165
  ( array_key_exists('error', $upload_dir) && ! empty ( $upload_dir['error'] ) )
166
  ) {
167
  // fallback in case there is a problem with filesystem
168
- return '/wp-content/uploads/wp-activity-log/';
169
  }
170
 
171
  $result = $upload_dir['basedir'] . '/wp-activity-log/';
@@ -324,7 +316,7 @@ class WSAL_Settings {
324
  * @return boolean
325
  */
326
  public function IsAnyDevOptionEnabled() {
327
- return ! ! $this->_plugin->GetGlobalSetting( 'dev-options', null );
328
  }
329
 
330
  /**
@@ -857,6 +849,9 @@ class WSAL_Settings {
857
  // allow access only for super admins and admins
858
  $result = in_array('administrator', $user->roles) || ( function_exists( 'is_super_admin' ) && is_super_admin($user->ID) );
859
  break;
 
 
 
860
  }
861
  }
862
 
@@ -1082,31 +1077,6 @@ class WSAL_Settings {
1082
  return $this->_post_types;
1083
  }
1084
 
1085
- /**
1086
- * Set URLs excluded from monitoring.
1087
- *
1088
- * @param array $urls - Array of URLs.
1089
- * @since 3.2.2
1090
- */
1091
- public function set_excluded_urls( $urls ) {
1092
- $urls = array_map( 'untrailingslashit', $urls );
1093
- $urls = array_unique( $urls );
1094
- $this->excluded_urls = $urls;
1095
- $this->_plugin->SetGlobalSetting( 'excluded-urls', esc_html( implode( ',', $this->excluded_urls ) ) );
1096
- }
1097
-
1098
- /**
1099
- * Get URLs excluded from monitoring.
1100
- *
1101
- * @since 3.2.2
1102
- */
1103
- public function get_excluded_urls() {
1104
- if ( empty( $this->excluded_urls ) ) {
1105
- $this->excluded_urls = array_unique( array_filter( explode( ',', $this->_plugin->GetGlobalSetting( 'excluded-urls' ) ) ) );
1106
- }
1107
- return $this->excluded_urls;
1108
- }
1109
-
1110
  /**
1111
  * Set roles excluded from monitoring.
1112
  *
@@ -1379,33 +1349,6 @@ class WSAL_Settings {
1379
  return $this->_plugin->GetGlobalSetting( 'display-name' );
1380
  }
1381
 
1382
- public function Set404LogLimit( $value ) {
1383
- $this->_plugin->SetGlobalSetting( 'log-404-limit', abs( $value ) );
1384
- }
1385
-
1386
- public function Get404LogLimit() {
1387
- return $this->_plugin->GetGlobalSetting( 'log-404-limit', 99 );
1388
- }
1389
-
1390
- /**
1391
- * Sets the 404 log limit for visitor.
1392
- *
1393
- * @param int $value - 404 log limit.
1394
- * @since 2.6.3
1395
- */
1396
- public function SetVisitor404LogLimit( $value ) {
1397
- $this->_plugin->SetGlobalSetting( 'log-visitor-404-limit', abs( $value ) );
1398
- }
1399
-
1400
- /**
1401
- * Get the 404 log limit for visitor.
1402
- *
1403
- * @since 2.6.3
1404
- */
1405
- public function GetVisitor404LogLimit() {
1406
- return $this->_plugin->GetGlobalSetting( 'log-visitor-404-limit', 99 );
1407
- }
1408
-
1409
  /**
1410
  * Sets the log limit for failed login attempts.
1411
  *
@@ -1740,7 +1683,7 @@ class WSAL_Settings {
1740
 
1741
  case '%MetaLink%' == $name:
1742
  if ( ! empty( $value ) ) {
1743
- return "<a href=\"#\" data-disable-custom-nonce='" . wp_create_nonce( 'disable-custom-nonce' . $value ) . "' onclick=\"WsalDisableCustom(this, '" . $value . "');\"> Exclude Custom Field from the Monitoring</a>";
1744
  } else {
1745
  return '';
1746
  }
@@ -1785,23 +1728,6 @@ class WSAL_Settings {
1785
  return '<i>unknown</i>';
1786
  }
1787
 
1788
- case '%LinkFile%' === $name:
1789
- if ( ! $this->is_current_page( 'dashboard' ) ) {
1790
- if ( 'NULL' != $value ) {
1791
- $site_id = $this->get_view_site_id(); // Site id for multisite.
1792
- return '<a href="javascript:;" onclick="download_404_log( this )" data-log-file="' . esc_attr( $value ) . '" data-site-id="' . esc_attr( $site_id ) . '" data-nonce-404="' . esc_attr( wp_create_nonce( 'wsal-download-404-log-' . $value ) ) . '" title="' . esc_html__( 'Download the log file', 'wp-security-audit-log' ) . '">' . esc_html__( 'Download the log file', 'wp-security-audit-log' ) . '</a>';
1793
- } else {
1794
- return 'Click <a href="' . esc_url( add_query_arg( 'page', 'wsal-togglealerts', admin_url( 'admin.php' ) ) ) . '">here</a> to log such requests to file';
1795
- }
1796
- }
1797
- return '';
1798
-
1799
- case '%URL%' === $name:
1800
- if ( ! $this->is_current_page( 'dashboard' ) ) {
1801
- return ' or <a href="javascript:;" data-exclude-url="' . esc_url( $value ) . '" data-exclude-url-nonce="' . wp_create_nonce( 'wsal-exclude-url-' . $value ) . '" onclick="wsal_exclude_url( this )">exclude this URL</a> from being reported.';
1802
- }
1803
- return '';
1804
-
1805
  case '%PostUrlIfPlublished%' === $name:
1806
  // get connection.
1807
  $db_config = WSAL_Connector_ConnectorFactory::GetConfig(); // Get DB connector configuration.
@@ -1809,7 +1735,7 @@ class WSAL_Settings {
1809
  $wsal_db = $connector->getConnection(); // Get DB connection.
1810
  // get values needed.
1811
  $meta_adapter = new WSAL_Adapters_MySQL_Meta( $wsal_db );
1812
- $post_id = $meta_adapter->LoadByNameAndOccurenceId( 'PostID', $occ_id );
1813
  $occ_post = ( isset( $post_id['value'] ) ) ? get_post( $post_id['value'] ) : null;
1814
  // start with an empty string.
1815
  $return_value = '';
@@ -2374,19 +2300,15 @@ class WSAL_Settings {
2374
  */
2375
  public static function get_frontend_events() {
2376
  // Option defaults.
2377
- $is_woocommerce_active = WpSecurityAuditLog::is_woocommerce_active();
2378
  $default = array(
2379
  'register' => false,
2380
  'login' => false,
2381
- 'system' => false,
2382
- 'woocommerce' => $is_woocommerce_active,
2383
  );
2384
 
2385
  // Get the option.
2386
  $value = \WSAL\Helpers\Options::get_option_value_ignore_prefix( self::FRONT_END_EVENTS_OPTION_NAME, $default );
2387
 
2388
- // Check for WooCommerce in case it is not stored.
2389
- $value['woocommerce'] = ! isset( $value['woocommerce'] ) ? $is_woocommerce_active : $value['woocommerce'];
2390
  return $value;
2391
  }
2392
 
@@ -2396,7 +2318,7 @@ class WSAL_Settings {
2396
  * @param array $value - Option values.
2397
  * @return bool
2398
  */
2399
- public function set_frontend_events( $value = array() ) {
2400
  return \WSAL\Helpers\Options::set_option_value_ignore_prefix( self::FRONT_END_EVENTS_OPTION_NAME, $value);
2401
  }
2402
 
@@ -2442,4 +2364,16 @@ class WSAL_Settings {
2442
  return $this->_plugin->GetGlobalBooleanSetting( 'admin-blocking-plugins-support', false );
2443
  }
2444
 
 
 
 
 
 
 
 
 
 
 
 
 
2445
  }
116
  */
117
  protected $_excluded_ip = array();
118
 
 
 
 
 
 
 
 
 
119
  /**
120
  * Alerts enabled in Geek mode.
121
  *
122
  * @var array
123
  */
124
+ public $geek_alerts = array( 1004, 1005, 1006, 1007, 2023, 2024, 2053, 2054, 2055, 2062, 2100, 2111, 2112, 2124, 2125, 2131, 2132, 2094, 2095, 2043, 2071, 2082, 2083, 2085, 2089, 4014, 4015, 4016, 5010, 5011, 5012, 5019, 5025, 5013, 5014, 5015, 5016, 5017, 5018, 5022, 5023, 5024, 6001, 6002, 6008, 6010, 6011, 6012, 6013, 6014, 6015, 6016, 6017, 6018, 6024, 6025 );
125
 
126
  /**
127
  * Current screen object.
157
  ( array_key_exists('error', $upload_dir) && ! empty ( $upload_dir['error'] ) )
158
  ) {
159
  // fallback in case there is a problem with filesystem
160
+ return WP_CONTENT_DIR . '/uploads/wp-activity-log/';
161
  }
162
 
163
  $result = $upload_dir['basedir'] . '/wp-activity-log/';
316
  * @return boolean
317
  */
318
  public function IsAnyDevOptionEnabled() {
319
+ return ! empty( $this->_plugin->GetGlobalSetting( 'dev-options', [] ) );
320
  }
321
 
322
  /**
849
  // allow access only for super admins and admins
850
  $result = in_array('administrator', $user->roles) || ( function_exists( 'is_super_admin' ) && is_super_admin($user->ID) );
851
  break;
852
+ default:
853
+ // fallback for any other cases would go here
854
+ break;
855
  }
856
  }
857
 
1077
  return $this->_post_types;
1078
  }
1079
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1080
  /**
1081
  * Set roles excluded from monitoring.
1082
  *
1349
  return $this->_plugin->GetGlobalSetting( 'display-name' );
1350
  }
1351
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1352
  /**
1353
  * Sets the log limit for failed login attempts.
1354
  *
1683
 
1684
  case '%MetaLink%' == $name:
1685
  if ( ! empty( $value ) ) {
1686
+ return "<a href=\"#\" data-disable-custom-nonce='" . wp_create_nonce( 'disable-custom-nonce' . $value ) . "' onclick=\"return WsalDisableCustom(this, '" . $value . "');\"> Exclude Custom Field from the Monitoring</a>";
1687
  } else {
1688
  return '';
1689
  }
1728
  return '<i>unknown</i>';
1729
  }
1730
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1731
  case '%PostUrlIfPlublished%' === $name:
1732
  // get connection.
1733
  $db_config = WSAL_Connector_ConnectorFactory::GetConfig(); // Get DB connector configuration.
1735
  $wsal_db = $connector->getConnection(); // Get DB connection.
1736
  // get values needed.
1737
  $meta_adapter = new WSAL_Adapters_MySQL_Meta( $wsal_db );
1738
+ $post_id = $meta_adapter->LoadByNameAndOccurrenceId( 'PostID', $occ_id );
1739
  $occ_post = ( isset( $post_id['value'] ) ) ? get_post( $post_id['value'] ) : null;
1740
  // start with an empty string.
1741
  $return_value = '';
2300
  */
2301
  public static function get_frontend_events() {
2302
  // Option defaults.
 
2303
  $default = array(
2304
  'register' => false,
2305
  'login' => false,
2306
+ 'woocommerce' => false,
 
2307
  );
2308
 
2309
  // Get the option.
2310
  $value = \WSAL\Helpers\Options::get_option_value_ignore_prefix( self::FRONT_END_EVENTS_OPTION_NAME, $default );
2311
 
 
 
2312
  return $value;
2313
  }
2314
 
2318
  * @param array $value - Option values.
2319
  * @return bool
2320
  */
2321
+ public static function set_frontend_events( $value = array() ) {
2322
  return \WSAL\Helpers\Options::set_option_value_ignore_prefix( self::FRONT_END_EVENTS_OPTION_NAME, $value);
2323
  }
2324
 
2364
  return $this->_plugin->GetGlobalBooleanSetting( 'admin-blocking-plugins-support', false );
2365
  }
2366
 
2367
+ public function get_mainwp_enforced_settings( ) {
2368
+ return $this->_plugin->GetGlobalSetting( 'mainwp_enforced_settings', [] );
2369
+ }
2370
+
2371
+ public function set_mainwp_enforced_settings( $settings ) {
2372
+ $this->_plugin->SetGlobalSetting( 'mainwp_enforced_settings', $settings );
2373
+ }
2374
+
2375
+ public function delete_mainwp_enforced_settings( ) {
2376
+ $this->_plugin->DeleteSettingByName( WpSecurityAuditLog::OPTIONS_PREFIX . 'mainwp_enforced_settings' );
2377
+ }
2378
+
2379
  }
classes/ThirdPartyExtensions/AbstractExtension.php CHANGED
@@ -10,14 +10,35 @@ if ( ! class_exists( 'WSAL_AbstractExtension' ) ) {
10
 
11
  public function add_filters() {
12
  add_filter( 'wsal_filter_installable_plugins', array( $this, 'filter_installable_plugins' ), 10, 1 );
13
- add_filter( 'wsal_addon_event_codes', array( $this, 'add_event_codes' ), 10, 1 );
14
  add_filter( 'wsal_modify_predefined_plugin_slug', array( $this, 'modify_predefined_plugin_slug' ), 10, 1 );
15
  }
16
 
17
- abstract public function filter_installable_plugins( $plugins );
 
 
 
 
 
 
 
18
 
19
- abstract public function add_event_codes( $addon_event_codes );
 
 
 
 
 
 
 
20
 
 
 
 
 
 
 
 
21
  public function modify_predefined_plugin_slug( $plugin ) {
22
  return $plugin;
23
  }
10
 
11
  public function add_filters() {
12
  add_filter( 'wsal_filter_installable_plugins', array( $this, 'filter_installable_plugins' ), 10, 1 );
13
+ add_filter( 'wsal_addon_event_codes', array( $this, 'add_event_codes' ), 10, 1 );
14
  add_filter( 'wsal_modify_predefined_plugin_slug', array( $this, 'modify_predefined_plugin_slug' ), 10, 1 );
15
  }
16
 
17
+ /**
18
+ * Add our extension to the array of installable extensions.
19
+ *
20
+ * @param array $plugins Array of installable plugins.
21
+ *
22
+ * @return array
23
+ */
24
+ abstract public function filter_installable_plugins( $plugins );
25
 
26
+ /**
27
+ * Add our extensions event IDs to the array of available events
28
+ *
29
+ * @param array $addon_event_codes Current extension/addon events.
30
+ *
31
+ * @return array
32
+ */
33
+ abstract public function add_event_codes( $addon_event_codes );
34
 
35
+ /**
36
+ * Correct plugin slug depending on the context.
37
+ *
38
+ * @param string $plugin Current slug to alter.
39
+ *
40
+ * @return string Modified slug.
41
+ */
42
  public function modify_predefined_plugin_slug( $plugin ) {
43
  return $plugin;
44
  }
classes/ThirdPartyExtensions/WooCommerceExtension.php CHANGED
@@ -20,7 +20,7 @@ if ( ! class_exists( 'WSAL_WooCommerceExtension' ) ) {
20
  'plugin_url' => 'https://downloads.wordpress.org/plugin/wp-activity-log-for-woocommerce.latest-stable.zip',
21
  'event_tab_id' => '#tab-woocommerce',
22
  'plugin_description' => 'Keep a log of your team\'s store settings, products, orders, coupons and any other changes they might do on your eCommerce store.',
23
- )
24
  );
25
 
26
  // combine the two arrays.
@@ -41,23 +41,25 @@ if ( ! class_exists( 'WSAL_WooCommerceExtension' ) ) {
41
  return $addon_event_codes;
42
  }
43
 
 
 
 
 
 
 
 
 
 
 
44
  public function save_settings_disabled_events( $disabled, $registered_alerts, $frontend_events, $enabled ) {
45
-
46
- $settings = WpSecurityAuditLog::GetInstance()->settings();
47
-
48
  // Now we check all registered events for further processing.
49
  foreach ( $registered_alerts as $alert ) {
50
- if ( 9036 === $alert->type ) {
51
- $frontend_events = $settings::get_frontend_events();
52
- $frontend_events = array_merge( $frontend_events, array( 'woocommerce' => true ) );
53
- $settings->set_frontend_events( $frontend_events );
54
- }
55
 
 
56
  if ( ! in_array( $alert->type, $enabled, true ) ) {
57
- if ( 9036 === $alert->type ) {
58
- $frontend_events = $settings::get_frontend_events();
59
  $frontend_events = array_merge( $frontend_events, array( 'woocommerce' => false ) );
60
- $settings->set_frontend_events( $frontend_events );
61
  }
62
  $disabled[] = $alert->type;
63
  }
20
  'plugin_url' => 'https://downloads.wordpress.org/plugin/wp-activity-log-for-woocommerce.latest-stable.zip',
21
  'event_tab_id' => '#tab-woocommerce',
22
  'plugin_description' => 'Keep a log of your team\'s store settings, products, orders, coupons and any other changes they might do on your eCommerce store.',
23
+ ),
24
  );
25
 
26
  // combine the two arrays.
41
  return $addon_event_codes;
42
  }
43
 
44
+ /**
45
+ * Further process the $_POST data upon saving events in the ToggleAlerts view.
46
+ *
47
+ * @param array $disabled Empty array which we will fill if needed.
48
+ * @param object $registered_alerts Currently registered alerts.
49
+ * @param array $frontend_events Array of currently enabled frontend events, taken from POST data.
50
+ * @param array $enabled Currently enabled events.
51
+ *
52
+ * @return array Disabled events.
53
+ */
54
  public function save_settings_disabled_events( $disabled, $registered_alerts, $frontend_events, $enabled ) {
 
 
 
55
  // Now we check all registered events for further processing.
56
  foreach ( $registered_alerts as $alert ) {
 
 
 
 
 
57
 
58
+ // Disable Visitor events if the user disabled the event there are "tied to" in the UI.
59
  if ( ! in_array( $alert->type, $enabled, true ) ) {
60
+ if ( 9035 === $alert->type ) {
 
61
  $frontend_events = array_merge( $frontend_events, array( 'woocommerce' => false ) );
62
+ WSAL_Settings::set_frontend_events( $frontend_events );
63
  }
64
  $disabled[] = $alert->type;
65
  }
classes/ThirdPartyExtensions/YoastSeoExtension.php CHANGED
@@ -13,7 +13,7 @@ if ( ! class_exists( 'WSAL_YoastSeoExtension' ) ) {
13
  'plugin_slug' => 'activity-log-wp-seo/activity-log-wp-seo.php',
14
  'plugin_basename' => 'activity-log-wp-seo.php',
15
  'plugin_url' => 'https://downloads.wordpress.org/plugin/activity-log-wp-seo.latest-stable.zip',
16
- 'event_tab_id' => '#tab-yeost-seo',
17
  'plugin_description' => 'Keep a log of all the changes that you and your team do in the Yoast SEO metabox, plugin settings & much more.',
18
  )
19
  );
@@ -37,7 +37,7 @@ if ( ! class_exists( 'WSAL_YoastSeoExtension' ) ) {
37
  }
38
 
39
  public function modify_predefined_plugin_slug( $plugin ) {
40
- // Correct yoast addon
41
  if ( 'yoast' === $plugin ) {
42
  $plugin = 'wp-seo';
43
  }
13
  'plugin_slug' => 'activity-log-wp-seo/activity-log-wp-seo.php',
14
  'plugin_basename' => 'activity-log-wp-seo.php',
15
  'plugin_url' => 'https://downloads.wordpress.org/plugin/activity-log-wp-seo.latest-stable.zip',
16
+ 'event_tab_id' => '#tab-yoast-seo',
17
  'plugin_description' => 'Keep a log of all the changes that you and your team do in the Yoast SEO metabox, plugin settings & much more.',
18
  )
19
  );
37
  }
38
 
39
  public function modify_predefined_plugin_slug( $plugin ) {
40
+ // Correct yoast addon.
41
  if ( 'yoast' === $plugin ) {
42
  $plugin = 'wp-seo';
43
  }
classes/Uninstall.php CHANGED
@@ -22,7 +22,9 @@ class WSAL_Uninstall {
22
  public static function uninstall() {
23
  // Drop the tables.
24
  if ( self::should_uninstall() ) {
25
- self::drop_table( 'options' );
 
 
26
  self::drop_table( 'occurrences' );
27
  self::drop_table( 'metadata' );
28
  if ( self::table_exists( 'sessions' ) ) {
22
  public static function uninstall() {
23
  // Drop the tables.
24
  if ( self::should_uninstall() ) {
25
+ if ( self::table_exists( 'options' ) ) {
26
+ self::drop_table( 'options' );
27
+ }
28
  self::drop_table( 'occurrences' );
29
  self::drop_table( 'metadata' );
30
  if ( self::table_exists( 'sessions' ) ) {
classes/Utilities/Emailer.php CHANGED
@@ -87,7 +87,7 @@ class WSAL_Utilities_Emailer {
87
  public static function send_email( $email_address, $subject, $content, $headers = '', $attachments = array() ) {
88
 
89
  if ( empty( $email_address ) ) {
90
- // Get email adresses even when there is the Username.
91
  $email_address = self::get_emails( $email_address );
92
  }
93
 
@@ -110,7 +110,7 @@ class WSAL_Utilities_Emailer {
110
  }
111
 
112
  /**
113
- * Get email adresses by usernames.
114
  *
115
  * @param string $input_email - Comma separated emails.
116
  * @return string
87
  public static function send_email( $email_address, $subject, $content, $headers = '', $attachments = array() ) {
88
 
89
  if ( empty( $email_address ) ) {
90
+ // Get email addresses even when there is the Username.
91
  $email_address = self::get_emails( $email_address );
92
  }
93
 
110
  }
111
 
112
  /**
113
+ * Get email addresses by usernames.
114
  *
115
  * @param string $input_email - Comma separated emails.
116
  * @return string
classes/Utilities/PluginInstallerAction.php CHANGED
@@ -40,6 +40,10 @@ if ( ! class_exists( 'WSAL_PluginInstallerAction' ) ) {
40
 
41
  $predefined_plugins = WSAL_PluginInstallAndActivate::get_installable_plugins();
42
 
 
 
 
 
43
  if ( ! ( isset( $_POST['addon_for'] ) && is_array( $predefined_plugins ) ) ) {
44
  // no 'addon_for' passed, check for a zip and slug.
45
  $plugin_zip = ( isset( $_POST['plugin_url'] ) ) ? esc_url_raw( wp_unslash( $_POST['plugin_url'] ) ) : '';
@@ -51,6 +55,8 @@ if ( ! class_exists( 'WSAL_PluginInstallerAction' ) ) {
51
  * @since 4.0.2
52
  */
53
  $addon = sanitize_text_field( wp_unslash( $_POST['addon_for'] ) );
 
 
54
  foreach ( $predefined_plugins as $plugin ) {
55
  if ( strtolower( $plugin['addon_for'] ) === $addon ) {
56
  $plugin_zip = $plugin['plugin_url'];
@@ -174,8 +180,6 @@ if ( ! class_exists( 'WSAL_PluginInstallerAction' ) ) {
174
  $current = get_option( 'active_plugins' );
175
  }
176
 
177
- $plugin = plugin_basename( trim( $plugin_slug ) );
178
-
179
  if ( ! in_array( $plugin_slug, $current, true ) ) {
180
  if ( function_exists( 'is_multisite' ) && is_multisite() ) {
181
  $current[] = $plugin_slug;
40
 
41
  $predefined_plugins = WSAL_PluginInstallAndActivate::get_installable_plugins();
42
 
43
+ // Setup empties to avoid errors.
44
+ $plugin_zip = '';
45
+ $plugin_slug = '';
46
+
47
  if ( ! ( isset( $_POST['addon_for'] ) && is_array( $predefined_plugins ) ) ) {
48
  // no 'addon_for' passed, check for a zip and slug.
49
  $plugin_zip = ( isset( $_POST['plugin_url'] ) ) ? esc_url_raw( wp_unslash( $_POST['plugin_url'] ) ) : '';
55
  * @since 4.0.2
56
  */
57
  $addon = sanitize_text_field( wp_unslash( $_POST['addon_for'] ) );
58
+ $addon = apply_filters( 'wsal_modify_predefined_plugin_slug', $addon );
59
+
60
  foreach ( $predefined_plugins as $plugin ) {
61
  if ( strtolower( $plugin['addon_for'] ) === $addon ) {
62
  $plugin_zip = $plugin['plugin_url'];
180
  $current = get_option( 'active_plugins' );
181
  }
182
 
 
 
183
  if ( ! in_array( $plugin_slug, $current, true ) ) {
184
  if ( function_exists( 'is_multisite' ) && is_multisite() ) {
185
  $current[] = $plugin_slug;
classes/ViewManager.php CHANGED
@@ -337,7 +337,7 @@ class WSAL_ViewManager {
337
  * Render header of the current view.
338
  */
339
  public function RenderViewHeader() {
340
- if ( ! ! ( $view = $this->GetActiveView() ) ) {
341
  $view->Header();
342
  }
343
  }
@@ -346,7 +346,7 @@ class WSAL_ViewManager {
346
  * Render footer of the current view.
347
  */
348
  public function RenderViewFooter() {
349
- if ( ! ! ( $view = $this->GetActiveView() ) ) {
350
  $view->Footer();
351
  }
352
  }
337
  * Render header of the current view.
338
  */
339
  public function RenderViewHeader() {
340
+ if ( $view = $this->GetActiveView() ) {
341
  $view->Header();
342
  }
343
  }
346
  * Render footer of the current view.
347
  */
348
  public function RenderViewFooter() {
349
+ if ( $view = $this->GetActiveView() ) {
350
  $view->Footer();
351
  }
352
  }
classes/Views/AuditLog.php CHANGED
@@ -74,9 +74,7 @@ class WSAL_Views_AuditLog extends WSAL_AbstractView {
74
  add_action( 'wp_ajax_AjaxSearchSite', array( $this, 'AjaxSearchSite' ) );
75
  add_action( 'wp_ajax_AjaxSwitchDB', array( $this, 'AjaxSwitchDB' ) );
76
  add_action( 'wp_ajax_wsal_download_failed_login_log', array( $this, 'wsal_download_failed_login_log' ) );
77
- add_action( 'wp_ajax_wsal_download_404_log', array( $this, 'wsal_download_404_log' ) );
78
  add_action( 'wp_ajax_wsal_freemius_opt_in', array( $this, 'wsal_freemius_opt_in' ) );
79
- add_action( 'wp_ajax_wsal_exclude_url', array( $this, 'wsal_exclude_url' ) );
80
  add_action( 'wp_ajax_wsal_dismiss_setup_modal', array( $this, 'dismiss_setup_modal' ) );
81
  add_action( 'wp_ajax_wsal_dismiss_advert', array( $this, 'wsal_dismiss_advert' ) );
82
  add_action( 'wp_ajax_wsal_dismiss_notice_disconnect', array( $this, 'dismiss_notice_disconnect' ) );
@@ -263,13 +261,10 @@ class WSAL_Views_AuditLog extends WSAL_AbstractView {
263
  $we_have_addon = array_intersect( $plugin_filenames, $predefined_plugins_check );
264
 
265
  if ( isset( $we_have_addon ) && is_array( $we_have_addon ) ) {
266
- $addon_names = '';
267
- $i = 0;
268
  foreach ( $we_have_addon as $addon ) {
269
  $addon_slug = array_search( $addon, array_column( $predefined_plugins, 'addon_for', 'plugin_slug' ) );
270
-
271
  $is_addon_installed = WpSecurityAuditLog::is_plugin_active( $addon_slug );
272
-
273
  if ( $is_addon_installed ) {
274
  continue;
275
  }
@@ -289,7 +284,7 @@ class WSAL_Views_AuditLog extends WSAL_AbstractView {
289
  </div>
290
  <div class="addon-content-wrapper">
291
  <?php
292
- $message = printf(
293
  '<p><b>%1$s %2$s %3$s</b></br>%4$s.</br> <a href="%6$s" class="button button-primary">%5$s</a></p>',
294
  esc_html__( 'We noticed you have', 'wp-security-audit-log' ),
295
  esc_html( $title ),
@@ -491,7 +486,9 @@ class WSAL_Views_AuditLog extends WSAL_AbstractView {
491
  $page = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : false; // @codingStandardsIgnoreLine
492
  if ( 'admin.php' !== $pagenow ) {
493
  return;
494
- } elseif ( 'wsal-auditlog' !== $page ) { // Page is admin.php, now check auditlog page.
 
 
495
  return; // Return if the current page is not auditlog's.
496
  }
497
 
@@ -819,70 +816,6 @@ class WSAL_Views_AuditLog extends WSAL_AbstractView {
819
  die();
820
  }
821
 
822
- /**
823
- * Ajax callback to download 404 log.
824
- */
825
- public function wsal_download_404_log() {
826
- // Get post array through filter.
827
- $nonce = filter_input( INPUT_POST, 'nonce', FILTER_SANITIZE_STRING );
828
- $filename = filter_input( INPUT_POST, 'log_file', FILTER_SANITIZE_STRING );
829
-
830
- // If file name is empty then return error.
831
- if ( empty( $filename ) ) {
832
- // Nonce verification failed.
833
- echo wp_json_encode(
834
- array(
835
- 'success' => false,
836
- 'message' => esc_html__( 'Log file does not exist.', 'wp-security-audit-log' ),
837
- )
838
- );
839
- die();
840
- }
841
-
842
- // Verify nonce.
843
- if ( empty( $filename ) || empty( $nonce ) || ! wp_verify_nonce( $nonce, 'wsal-download-404-log-' . $filename ) ) {
844
- // Nonce verification failed.
845
- echo wp_json_encode(
846
- array(
847
- 'success' => false,
848
- 'message' => esc_html__( 'Nonce verification failed.', 'wp-security-audit-log' ),
849
- )
850
- );
851
- die();
852
- }
853
-
854
- // Get basename to prevent path traversal attack.
855
- $filename = basename( $filename );
856
-
857
- // Construct log file path to eliminate the risks of path traversal attack.
858
- $log_file_path = $this->_plugin->settings()->get_working_dir_path( '404s' ) . $filename;
859
-
860
- // Request the file.
861
- $response = file_get_contents( $log_file_path, true );
862
-
863
- // Check if the response is valid.
864
- if ( $response ) {
865
- // Return the file body.
866
- echo wp_json_encode(
867
- array(
868
- 'success' => true,
869
- 'filename' => $filename,
870
- 'file_content' => $response,
871
- )
872
- );
873
- } else {
874
- // Request failed.
875
- echo wp_json_encode(
876
- array(
877
- 'success' => false,
878
- 'message' => esc_html__( 'Request to get log file failed.', 'wp-security-audit-log' ),
879
- )
880
- );
881
- }
882
-
883
- die();
884
- }
885
-
886
  /**
887
  * Ajax callback to handle freemius opt in/out.
888
  */
@@ -1150,50 +1083,6 @@ class WSAL_Views_AuditLog extends WSAL_AbstractView {
1150
  return $pointer;
1151
  }
1152
 
1153
- /**
1154
- * Method: Ajax request handler to exclude URL from
1155
- * the event.
1156
- *
1157
- * @since 3.2.2
1158
- */
1159
- public function wsal_exclude_url() {
1160
- // Die if user does not have permission to disable.
1161
- if ( ! $this->_plugin->settings()->CurrentUserCan( 'edit' ) ) {
1162
- echo '<p>' . esc_html__( 'Error: You do not have sufficient permissions to exclude this URL.', 'wp-security-audit-log' ) . '</p>';
1163
- die();
1164
- }
1165
-
1166
- // Set filter input args.
1167
- $filter_input_args = array(
1168
- 'nonce' => FILTER_SANITIZE_STRING,
1169
- 'url' => FILTER_SANITIZE_STRING,
1170
- );
1171
-
1172
- // Filter $_POST array for security.
1173
- $post_array = filter_input_array( INPUT_POST, $filter_input_args );
1174
-
1175
- if ( ! isset( $post_array['nonce'] ) || ! wp_verify_nonce( $post_array['nonce'], 'wsal-exclude-url-' . $post_array['url'] ) ) {
1176
- die();
1177
- }
1178
-
1179
- $excluded_urls = $this->_plugin->GetGlobalSetting( 'excluded-urls' );
1180
- if ( isset( $excluded_urls ) && '' !== $excluded_urls ) {
1181
- $excluded_urls .= ',' . esc_url( $post_array['url'] );
1182
- } else {
1183
- $excluded_urls = esc_url( $post_array['url'] );
1184
- }
1185
- $this->_plugin->SetGlobalSetting( 'excluded-urls', $excluded_urls );
1186
- $settings_exclude_url = add_query_arg(
1187
- array(
1188
- 'page' => 'wsal-settings',
1189
- 'tab' => 'exclude-objects',
1190
- ),
1191
- admin_url( 'admin.php' )
1192
- );
1193
- echo '<p>URL ' . esc_html( $post_array['url'] ) . ' is no longer being monitored.<br />Enable the monitoring of this URL again from the <a href="' . esc_url( $settings_exclude_url ) . '">Excluded Objects</a> tab in the plugin settings.</p>';
1194
- die;
1195
- }
1196
-
1197
  /**
1198
  * Method: Ajax request handler to dismiss adverts.
1199
  *
74
  add_action( 'wp_ajax_AjaxSearchSite', array( $this, 'AjaxSearchSite' ) );
75
  add_action( 'wp_ajax_AjaxSwitchDB', array( $this, 'AjaxSwitchDB' ) );
76
  add_action( 'wp_ajax_wsal_download_failed_login_log', array( $this, 'wsal_download_failed_login_log' ) );
 
77
  add_action( 'wp_ajax_wsal_freemius_opt_in', array( $this, 'wsal_freemius_opt_in' ) );
 
78
  add_action( 'wp_ajax_wsal_dismiss_setup_modal', array( $this, 'dismiss_setup_modal' ) );
79
  add_action( 'wp_ajax_wsal_dismiss_advert', array( $this, 'wsal_dismiss_advert' ) );
80
  add_action( 'wp_ajax_wsal_dismiss_notice_disconnect', array( $this, 'dismiss_notice_disconnect' ) );
261
  $we_have_addon = array_intersect( $plugin_filenames, $predefined_plugins_check );
262
 
263
  if ( isset( $we_have_addon ) && is_array( $we_have_addon ) ) {
264
+
 
265
  foreach ( $we_have_addon as $addon ) {
266
  $addon_slug = array_search( $addon, array_column( $predefined_plugins, 'addon_for', 'plugin_slug' ) );
 
267
  $is_addon_installed = WpSecurityAuditLog::is_plugin_active( $addon_slug );
 
268
  if ( $is_addon_installed ) {
269
  continue;
270
  }
284
  </div>
285
  <div class="addon-content-wrapper">
286
  <?php
287
+ printf(
288
  '<p><b>%1$s %2$s %3$s</b></br>%4$s.</br> <a href="%6$s" class="button button-primary">%5$s</a></p>',
289
  esc_html__( 'We noticed you have', 'wp-security-audit-log' ),
290
  esc_html( $title ),
486
  $page = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : false; // @codingStandardsIgnoreLine
487
  if ( 'admin.php' !== $pagenow ) {
488
  return;
489
+ }
490
+
491
+ if ( 'wsal-auditlog' !== $page ) { // Page is admin.php, now check auditlog page.
492
  return; // Return if the current page is not auditlog's.
493
  }
494
 
816
  die();
817
  }
818
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
819
  /**
820
  * Ajax callback to handle freemius opt in/out.
821
  */
1083
  return $pointer;
1084
  }
1085
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1086
  /**
1087
  * Method: Ajax request handler to dismiss adverts.
1088
  *
classes/Views/Help.php CHANGED
@@ -184,9 +184,9 @@ class WSAL_Views_Help extends WSAL_AbstractView {
184
  <?php esc_html_e( 'Have you encountered or noticed any issues while using WP Activity Log plugin?', 'wp-security-audit-log' ); ?>
185
  <?php esc_html_e( 'Or you want to report something to us? Click any of the options below to post on the plugin\'s forum or contact our support directly.', 'wp-security-audit-log' ); ?>
186
  </p><p>
187
- <a class="button" href="https://wordpress.org/support/plugin/wp-security-audit-log" target="_blank"><?php esc_html_e( 'Free Support Forum', 'wp-security-audit-log' ); ?></a>
188
  &nbsp;&nbsp;&nbsp;&nbsp;
189
- <a class="button" href="https://wpactivitylog.com/support/submit-ticket/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=free+support+email" target="_blank"><?php esc_html_e( 'Free Support Email', 'wp-security-audit-log' ); ?></a>
190
  </p>
191
  </div>
192
  <div class="wsal-help-section">
@@ -195,11 +195,11 @@ class WSAL_Views_Help extends WSAL_AbstractView {
195
  <?php esc_html_e( 'For more technical information about the WP Activity Log plugin please visit the plugin’s knowledge base.', 'wp-security-audit-log' ); ?>
196
  <?php esc_html_e( 'Refer to the list of WordPress security events for a complete list of Events and IDs that the plugin uses to keep a log of all the changes in the WordPress activity log.', 'wp-security-audit-log' ); ?>
197
  </p><p>
198
- <a class="button" href="https://wpactivitylog.com/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=plugin+website" target="_blank"><?php esc_html_e( 'Plugin Website', 'wp-security-audit-log' ); ?></a>
199
  &nbsp;&nbsp;&nbsp;&nbsp;
200
- <a class="button" href="https://wpactivitylog.com/support/kb/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=knowledge+base" target="_blank"><?php esc_html_e( 'Knowledge Base', 'wp-security-audit-log' ); ?></a>
201
  &nbsp;&nbsp;&nbsp;&nbsp;
202
- <a class="button" href="https://wpactivitylog.com/support/kb/list-wordpress-activity-log-event-ids/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=list+events" target="_blank"><?php esc_html_e( 'List of activity logs event IDs', 'wp-security-audit-log' ); ?></a>
203
  </p>
204
  </div>
205
  <div class="wsal-help-section">
@@ -211,14 +211,14 @@ class WSAL_Views_Help extends WSAL_AbstractView {
211
  <?php esc_html_e( 'We appreciate every star!', 'wp-security-audit-log' ); ?>
212
  </p>
213
  <p>
214
- <a class="rating-link" href="https://en-gb.wordpress.org/plugins/wp-security-audit-log/#reviews" target="_blank">
215
  <span class="dashicons dashicons-star-filled"></span>
216
  <span class="dashicons dashicons-star-filled"></span>
217
  <span class="dashicons dashicons-star-filled"></span>
218
  <span class="dashicons dashicons-star-filled"></span>
219
  <span class="dashicons dashicons-star-filled"></span>
220
  </a>
221
- <a class="button" href="https://en-gb.wordpress.org/plugins/wp-security-audit-log/#reviews" target="_blank"><?php esc_html_e( 'Rate Plugin', 'wp-security-audit-log' ); ?></a>
222
  </p>
223
  </div>
224
  <?php
184
  <?php esc_html_e( 'Have you encountered or noticed any issues while using WP Activity Log plugin?', 'wp-security-audit-log' ); ?>
185
  <?php esc_html_e( 'Or you want to report something to us? Click any of the options below to post on the plugin\'s forum or contact our support directly.', 'wp-security-audit-log' ); ?>
186
  </p><p>
187
+ <a class="button" rel="noopener noreferrer" href="https://wordpress.org/support/plugin/wp-security-audit-log" target="_blank"><?php esc_html_e( 'Free Support Forum', 'wp-security-audit-log' ); ?></a>
188
  &nbsp;&nbsp;&nbsp;&nbsp;
189
+ <a class="button" rel="noopener noreferrer" href="https://wpactivitylog.com/support/submit-ticket/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=free+support+email" target="_blank"><?php esc_html_e( 'Free Support Email', 'wp-security-audit-log' ); ?></a>
190
  </p>
191
  </div>
192
  <div class="wsal-help-section">
195
  <?php esc_html_e( 'For more technical information about the WP Activity Log plugin please visit the plugin’s knowledge base.', 'wp-security-audit-log' ); ?>
196
  <?php esc_html_e( 'Refer to the list of WordPress security events for a complete list of Events and IDs that the plugin uses to keep a log of all the changes in the WordPress activity log.', 'wp-security-audit-log' ); ?>
197
  </p><p>
198
+ <a class="button" rel="noopener noreferrer" href="https://wpactivitylog.com/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=plugin+website" target="_blank"><?php esc_html_e( 'Plugin Website', 'wp-security-audit-log' ); ?></a>
199
  &nbsp;&nbsp;&nbsp;&nbsp;
200
+ <a class="button" rel="noopener noreferrer" href="https://wpactivitylog.com/support/kb/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=knowledge+base" target="_blank"><?php esc_html_e( 'Knowledge Base', 'wp-security-audit-log' ); ?></a>
201
  &nbsp;&nbsp;&nbsp;&nbsp;
202
+ <a class="button" rel="noopener noreferrer" href="https://wpactivitylog.com/support/kb/list-wordpress-activity-log-event-ids/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=list+events" target="_blank"><?php esc_html_e( 'List of activity logs event IDs', 'wp-security-audit-log' ); ?></a>
203
  </p>
204
  </div>
205
  <div class="wsal-help-section">
211
  <?php esc_html_e( 'We appreciate every star!', 'wp-security-audit-log' ); ?>
212
  </p>
213
  <p>
214
+ <a class="rating-link" rel="noopener noreferrer" href="https://en-gb.wordpress.org/plugins/wp-security-audit-log/#reviews" target="_blank">
215
  <span class="dashicons dashicons-star-filled"></span>
216
  <span class="dashicons dashicons-star-filled"></span>
217
  <span class="dashicons dashicons-star-filled"></span>
218
  <span class="dashicons dashicons-star-filled"></span>
219
  <span class="dashicons dashicons-star-filled"></span>
220
  </a>
221
+ <a class="button" rel="noopener noreferrer" href="https://en-gb.wordpress.org/plugins/wp-security-audit-log/#reviews" target="_blank"><?php esc_html_e( 'Rate Plugin', 'wp-security-audit-log' ); ?></a>
222
  </p>
223
  </div>
224
  <?php
classes/Views/Settings.php CHANGED
@@ -977,77 +977,7 @@ class WSAL_Views_Settings extends WSAL_AbstractView {
977
  ?>
978
  </p>
979
  <?php else : ?>
980
- <table class="form-table wsal-tab">
981
- <tbody>
982
- <tr>
983
- <th><label for="delete1"><?php esc_html_e( 'Activity log retention', 'wp-security-audit-log' ); ?></label></th>
984
- <td>
985
- <fieldset>
986
- <?php $nbld = ! $this->_plugin->settings()->IsPruningDateEnabled(); ?>
987
- <label for="delete0">
988
- <input type="radio" id="delete0" name="PruneBy" value="" <?php checked( $nbld ); ?> />
989
- <?php echo esc_html__( 'Keep all data', 'wp-security-audit-log' ); ?>
990
- </label>
991
- </fieldset>
992
-
993
- <fieldset>
994
- <?php
995
- // Check pruning date option.
996
- $nbld = $this->_plugin->settings()->IsPruningDateEnabled();
997
-
998
- // Find and replace ` months` in the string.
999
- $pruning_date = $this->_plugin->settings()->GetPruningDate();
1000
- $pruning_date = str_replace( ' months', '', $pruning_date );
1001
- $pruning_date = str_replace( ' years', '', $pruning_date );
1002
- $pruning_unit = $this->_plugin->settings()->get_pruning_unit();
1003
-
1004
- // Check if pruning limit was enabled for backwards compatibility.
1005
- if ( $this->_plugin->settings()->IsPruningLimitEnabled() ) {
1006
- $nbld = true;
1007
- $pruning_date = '6';
1008
- $pruning_unit = 'months';
1009
- $this->_plugin->settings()->SetPruningDate( $pruning_date . ' ' . $pruning_unit );
1010
- $this->_plugin->settings()->SetPruningDateEnabled( true );
1011
- $this->_plugin->settings()->SetPruningLimitEnabled( false );
1012
- }
1013
- ?>
1014
- <label for="delete1">
1015
- <input type="radio" id="delete1" name="PruneBy" value="date" <?php checked( $nbld ); ?> />
1016
- <?php esc_html_e( 'Delete events older than', 'wp-security-audit-log' ); ?>
1017
- </label>
1018
- <input type="text" id="PruningDate" name="PruningDate"
1019
- value="<?php echo esc_attr( $pruning_date ); ?>"
1020
- onfocus="jQuery('#delete1').attr('checked', true);"
1021
- />
1022
- <select name="pruning-unit" id="pruning-unit">
1023
- <option value="months" <?php echo ( 'months' === $pruning_unit ) ? 'selected' : false; ?>><?php esc_html_e( 'Months', 'wp-security-audit-log' ); ?></option>
1024
- <option value="years" <?php echo ( 'years' === $pruning_unit ) ? 'selected' : false; ?>><?php esc_html_e( 'Years', 'wp-security-audit-log' ); ?></option>
1025
- </select>
1026
- </fieldset>
1027
-
1028
- <?php if ( $this->_plugin->settings()->IsPruningDateEnabled() ) : ?>
1029
- <p class="description">
1030
- <?php
1031
- $next = wp_next_scheduled( 'wsal_cleanup' );
1032
- echo esc_html__( 'The next scheduled purging of activity log data that is older than ', 'wp-security-audit-log' );
1033
- echo esc_html( $pruning_date . ' ' . $pruning_unit );
1034
- echo sprintf(
1035
- ' is in %s.',
1036
- esc_html( human_time_diff( current_time( 'timestamp' ), $next ) )
1037
- );
1038
- echo '<!-- ' . esc_html( date( 'dMy H:i:s', $next ) ) . ' --> ';
1039
- echo esc_html__( 'You can run the purging process now by clicking the button below.', 'wp-security-audit-log' );
1040
- ?>
1041
- </p>
1042
- <p>
1043
- <a class="button-primary" href="<?php echo esc_url( add_query_arg( 'action', 'AjaxRunCleanup', admin_url( 'admin-ajax.php' ) ) ); ?>"><?php esc_html_e( 'Purge Old Data', 'wp-security-audit-log' ); ?></a>
1044
- </p>
1045
- <?php endif; ?>
1046
- </td>
1047
- </tr>
1048
- <!-- Activity log retention -->
1049
- </tbody>
1050
- </table>
1051
  <?php endif; ?>
1052
  <!-- Activity log retention -->
1053
 
@@ -1245,7 +1175,7 @@ class WSAL_Views_Settings extends WSAL_AbstractView {
1245
  <img src="<?php echo trailingslashit( WSAL_BASE_URL ) . 'img/help/website-file-changes-monitor.jpg'; ?>">
1246
  <h4><?php echo esc_html__( 'Website File Changes Monitor', 'wp-security-audit-log' ); ?></h4>
1247
  <p><?php echo esc_html__( 'To keep a log of file changes please install Website File Changes Monitor, a plugin which is also developed by us.', 'wp-security-audit-log' ); ?></p><br>
1248
- <p><button class="install-addon button button-primary" data-nonce="<?php echo esc_attr( wp_create_nonce( 'wsal-install-addon' ) ); ?>" data-plugin-slug="website-file-changes-monitor/website-file-changes-monitor.php" data-plugin-download-url="https://downloads.wordpress.org/plugin/website-file-changes-monitor.latest-stable.zip"><?php _e( 'Install plugin now', 'wp-security-audit-log' ); ?></button><span class="spinner" style="display: none; visibility: visible; float: none; margin: 0 0 0 8px;"></span> <a href="https://wpactivitylog.com/support/kb/wordpress-files-changes-warning-activity-logs/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=settings+pages" target="_blank" style="margin-left: 15px;"><?php echo esc_html__( 'Learn More', 'wp-security-audit-log' ); ?></a></p>
1249
  </div>
1250
  <?php else : ?>
1251
  <?php
@@ -1384,28 +1314,6 @@ class WSAL_Views_Settings extends WSAL_AbstractView {
1384
  </td>
1385
  </tr>
1386
  <!-- Exclude Custom Fields -->
1387
-
1388
- <tr>
1389
- <th><label for="ExURLsQueryBox"><?php esc_html_e( 'Exclude Non-Existing URLs:', 'wp-security-audit-log' ); ?></label></th>
1390
- <td>
1391
- <fieldset>
1392
- <input type="text" id="ExURLsQueryBox" style="width: 250px;">
1393
- <input type="button" id="ExURLsQueryAdd" class="button-primary" value="Add">
1394
- <br style="clear: both;"/>
1395
- <div id="ExURLsList">
1396
- <?php foreach ( $this->_plugin->settings()->get_excluded_urls() as $item ) : ?>
1397
- <span class="sectoken-<?php echo esc_attr( $this->GetTokenType( $item ) ); ?>">
1398
- <input type="hidden" name="ExURLss[]" value="<?php echo esc_attr( $item ); ?>"/>
1399
- <?php echo esc_html( $item ); ?>
1400
- <a href="javascript:;" title="Remove">&times;</a>
1401
- </span>
1402
- <?php endforeach; ?>
1403
- </div>
1404
- </fieldset>
1405
- <p class="description"><?php esc_html_e( 'Add the non existing URLs for which you do not want to be alerted of HTTP 404 errors in the activity log by specifying the complete URL. Examples below:', 'wp-security-audit-log' ); ?><br><?php echo esc_html__( 'File: ', 'wp-security-audit-log' ) . esc_url( home_url() ) . '/subdirectory/file.php'; ?><br><?php echo esc_html__( 'Directory: ', 'wp-security-audit-log' ) . esc_url( home_url() ) . '/subdirectory/subdirectory2'; ?></p>
1406
- </td>
1407
- </tr>
1408
- <!-- Exclude 404 URLs -->
1409
  </tbody>
1410
  </table>
1411
  <!-- / Exclude Objects Tab -->
@@ -1424,7 +1332,6 @@ class WSAL_Views_Settings extends WSAL_AbstractView {
1424
  $this->_plugin->settings()->SetExcludedMonitoringCustom( isset( $post_array['Customs'] ) ? $post_array['Customs'] : array() );
1425
  $this->_plugin->settings()->SetExcludedMonitoringIP( isset( $post_array['IpAddrs'] ) ? $post_array['IpAddrs'] : array() );
1426
  $this->_plugin->settings()->set_excluded_post_types( isset( $post_array['ExCPTss'] ) ? $post_array['ExCPTss'] : array() );
1427
- $this->_plugin->settings()->set_excluded_urls( isset( $post_array['ExURLss'] ) ? $post_array['ExURLss'] : array() );
1428
  }
1429
 
1430
  /**
@@ -1439,7 +1346,7 @@ class WSAL_Views_Settings extends WSAL_AbstractView {
1439
  </p>
1440
 
1441
  <h3><?php esc_html_e( 'Where do you want the plugin\'s working directory for log files, reports and other files?', 'wp-security-audit-log' ); ?></h3>
1442
- <p class="description"><?php esc_html_e( 'The plugin stores the reports it generates, a number of log files ( for example to keep a log of 404 errors), and the request log in this working directory. By default the directory is in the default WordPress uploads directory. Use the below setting to create the working directory in a different location. Note that the plugin requires write permissions to this directory. Please specify the relative path of the directory.', 'wp-security-audit-log' ); ?></p>
1443
  <table class="form-table wsal-tab">
1444
  <tbody>
1445
  <!-- custom log directory -->
@@ -1635,7 +1542,6 @@ class WSAL_Views_Settings extends WSAL_AbstractView {
1635
  $this->_plugin->settings()->SetDevOptionEnabled( 'r', false );
1636
  }
1637
 
1638
- $was_admin_blocking_plugins_support_just_enabled = false;
1639
  $stealth_mode = isset( $post_array['mwp_stealth_mode'] ) ? $post_array['mwp_stealth_mode'] : false;
1640
  if ( 'yes' === $stealth_mode ) {
1641
  if ( ! WpSecurityAuditLog::is_mainwp_active() ) {
@@ -1646,7 +1552,6 @@ class WSAL_Views_Settings extends WSAL_AbstractView {
1646
  $admin_blocking_plugins_support = isset( $post_array['mwp_admin_blocking_support'] ) ? $post_array['mwp_admin_blocking_support'] : false;
1647
  if ( 'yes' === $admin_blocking_plugins_support ) {
1648
  $this->_plugin->settings()->set_admin_blocking_plugin_support(true);
1649
- $was_admin_blocking_plugins_support_just_enabled = true;
1650
  }
1651
  } else {
1652
  $this->_plugin->settings()->deactivate_mainwp_child_stealth_mode();
@@ -1661,7 +1566,7 @@ class WSAL_Views_Settings extends WSAL_AbstractView {
1661
  }
1662
 
1663
  if ( ! empty( $custom_logging_dir ) ) {
1664
- $custom_logging_path = trailingslashit( ABSPATH ) . ltrim( trailingslashit( $custom_logging_dir ), '/' );
1665
  if ( ! is_dir( $custom_logging_path ) || ! is_readable( $custom_logging_path ) || ! is_writable( $custom_logging_path ) ) {
1666
  $dir_made = wp_mkdir_p( $custom_logging_path );
1667
  if ( $dir_made ) {
@@ -1920,4 +1825,85 @@ class WSAL_Views_Settings extends WSAL_AbstractView {
1920
  wp_send_json_error( esc_html__( 'Reset query failed.', 'wp-security-audit-log' ) );
1921
  }
1922
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1923
  }
977
  ?>
978
  </p>
979
  <?php else : ?>
980
+ <?php $this->render_retention_settings_table(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
981
  <?php endif; ?>
982
  <!-- Activity log retention -->
983
 
1175
  <img src="<?php echo trailingslashit( WSAL_BASE_URL ) . 'img/help/website-file-changes-monitor.jpg'; ?>">
1176
  <h4><?php echo esc_html__( 'Website File Changes Monitor', 'wp-security-audit-log' ); ?></h4>
1177
  <p><?php echo esc_html__( 'To keep a log of file changes please install Website File Changes Monitor, a plugin which is also developed by us.', 'wp-security-audit-log' ); ?></p><br>
1178
+ <p><button class="install-addon button button-primary" data-nonce="<?php echo esc_attr( wp_create_nonce( 'wsal-install-addon' ) ); ?>" data-plugin-slug="website-file-changes-monitor/website-file-changes-monitor.php" data-plugin-download-url="https://downloads.wordpress.org/plugin/website-file-changes-monitor.latest-stable.zip"><?php _e( 'Install plugin now', 'wp-security-audit-log' ); ?></button><span class="spinner" style="display: none; visibility: visible; float: none; margin: 0 0 0 8px;"></span> <a href="https://wpactivitylog.com/support/kb/wordpress-files-changes-warning-activity-logs/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=settings+pages" rel="noopener noreferrer" target="_blank" style="margin-left: 15px;"><?php echo esc_html__( 'Learn More', 'wp-security-audit-log' ); ?></a></p>
1179
  </div>
1180
  <?php else : ?>
1181
  <?php
1314
  </td>
1315
  </tr>
1316
  <!-- Exclude Custom Fields -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1317
  </tbody>
1318
  </table>
1319
  <!-- / Exclude Objects Tab -->
1332
  $this->_plugin->settings()->SetExcludedMonitoringCustom( isset( $post_array['Customs'] ) ? $post_array['Customs'] : array() );
1333
  $this->_plugin->settings()->SetExcludedMonitoringIP( isset( $post_array['IpAddrs'] ) ? $post_array['IpAddrs'] : array() );
1334
  $this->_plugin->settings()->set_excluded_post_types( isset( $post_array['ExCPTss'] ) ? $post_array['ExCPTss'] : array() );
 
1335
  }
1336
 
1337
  /**
1346
  </p>
1347
 
1348
  <h3><?php esc_html_e( 'Where do you want the plugin\'s working directory for log files, reports and other files?', 'wp-security-audit-log' ); ?></h3>
1349
+ <p class="description"><?php esc_html_e( 'The plugin stores the reports it generates, a number of log files and the request log in this working directory. By default the directory is in the default WordPress uploads directory. Use the below setting to create the working directory in a different location. Note that the plugin requires write permissions to this directory. Please specify the relative path of the directory.', 'wp-security-audit-log' ); ?></p>
1350
  <table class="form-table wsal-tab">
1351
  <tbody>
1352
  <!-- custom log directory -->
1542
  $this->_plugin->settings()->SetDevOptionEnabled( 'r', false );
1543
  }
1544
 
 
1545
  $stealth_mode = isset( $post_array['mwp_stealth_mode'] ) ? $post_array['mwp_stealth_mode'] : false;
1546
  if ( 'yes' === $stealth_mode ) {
1547
  if ( ! WpSecurityAuditLog::is_mainwp_active() ) {
1552
  $admin_blocking_plugins_support = isset( $post_array['mwp_admin_blocking_support'] ) ? $post_array['mwp_admin_blocking_support'] : false;
1553
  if ( 'yes' === $admin_blocking_plugins_support ) {
1554
  $this->_plugin->settings()->set_admin_blocking_plugin_support(true);
 
1555
  }
1556
  } else {
1557
  $this->_plugin->settings()->deactivate_mainwp_child_stealth_mode();
1566
  }
1567
 
1568
  if ( ! empty( $custom_logging_dir ) ) {
1569
+ $custom_logging_path = trailingslashit( get_home_path() ) . ltrim( trailingslashit( $custom_logging_dir ), '/' );
1570
  if ( ! is_dir( $custom_logging_path ) || ! is_readable( $custom_logging_path ) || ! is_writable( $custom_logging_path ) ) {
1571
  $dir_made = wp_mkdir_p( $custom_logging_path );
1572
  if ( $dir_made ) {
1825
  wp_send_json_error( esc_html__( 'Reset query failed.', 'wp-security-audit-log' ) );
1826
  }
1827
  }
1828
+
1829
+ public function render_retention_settings_table( ) {
1830
+ // check if the retention settings are enforced from the MainWP master site
1831
+ $settings = $this->_plugin->settings();
1832
+ $enforced_settings = $settings->get_mainwp_enforced_settings();
1833
+ $retention_settings_enforced_by_mainwp = array_key_exists( 'pruning_enabled', $enforced_settings );
1834
+ ?>
1835
+ <table class="form-table wsal-tab">
1836
+ <tbody>
1837
+ <tr>
1838
+ <th><label for="delete1"><?php esc_html_e( 'Activity log retention', 'wp-security-audit-log' ); ?></label></th>
1839
+ <td>
1840
+ <fieldset>
1841
+ <?php $nbld = ! $this->_plugin->settings()->IsPruningDateEnabled(); ?>
1842
+ <label for="delete0">
1843
+ <input type="radio" id="delete0" name="PruneBy" value="" <?php checked( $nbld ); ?><?php if ( $retention_settings_enforced_by_mainwp ): ?> disabled="disabled"<?php endif; ?> />
1844
+ <?php echo esc_html__( 'Keep all data', 'wp-security-audit-log' ); ?>
1845
+ </label>
1846
+ </fieldset>
1847
+
1848
+ <fieldset>
1849
+ <?php
1850
+ // Check pruning date option.
1851
+ $nbld = $this->_plugin->settings()->IsPruningDateEnabled();
1852
+
1853
+ // Find and replace ` months` in the string.
1854
+ $pruning_date = $this->_plugin->settings()->GetPruningDate();
1855
+ $pruning_date = str_replace( ' months', '', $pruning_date );
1856
+ $pruning_date = str_replace( ' years', '', $pruning_date );
1857
+ $pruning_unit = $this->_plugin->settings()->get_pruning_unit();
1858
+
1859
+ // Check if pruning limit was enabled for backwards compatibility.
1860
+ if ( $this->_plugin->settings()->IsPruningLimitEnabled() ) {
1861
+ $nbld = true;
1862
+ $pruning_date = '6';
1863
+ $pruning_unit = 'months';
1864
+ $this->_plugin->settings()->SetPruningDate( $pruning_date . ' ' . $pruning_unit );
1865
+ $this->_plugin->settings()->SetPruningDateEnabled( true );
1866
+ $this->_plugin->settings()->SetPruningLimitEnabled( false );
1867
+ }
1868
+ ?>
1869
+ <label for="delete1">
1870
+ <input type="radio" id="delete1" name="PruneBy" value="date" <?php checked( $nbld ); ?><?php if ( $retention_settings_enforced_by_mainwp ): ?> disabled="disabled"<?php endif; ?> />
1871
+ <?php esc_html_e( 'Delete events older than', 'wp-security-audit-log' ); ?>
1872
+ </label>
1873
+ <input type="text" id="PruningDate" name="PruningDate"
1874
+ value="<?php echo esc_attr( $pruning_date ); ?>"
1875
+ onfocus="jQuery('#delete1').attr('checked', true);"
1876
+ <?php if ( $retention_settings_enforced_by_mainwp ): ?> disabled="disabled"<?php endif; ?>
1877
+ />
1878
+ <select name="pruning-unit" id="pruning-unit"<?php if ( $retention_settings_enforced_by_mainwp ): ?> disabled="disabled"<?php endif; ?> >
1879
+ <option value="months" <?php echo ( 'months' === $pruning_unit ) ? 'selected' : false; ?>><?php esc_html_e( 'Months', 'wp-security-audit-log' ); ?></option>
1880
+ <option value="years" <?php echo ( 'years' === $pruning_unit ) ? 'selected' : false; ?>><?php esc_html_e( 'Years', 'wp-security-audit-log' ); ?></option>
1881
+ </select>
1882
+ </fieldset>
1883
+
1884
+ <?php if ( $this->_plugin->settings()->IsPruningDateEnabled() ) : ?>
1885
+ <p class="description">
1886
+ <?php
1887
+ $next = wp_next_scheduled( 'wsal_cleanup' );
1888
+ echo esc_html__( 'The next scheduled purging of activity log data that is older than ', 'wp-security-audit-log' );
1889
+ echo esc_html( $pruning_date . ' ' . $pruning_unit );
1890
+ echo sprintf(
1891
+ ' is in %s.',
1892
+ esc_html( human_time_diff( current_time( 'timestamp' ), $next ) )
1893
+ );
1894
+ echo '<!-- ' . esc_html( date( 'dMy H:i:s', $next ) ) . ' --> ';
1895
+ echo esc_html__( 'You can run the purging process now by clicking the button below.', 'wp-security-audit-log' );
1896
+ ?>
1897
+ </p>
1898
+ <p>
1899
+ <a class="button-primary" href="<?php echo esc_url( add_query_arg( 'action', 'AjaxRunCleanup', admin_url( 'admin-ajax.php' ) ) ); ?>"><?php esc_html_e( 'Purge Old Data', 'wp-security-audit-log' ); ?></a>
1900
+ </p>
1901
+ <?php endif; ?>
1902
+ </td>
1903
+ </tr>
1904
+ <!-- Activity log retention -->
1905
+ </tbody>
1906
+ </table>
1907
+ <?php
1908
+ }
1909
  }
classes/Views/SetupWizard.php CHANGED
@@ -188,11 +188,6 @@ final class WSAL_Views_SetupWizard {
188
  'content' => array( $this, 'wsal_step_login' ),
189
  'save' => array( $this, 'wsal_step_login_save' ),
190
  ),
191
- '404s' => array(
192
- 'name' => __( '404s', 'wp-security-audit-log' ),
193
- 'content' => array( $this, 'wsal_step_404s' ),
194
- 'save' => array( $this, 'wsal_step_404s_save' ),
195
- ),
196
  'register' => array(
197
  'name' => __( 'User Registrations', 'wp-security-audit-log' ),
198
  'content' => array( $this, 'wsal_step_register' ),
@@ -313,7 +308,7 @@ final class WSAL_Views_SetupWizard {
313
  <?php do_action( 'admin_print_styles' ); ?>
314
  </head>
315
  <body class="wsal-setup wp-core-ui">
316
- <h1 id="wsal-logo"><a href="https://wpactivitylog.com/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=wizard+configuration" target="_blank"><img src="<?php echo esc_url( $this->wsal->GetBaseUrl() ); ?>/img/wsal-logo-full.png" alt="WP Activity Log" /></a></h1>
317
  <?php
318
  }
319
 
@@ -546,55 +541,7 @@ final class WSAL_Views_SetupWizard {
546
  $login_sensor = '1' === $login_sensor ? true : false; // Update the sensor option.
547
 
548
  $frontend_sensors['login'] = $login_sensor;
549
- $this->wsal->settings()->set_frontend_events( $frontend_sensors );
550
- }
551
-
552
- wp_safe_redirect( esc_url_raw( $this->get_next_step() ) );
553
- exit();
554
- }
555
-
556
- /**
557
- * Step View: `404s Sensor`
558
- */
559
- private function wsal_step_404s() {
560
- ?>
561
- <form method="post" class="wsal-setup-form">
562
- <?php wp_nonce_field( 'wsal-step-404s' ); ?>
563
- <h4><?php esc_html_e( 'Do you want to keep a log of (non-logged in) visitors’ requests to non-existing URLs which generate a HTTP 404 error response?', 'wp-security-audit-log' ); ?></h4>
564
- <fieldset>
565
- <label for="wsal-frontend-events-system-yes">
566
- <input id="wsal-frontend-events-system-yes" name="wsal-frontend-system" type="radio" value="1">
567
- <?php esc_html_e( 'Yes', 'wp-security-audit-log' ); ?>
568
- </label>
569
- <br />
570
- <label for="wsal-frontend-events-system-no">
571
- <input id="wsal-frontend-events-system-no" name="wsal-frontend-system" type="radio" value="0" checked>
572
- <?php esc_html_e( 'No', 'wp-security-audit-log' ); ?>
573
- </label>
574
- </fieldset>
575
- <!-- Question -->
576
- <p class="description"><?php esc_html_e( 'Note: You can change the WordPress activity log retention settings at any time from the plugin settings later on.', 'wp-security-audit-log' ); ?></p>
577
- <div class="wsal-setup-actions">
578
- <button class="button button-primary" type="submit" name="save_step" value="<?php esc_attr_e( 'Next', 'wp-security-audit-log' ); ?>"><?php esc_html_e( 'Next', 'wp-security-audit-log' ); ?></button>
579
- </div>
580
- </form>
581
- <?php
582
- }
583
-
584
- /**
585
- * Step Save: `404s Sensor`
586
- */
587
- private function wsal_step_404s_save() {
588
- // Check nonce.
589
- check_admin_referer( 'wsal-step-404s' );
590
-
591
- if ( isset( $_POST['wsal-frontend-system'] ) ) {
592
- $frontend_sensors = WSAL_Settings::get_frontend_events(); // Get the frontend sensors setting.
593
- $system_sensor = sanitize_text_field( wp_unslash( $_POST['wsal-frontend-system'] ) );
594
- $system_sensor = '1' === $system_sensor ? true : false; // Update the sensor option.
595
-
596
- $frontend_sensors['system'] = $system_sensor;
597
- $this->wsal->settings()->set_frontend_events( $frontend_sensors );
598
  }
599
 
600
  wp_safe_redirect( esc_url_raw( $this->get_next_step() ) );
@@ -643,7 +590,7 @@ final class WSAL_Views_SetupWizard {
643
  $register_sensor = '1' === $register_sensor ? true : false; // Update the sensor option.
644
 
645
  $frontend_sensors['register'] = $register_sensor;
646
- $this->wsal->settings()->set_frontend_events( $frontend_sensors );
647
  }
648
 
649
  wp_safe_redirect( esc_url_raw( $this->get_next_step() ) );
@@ -723,13 +670,8 @@ final class WSAL_Views_SetupWizard {
723
  if ( ! empty( $pruning_limit ) ) {
724
  switch ( $pruning_limit ) {
725
  case '6':
726
- // 6 months.
727
- $this->wsal->SetGlobalBooleanSetting( 'pruning-date-e', true );
728
- $this->wsal->SetGlobalSetting( 'pruning-date', $pruning_limit . ' months' );
729
- break;
730
-
731
  case '12':
732
- // 12 months.
733
  $this->wsal->SetGlobalBooleanSetting( 'pruning-date-e', true );
734
  $this->wsal->SetGlobalSetting( 'pruning-date', $pruning_limit . ' months' );
735
  break;
@@ -767,23 +709,23 @@ final class WSAL_Views_SetupWizard {
767
 
768
  <ul>
769
  <li>
770
- <a href="https://wpactivitylog.com/support/kb/getting-started-wp-activity-log/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=wizard+configuration" target="_blank">
771
  <?php esc_html_e( 'Getting started with the WP Activity Log plugin', 'wp-security-audit-log' ); ?>
772
  </a>
773
  </li>
774
  <li>
775
- <a href="https://wpactivitylog.com/support/kb/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=wizard+configuration" target="_blank">
776
  <?php esc_html_e( 'Knowledge Base & Support Documents', 'wp-security-audit-log' ); ?>
777
  </a>
778
  </li>
779
  <li>
780
- <a href="https://wpactivitylog.com/benefits-wordpress-activity-log/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=wizard+configuration" target="_blank">
781
  <?php esc_html_e( 'Benefits of keeping a WordPress activity log', 'wp-security-audit-log' ); ?>
782
  </a>
783
  </li>
784
  </ul>
785
 
786
- <p><?php echo wp_kses( __( 'We trust this plugin meets all your activity log requirements. Should you encounter any problems, have feature requests or would like to share some feedback, <a href="https://wpactivitylog.com/contact/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=wizard+configuration" target="_blank">please get in touch!</a>', 'wp-security-audit-log' ), $this->wsal->allowed_html_tags ); ?></p>
787
 
788
  <form method="post" class="wsal-setup-form">
789
  <?php wp_nonce_field( 'wsal-step-finish' ); ?>
@@ -865,7 +807,7 @@ final class WSAL_Views_SetupWizard {
865
  <?php
866
  // Create a nonce to pass through via data attr.
867
  $nonce = wp_create_nonce( 'wsal-install-addon' );
868
- $skip_addon = false;
869
  // Loop through plugins and output.
870
  foreach ( $our_plugins as $details ) {
871
  $disable_button = '';
188
  'content' => array( $this, 'wsal_step_login' ),
189
  'save' => array( $this, 'wsal_step_login_save' ),
190
  ),
 
 
 
 
 
191
  'register' => array(
192
  'name' => __( 'User Registrations', 'wp-security-audit-log' ),
193
  'content' => array( $this, 'wsal_step_register' ),
308
  <?php do_action( 'admin_print_styles' ); ?>
309
  </head>
310
  <body class="wsal-setup wp-core-ui">
311
+ <h1 id="wsal-logo"><a href="https://wpactivitylog.com/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=wizard+configuration" rel="noopener noreferrer" target="_blank"><img src="<?php echo esc_url( $this->wsal->GetBaseUrl() ); ?>/img/wsal-logo-full.png" alt="WP Activity Log" /></a></h1>
312
  <?php
313
  }
314
 
541
  $login_sensor = '1' === $login_sensor ? true : false; // Update the sensor option.
542
 
543
  $frontend_sensors['login'] = $login_sensor;
544
+ WSAL_Settings::set_frontend_events( $frontend_sensors );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
545
  }
546
 
547
  wp_safe_redirect( esc_url_raw( $this->get_next_step() ) );
590
  $register_sensor = '1' === $register_sensor ? true : false; // Update the sensor option.
591
 
592
  $frontend_sensors['register'] = $register_sensor;
593
+ WSAL_Settings::set_frontend_events( $frontend_sensors );
594
  }
595
 
596
  wp_safe_redirect( esc_url_raw( $this->get_next_step() ) );
670
  if ( ! empty( $pruning_limit ) ) {
671
  switch ( $pruning_limit ) {
672
  case '6':
 
 
 
 
 
673
  case '12':
674
+ // 6 or 12 months.
675
  $this->wsal->SetGlobalBooleanSetting( 'pruning-date-e', true );
676
  $this->wsal->SetGlobalSetting( 'pruning-date', $pruning_limit . ' months' );
677
  break;
709
 
710
  <ul>
711
  <li>
712
+ <a href="https://wpactivitylog.com/support/kb/getting-started-wp-activity-log/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=wizard+configuration" rel="noopener noreferrer" target="_blank">
713
  <?php esc_html_e( 'Getting started with the WP Activity Log plugin', 'wp-security-audit-log' ); ?>
714
  </a>
715
  </li>
716
  <li>
717
+ <a href="https://wpactivitylog.com/support/kb/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=wizard+configuration" rel="noopener noreferrer" target="_blank">
718
  <?php esc_html_e( 'Knowledge Base & Support Documents', 'wp-security-audit-log' ); ?>
719
  </a>
720
  </li>
721
  <li>
722
+ <a href="https://wpactivitylog.com/benefits-wordpress-activity-log/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=wizard+configuration" rel="noopener noreferrer" target="_blank">
723
  <?php esc_html_e( 'Benefits of keeping a WordPress activity log', 'wp-security-audit-log' ); ?>
724
  </a>
725
  </li>
726
  </ul>
727
 
728
+ <p><?php echo wp_kses( __( 'We trust this plugin meets all your activity log requirements. Should you encounter any problems, have feature requests or would like to share some feedback, <a href="https://wpactivitylog.com/contact/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=wizard+configuration" rel="noopener noreferrer" target="_blank">please get in touch!</a>', 'wp-security-audit-log' ), $this->wsal->allowed_html_tags ); ?></p>
729
 
730
  <form method="post" class="wsal-setup-form">
731
  <?php wp_nonce_field( 'wsal-step-finish' ); ?>
807
  <?php
808
  // Create a nonce to pass through via data attr.
809
  $nonce = wp_create_nonce( 'wsal-install-addon' );
810
+
811
  // Loop through plugins and output.
812
  foreach ( $our_plugins as $details ) {
813
  $disable_button = '';
classes/Views/ToggleAlerts.php CHANGED
@@ -68,11 +68,10 @@ class WSAL_Views_ToggleAlerts extends WSAL_AbstractView {
68
  // Filter $_POST array.
69
  $post_array = filter_input_array( INPUT_POST );
70
 
71
- // Assume front end events are disbaled unless we are told otherwise.
72
  $frontend_events = array(
73
  'register' => false,
74
  'login' => false,
75
- 'system' => false,
76
  'woocommerce' => false,
77
  );
78
 
@@ -82,44 +81,19 @@ class WSAL_Views_ToggleAlerts extends WSAL_AbstractView {
82
  }
83
 
84
  // Save enabled front end events.
85
- $this->_plugin->settings()->set_frontend_events( $frontend_events );
86
 
87
  $enabled = array_map( 'intval', $post_array['alert'] );
88
  $disabled = array();
89
  $registered_alerts = $this->_plugin->alerts->GetAlerts();
90
-
91
- // Now we check all registered events for further processing.
92
- foreach ( $registered_alerts as $alert ) {
93
- // 6023 (user visits 404) is tied to the 'system' checkbox, so if this is not checked,
94
- // set 6023 as a disabled event.
95
- if ( 6023 === $alert->type ) {
96
- if ( $frontend_events['system'] ) {
97
- $enabled[] = $alert->type;
98
- } else {
99
- $disabled[] = $alert->type;
100
- }
101
- }
102
- }
103
-
104
  $disabled = apply_filters( 'wsal_save_settings_disabled_events', $disabled, $registered_alerts, $frontend_events, $enabled );
105
 
106
  // Save the disabled events.
107
  $this->_plugin->alerts->SetDisabledAlerts( $disabled );
108
 
109
- $this->_plugin->SetGlobalBooleanSetting( 'log-404', isset( $post_array['log_404'] ) );
110
- $this->_plugin->SetGlobalBooleanSetting( 'purge-404-log', isset( $post_array['purge_log'] ) );
111
- $this->_plugin->SetGlobalBooleanSetting( 'log-404-referrer', isset( $post_array['log_404_referrer'] ) );
112
-
113
- $this->_plugin->SetGlobalBooleanSetting( 'log-visitor-404', isset( $post_array['log_visitor_404'] ) );
114
- $this->_plugin->SetGlobalBooleanSetting( 'purge-visitor-404-log', isset( $post_array['purge_visitor_log'] ) );
115
- $this->_plugin->SetGlobalBooleanSetting( 'log-visitor-404-referrer', isset( $post_array['log_visitor_404_referrer'] ) );
116
- $this->_plugin->SetGlobalBooleanSetting( 'wc-all-stock-changes', isset( $post_array['wc_all_stock_changes'] ) );
117
 
118
- $this->_plugin->settings()->Set404LogLimit( $post_array['user_404Limit'] );
119
- $this->_plugin->settings()->SetVisitor404LogLimit( $post_array['visitor_404Limit'] );
120
-
121
- $this->_plugin->settings()->set_failed_login_limit( $post_array['log_failed_login_limit'] );
122
- $this->_plugin->settings()->set_visitor_failed_login_limit( $post_array['log_visitor_failed_login_limit'] );
123
  }
124
 
125
  /**
@@ -178,19 +152,24 @@ class WSAL_Views_ToggleAlerts extends WSAL_AbstractView {
178
  $is_custom = ! empty( $events_diff ) ? true : false; // If difference is not empty then mode is custom.
179
  $log_details = $this->_plugin->GetGlobalSetting( 'details-level', false ); // Get log level option.
180
 
181
- $subcat_alerts = array( 1004, 2010, 2111, 9007, 9105, 9047 );
182
 
183
  // Allow further items to be added externally.
184
  $subcat_alerts = apply_filters( 'wsal_togglealerts_sub_category_events', $subcat_alerts );
185
 
186
- $obsolete_events = array( 9999, 2126, 6023, 9011, 9070, 9075, 4013 );
 
 
 
 
 
187
  ?>
188
  <p>
189
  <form method="post" id="wsal-alerts-level">
190
  <?php wp_nonce_field( 'wsal-log-level', 'wsal-log-level-nonce' ); ?>
191
  <fieldset>
192
  <label for="wsal-log-level"><?php esc_html_e( 'Log Level: ', 'wp-security-audit-log' ); ?></label>
193
- <select name="wsal-log-level" id="wsal-log-level" onchange="this.form.submit()">
194
  <option value="basic"
195
  <?php echo ( ! empty( $log_details ) && 'basic' === $log_details ) ? esc_attr( 'selected' ) : false; ?>
196
  >
@@ -215,9 +194,6 @@ class WSAL_Views_ToggleAlerts extends WSAL_AbstractView {
215
  <?php foreach ( $safe_names as $name => $safe ) : ?>
216
  <a href="#tab-<?php echo esc_attr( $safe ); ?>" class="nav-tab"><?php echo esc_html( $name ); ?></a>
217
  <?php endforeach; ?>
218
- <a href="#tab-frontend-events" class="nav-tab">
219
- <?php esc_html_e( 'Front-end Events', 'wp-security-audit-log' ); ?>
220
- </a>
221
  <a href="#tab-third-party-plugins" class="nav-tab">
222
  <?php esc_html_e( 'Third party plugins', 'wp-security-audit-log' ); ?>
223
  </a>
@@ -262,7 +238,7 @@ class WSAL_Views_ToggleAlerts extends WSAL_AbstractView {
262
  }
263
 
264
  // Disabled alerts.
265
- $disabled = '';
266
 
267
  // Skip Pages and CPTs section.
268
  if ( __( 'Custom Post Types', 'wp-security-audit-log' ) === $subname || __( 'Pages', 'wp-security-audit-log' ) === $subname ) {
@@ -279,7 +255,7 @@ class WSAL_Views_ToggleAlerts extends WSAL_AbstractView {
279
  if ( 'Multisite User Profiles' === $subname ) {
280
  // Check if this is a multisite.
281
  if ( ! is_multisite() ) {
282
- $disabled = 'disabled';
283
  }
284
  }
285
  break;
@@ -288,21 +264,21 @@ class WSAL_Views_ToggleAlerts extends WSAL_AbstractView {
288
  case 'WooCommerce Products':
289
  // Check if WooCommerce plugin exists.
290
  if ( ! WpSecurityAuditLog::is_woocommerce_active() ) {
291
- $disabled = 'disabled';
292
  }
293
  break;
294
 
295
  case 'Yoast SEO':
296
  // Check if Yoast SEO plugin exists.
297
  if ( ! WpSecurityAuditLog::is_wpseo_active() ) {
298
- $disabled = 'disabled';
299
  }
300
  break;
301
 
302
  case 'Multisite Network Sites':
303
  // Disable if not multisite.
304
  if ( ! is_multisite() ) {
305
- $disabled = 'disabled';
306
  }
307
  break;
308
 
@@ -310,11 +286,15 @@ class WSAL_Views_ToggleAlerts extends WSAL_AbstractView {
310
  break;
311
  }
312
  }
 
 
 
 
313
  ?>
314
  <table class="wp-list-table wsal-tab widefat fixed wsal-sub-tab" cellspacing="0" id="tab-<?php echo esc_attr( $this->GetSafeCatgName( $subname ) ); ?>">
315
  <thead>
316
  <tr>
317
- <th width="48"><input type="checkbox" <?php checked( $allactive ); ?> <?php echo esc_attr( $disabled ); ?> /></th>
318
  <th width="80"><?php esc_html_e( 'Code', 'wp-security-audit-log' ); ?></th>
319
  <th width="100"><?php esc_html_e( 'Severity', 'wp-security-audit-log' ); ?></th>
320
  <th><?php esc_html_e( 'Description', 'wp-security-audit-log' ); ?></th>
@@ -328,7 +308,7 @@ class WSAL_Views_ToggleAlerts extends WSAL_AbstractView {
328
  </td>
329
  </tr>
330
  <?php elseif ( __( 'WooCommerce', 'wp-security-audit-log' ) === $subname || __( 'WooCommerce Products', 'wp-security-audit-log' ) === $subname ) : ?>
331
- <?php if ( ! empty( $disabled ) ) : ?>
332
  <tr>
333
  <td colspan="4">
334
  <p class="wsal-tab-help wsal-tab-notice description"><?php esc_html_e( 'The plugin WooCommerce is not installed on your website so these events have been disabled.', 'wp-security-audit-log' ); ?></p>
@@ -348,7 +328,7 @@ class WSAL_Views_ToggleAlerts extends WSAL_AbstractView {
348
  </td>
349
  </tr>
350
  <?php elseif ( __( 'MultiSite', 'wp-security-audit-log' ) === $subname ) : ?>
351
- <?php if ( ! empty( $disabled ) ) : ?>
352
  <tr>
353
  <td colspan="4">
354
  <p class="wsal-tab-help wsal-tab-notice description"><?php esc_html_e( 'Your website is a single site so the multisite events have been disabled.', 'wp-security-audit-log' ); ?></p>
@@ -386,6 +366,9 @@ class WSAL_Views_ToggleAlerts extends WSAL_AbstractView {
386
  case false:
387
  $attrs = 'title="' . __( 'Not Available', 'wp-security-audit-log' ) . '" class="alert-unavailable"';
388
  break;
 
 
 
389
  }
390
  if ( in_array( $alert->type, $subcat_alerts, true ) ) {
391
  ?>
@@ -393,22 +376,23 @@ class WSAL_Views_ToggleAlerts extends WSAL_AbstractView {
393
  <td colspan="4">
394
  <h3 class="sub-category">
395
  <?php
396
- if ( 1004 === $alert->type ) {
397
- esc_html_e( 'User Sessions', 'wp-security-audit-log' );
398
- } elseif ( 2010 === $alert->type ) {
399
- esc_html_e( 'Files', 'wp-security-audit-log' );
400
- } elseif ( 2111 === $alert->type ) {
401
- esc_html_e( 'Post Settings', 'wp-security-audit-log' );
402
- } elseif ( 9007 === $alert->type ) {
403
- esc_html_e( 'Product Admin', 'wp-security-audit-log' );
404
- } elseif ( 9105 === $alert->type ) {
405
- esc_html_e( 'Product Stock Changes', 'wp-security-audit-log' );
406
- } elseif ( 9047 === $alert->type ) {
407
- esc_html_e( 'Product Attributes', 'wp-security-audit-log' );
408
- }
 
409
 
410
  // Allow further titles to be added externally.
411
- $subcat_title = apply_filters( 'wsal_togglealerts_sub_category_titles', $alert->type );
412
  if ( $subcat_title ) {
413
  echo esc_html( $subcat_title );
414
  }
@@ -428,8 +412,8 @@ class WSAL_Views_ToggleAlerts extends WSAL_AbstractView {
428
  <?php checked( $active[ $alert->type ] ); ?>
429
  value="<?php echo esc_attr( (int) $alert->type ); ?>"
430
  <?php
431
- if ( ! empty( $disabled ) ) {
432
- echo esc_attr( $disabled );
433
  }
434
  ?>
435
  <?php echo ( __( 'File Changes', 'wp-security-audit-log' ) === $subname ) ? 'onclick="wsal_toggle_file_changes(this)"' : false; ?>
@@ -463,39 +447,32 @@ class WSAL_Views_ToggleAlerts extends WSAL_AbstractView {
463
  <td><?php echo esc_html( $alert->desc ); ?></td>
464
  </tr>
465
  <?php
466
- if ( 6007 === $alert->type ) {
467
- $log_404 = $this->_plugin->GetGlobalBooleanSetting( 'log-404' );
468
- $purge_log = $this->_plugin->GetGlobalBooleanSetting( 'purge-404-log' );
469
- $log_404_referrer = $this->_plugin->GetGlobalBooleanSetting( 'log-404-referrer', true );
470
  ?>
471
  <tr>
472
  <td></td>
473
- <td>
474
- <input name="log_404" type="checkbox" class="check_log" value="1"
475
- <?php checked( $log_404 ); ?> />
476
  </td>
477
- <td colspan="2"><?php esc_html_e( 'Capture 404 requests to file (the log file are created in the /wp-content/uploads/wp-activity-log/404s/ directory)', 'wp-security-audit-log' ); ?></td>
478
  </tr>
 
 
 
 
 
 
479
  <tr>
480
  <td></td>
481
- <td>
482
- <input name="purge_log" type="checkbox" class="check_log" value="1"
483
- <?php checked( $purge_log ); ?> />
484
  </td>
485
- <td colspan="2"><?php esc_html_e( 'Purge log files older than one month', 'wp-security-audit-log' ); ?></td>
486
- </tr>
487
- <tr>
488
- <td></td>
489
- <td colspan="1"><input type="number" id="user_404Limit" name="user_404Limit" value="<?php echo esc_attr( $this->_plugin->settings()->Get404LogLimit() ); ?>" /></td>
490
- <td colspan="2"><?php esc_html_e( 'Number of 404 Requests to Log. By default the plugin keeps up to 99 requests to non-existing pages from the same IP address. Increase the value in this setting to the desired amount to keep a log of more or less requests.', 'wp-security-audit-log' ); ?></td>
491
- </tr>
492
- <tr>
493
- <td></td>
494
- <td><input name="log_404_referrer" type="checkbox" class="check_log" value="1" <?php checked( $log_404_referrer ); ?>></td>
495
- <td colspan="2"><?php esc_html_e( 'Record the referrer that generated the 404 error.', 'wp-security-audit-log' ); ?></td>
496
  </tr>
497
  <?php
498
  }
 
499
  if ( 1002 === $alert->type ) {
500
  $log_failed_login_limit = (int) $this->_plugin->GetGlobalSetting( 'log-failed-login-limit', 10 );
501
  $log_failed_login_limit = ( -1 === $log_failed_login_limit ) ? '0' : $log_failed_login_limit;
@@ -522,32 +499,16 @@ class WSAL_Views_ToggleAlerts extends WSAL_AbstractView {
522
  </tr>
523
  <?php
524
  }
525
- if ( 9019 === $alert->type ) {
526
- $wc_all_stock_changes = $this->_plugin->GetGlobalBooleanSetting( 'wc-all-stock-changes', true );
527
- ?>
528
- <tr>
529
- <td></td>
530
- <td>
531
- <input name="wc_all_stock_changes" type="checkbox" id="wc_all_stock_changes" value="1" <?php checked( $wc_all_stock_changes ); ?> />
532
- </td>
533
- <td colspan="2"><?php esc_html_e( 'Log all stock changes. Disable this setting to only keep a log of stock changes done manually via the WooCommerce dashboard. Therefore automated stock changes typically done via customers placing orders or via other plugins will not be logged.', 'wp-security-audit-log' ); ?></td>
534
- </tr>
535
- <?php
536
- }
537
  }
538
 
539
  // File integrity scan link.
540
  if ( __( 'Monitor File Changes', 'wp-security-audit-log' ) === $subname && ! defined( 'WFCM_PLUGIN_FILE' ) ) :
541
- $wsal_settings_page = '';
542
  $redirect_args = array(
543
  'page' => 'wsal-settings',
544
  'tab' => 'file-changes',
545
  );
546
- if ( ! is_multisite() ) {
547
- $wsal_settings_page = add_query_arg( $redirect_args, admin_url( 'admin.php' ) );
548
- } else {
549
- $wsal_settings_page = add_query_arg( $redirect_args, network_admin_url( 'admin.php' ) );
550
- }
551
  ?>
552
  <tr>
553
  <td>
@@ -555,7 +516,7 @@ class WSAL_Views_ToggleAlerts extends WSAL_AbstractView {
555
  <img src="<?php echo trailingslashit( WSAL_BASE_URL ) . 'img/help/website-file-changes-monitor.jpg'; ?>">
556
  <h4><?php echo esc_html__( 'Website File Changes Monitor', 'wp-security-audit-log' ); ?></h4>
557
  <p><?php echo esc_html__( 'To keep a log of file changes please install Website File Changes Monitor, a plugin which is also developed by us.', 'wp-security-audit-log' ); ?></p><br>
558
- <p><button class="install-addon button button-primary" data-nonce="<?php echo esc_attr( wp_create_nonce( 'wsal-install-addon' ) ); ?>" data-plugin-slug="website-file-changes-monitor/website-file-changes-monitor.php" data-plugin-download-url="https://downloads.wordpress.org/plugin/website-file-changes-monitor.latest-stable.zip"><?php _e( 'Install plugin now', 'wp-security-audit-log' ); ?></button><span class="spinner" style="display: none; visibility: visible; float: none; margin: 0 0 0 8px;"></span> <a href="https://wpactivitylog.com/support/kb/wordpress-files-changes-warning-activity-logs/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=settings+pages" target="_blank" style="margin-left: 15px;"><?php echo esc_html__( 'Learn More', 'wp-security-audit-log' ); ?></a></p>
559
  </div>
560
  </td>
561
  </tr>
@@ -574,72 +535,6 @@ class WSAL_Views_ToggleAlerts extends WSAL_AbstractView {
574
  ?>
575
  </div>
576
  <?php endforeach; ?>
577
- <?php
578
- $frontend_events = WSAL_Settings::get_frontend_events();
579
- ?>
580
- <table id="tab-frontend-events" class="form-table wp-list-table wsal-tab widefat fixed" style="display: table;" cellspacing="0">
581
- <tbody>
582
- <tr>
583
- <td>
584
- <p><?php esc_html_e( 'This plugin keeps a log of what your website users are doing when they are logged in. On top of that it can also keep a log of some important events of (non logged in) website visitors. Use the below settings to enable / disable any of the front-end sensors:', 'wp-security-audit-log' ); ?></p>
585
- </td>
586
- </tr>
587
- <tr>
588
- <td>
589
- <h3 style="margin:0"><?php esc_html_e( 'Front-end users registrations', 'wp-security-audit-log' ); ?></h3>
590
- </td>
591
- </tr>
592
- <tr>
593
- <th><input type="checkbox" name="frontend-events[register]" id="frontend-events-register" value="1" <?php checked( $frontend_events['register'] ); ?>></th>
594
- <td>
595
- <label for="frontend-events-register"><?php esc_html_e( 'Keep a log when a visitor registers a user on the website. Only enable this if you allow visitors to register as users on your website. User registration is disabled by default in WordPress.', 'wp-security-audit-log' ); ?></label>
596
- </td>
597
- </tr>
598
- <tr>
599
- <td>
600
- <h3 style="margin:0"><?php esc_html_e( 'Front-end users logins', 'wp-security-audit-log' ); ?></h3>
601
- </td>
602
- </tr>
603
- <tr>
604
- <th><input type="checkbox" name="frontend-events[login]" id="frontend-events-login" value="1" <?php checked( $frontend_events['login'] ); ?>></th>
605
- <td>
606
- <label for="frontend-events-login"><?php esc_html_e( 'Keep a log when users login to the website from other login pages / forms other than the default WordPress login page.', 'wp-security-audit-log' ); ?></label>
607
- </td>
608
- </tr>
609
- <tr>
610
- <td>
611
- <h3 style="margin:0"><?php esc_html_e( 'Website visitors 404 errors', 'wp-security-audit-log' ); ?></h3>
612
- </td>
613
- </tr>
614
- <tr>
615
- <th><input type="checkbox" name="frontend-events[system]" id="frontend-events-system" value="1" <?php checked( $frontend_events['system'] ); ?>></th>
616
- <td >
617
- <label for="frontend-events-system"><?php esc_html_e( 'Event ID 6023: Keep a log when a website visitor requests a non-existing URL (HTTP 404 response error).', 'wp-security-audit-log' ); ?></label>
618
- </td>
619
- </tr>
620
- <?php
621
- $log_visitor_404 = $this->_plugin->GetGlobalBooleanSetting( 'log-visitor-404' );
622
- $purge_visitor_log = $this->_plugin->GetGlobalBooleanSetting( 'purge-visitor-404-log' );
623
- $log_visitor_404_referrer = $this->_plugin->GetGlobalBooleanSetting( 'log-visitor-404-referrer', 'on' );
624
- ?>
625
- <tr>
626
- <td><input name="log_visitor_404" type="checkbox" class="check_visitor_log" value="1" <?php checked( $log_visitor_404 ); ?> /></td>
627
- <td><?php esc_html_e( 'Capture 404 requests to file (the log file are created in the /wp-content/uploads/wp-activity-log/404s/ directory)', 'wp-security-audit-log' ); ?></td>
628
- </tr>
629
- <tr>
630
- <td><input name="purge_visitor_log" type="checkbox" class="check_visitor_log" value="1" <?php checked( $purge_visitor_log ); ?> /></td>
631
- <td><?php esc_html_e( 'Purge log files older than one month', 'wp-security-audit-log' ); ?></td>
632
- </tr>
633
- <tr>
634
- <td><input type="number" id="visitor_404Limit" name="visitor_404Limit" value="<?php echo esc_attr( $this->_plugin->settings()->GetVisitor404LogLimit() ); ?>" /></td>
635
- <td><?php esc_html_e( 'Number of 404 Requests to Log. By default the plugin keeps up to 99 requests to non-existing pages from the same IP address. Increase the value in this setting to the desired amount to keep a log of more or less requests. Note that by increasing this value to a high number, should your website be scanned the plugin will consume more resources to log all the requests.', 'wp-security-audit-log' ); ?></td>
636
- </tr>
637
- <tr>
638
- <td><input name="log_visitor_404_referrer" type="checkbox" class="check_log" value="1" <?php checked( $log_visitor_404_referrer ); ?>></td>
639
- <td><?php esc_html_e( 'Record the referrer that generated the 404 error.', 'wp-security-audit-log' ); ?></td>
640
- </tr>
641
- </tbody>
642
- </table>
643
  <?php
644
  $addons = new WSAL_PluginInstallAndActivate();
645
  $addons->render();
@@ -837,45 +732,17 @@ class WSAL_Views_ToggleAlerts extends WSAL_AbstractView {
837
  jQuery('#wsal-tabs>a:first').click();
838
  jQuery('.wsal-sub-tabs>a:first').click();
839
  }
840
-
841
- // Specific for alert 6007
842
- jQuery("input[value=6007]").on("change", function(){
843
- var check = jQuery("input[value=6007]").is(":checked");
844
- if(check) {
845
- jQuery(".check_log").attr ( "checked" ,"checked" );
846
- } else {
847
- jQuery(".check_log").removeAttr('checked');
848
- }
849
- });
850
-
851
- // Specific for alert 6023
852
- jQuery("input[value=6023]").on("change", function(){
853
- var check = jQuery("input[value=6023]").is(":checked");
854
- if(check) {
855
- jQuery(".check_visitor_log").attr ( "checked" ,"checked" );
856
- } else {
857
- jQuery(".check_visitor_log").removeAttr('checked');
858
- }
859
- });
860
-
861
- // Specific for alert 9019
862
- jQuery("input[value=9019]").on("change", function(){
863
- var check = jQuery("input[value=9019]").is(":checked");
864
- if(check) {
865
- jQuery("#wc_all_stock_changes").attr ( "checked" ,"checked" );
866
- } else {
867
- jQuery("#wc_all_stock_changes").removeAttr('checked');
868
- }
869
- });
870
  });
871
 
872
- jQuery(document).on('closed', toggle_modal, function (event) {
873
- if (event.reason && event.reason === 'cancellation') {
874
- for ( var index = 0; index < alerts.length; index++ ) {
875
- jQuery( alerts[ index ] ).prop( 'checked', false );
 
 
876
  }
877
- }
878
- });
879
  </script>
880
  <?php
881
  }
68
  // Filter $_POST array.
69
  $post_array = filter_input_array( INPUT_POST );
70
 
71
+ // Assume front end events are disabled unless we are told otherwise.
72
  $frontend_events = array(
73
  'register' => false,
74
  'login' => false,
 
75
  'woocommerce' => false,
76
  );
77
 
81
  }
82
 
83
  // Save enabled front end events.
84
+ WSAL_Settings::set_frontend_events( $frontend_events );
85
 
86
  $enabled = array_map( 'intval', $post_array['alert'] );
87
  $disabled = array();
88
  $registered_alerts = $this->_plugin->alerts->GetAlerts();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  $disabled = apply_filters( 'wsal_save_settings_disabled_events', $disabled, $registered_alerts, $frontend_events, $enabled );
90
 
91
  // Save the disabled events.
92
  $this->_plugin->alerts->SetDisabledAlerts( $disabled );
93
 
94
+ // Allow 3rd parties to process and save more of the posted data
95
+ do_action( 'wsal_togglealerts_process_save_settings', $post_array );
 
 
 
 
 
 
96
 
 
 
 
 
 
97
  }
98
 
99
  /**
152
  $is_custom = ! empty( $events_diff ) ? true : false; // If difference is not empty then mode is custom.
153
  $log_details = $this->_plugin->GetGlobalSetting( 'details-level', false ); // Get log level option.
154
 
155
+ $subcat_alerts = array( 1004, 2010, 2111 );
156
 
157
  // Allow further items to be added externally.
158
  $subcat_alerts = apply_filters( 'wsal_togglealerts_sub_category_events', $subcat_alerts );
159
 
160
+ $obsolete_events = array( 9999, 2126, 9011, 9070, 9075, 4013 );
161
+
162
+ // check if the disabled events are enforced from the MainWP master site
163
+ $settings = $this->_plugin->settings();
164
+ $enforced_settings = $settings->get_mainwp_enforced_settings();
165
+ $disabled_events_enforced_by_mainwp = array_key_exists( 'disabled_events', $enforced_settings ) && ! empty( $enforced_settings[ 'disabled_events' ]);
166
  ?>
167
  <p>
168
  <form method="post" id="wsal-alerts-level">
169
  <?php wp_nonce_field( 'wsal-log-level', 'wsal-log-level-nonce' ); ?>
170
  <fieldset>
171
  <label for="wsal-log-level"><?php esc_html_e( 'Log Level: ', 'wp-security-audit-log' ); ?></label>
172
+ <select name="wsal-log-level" id="wsal-log-level" onchange="this.form.submit()"<?php if ( $disabled_events_enforced_by_mainwp ): ?> disabled="disabled"<?php endif; ?>>
173
  <option value="basic"
174
  <?php echo ( ! empty( $log_details ) && 'basic' === $log_details ) ? esc_attr( 'selected' ) : false; ?>
175
  >
194
  <?php foreach ( $safe_names as $name => $safe ) : ?>
195
  <a href="#tab-<?php echo esc_attr( $safe ); ?>" class="nav-tab"><?php echo esc_html( $name ); ?></a>
196
  <?php endforeach; ?>
 
 
 
197
  <a href="#tab-third-party-plugins" class="nav-tab">
198
  <?php esc_html_e( 'Third party plugins', 'wp-security-audit-log' ); ?>
199
  </a>
238
  }
239
 
240
  // Disabled alerts.
241
+ $disable_inputs = '';
242
 
243
  // Skip Pages and CPTs section.
244
  if ( __( 'Custom Post Types', 'wp-security-audit-log' ) === $subname || __( 'Pages', 'wp-security-audit-log' ) === $subname ) {
255
  if ( 'Multisite User Profiles' === $subname ) {
256
  // Check if this is a multisite.
257
  if ( ! is_multisite() ) {
258
+ $disable_inputs = 'disabled';
259
  }
260
  }
261
  break;
264
  case 'WooCommerce Products':
265
  // Check if WooCommerce plugin exists.
266
  if ( ! WpSecurityAuditLog::is_woocommerce_active() ) {
267
+ $disable_inputs = 'disabled';
268
  }
269
  break;
270
 
271
  case 'Yoast SEO':
272
  // Check if Yoast SEO plugin exists.
273
  if ( ! WpSecurityAuditLog::is_wpseo_active() ) {
274
+ $disable_inputs = 'disabled';
275
  }
276
  break;
277
 
278
  case 'Multisite Network Sites':
279
  // Disable if not multisite.
280
  if ( ! is_multisite() ) {
281
+ $disable_inputs = 'disabled';
282
  }
283
  break;
284
 
286
  break;
287
  }
288
  }
289
+
290
+ if ( $disabled_events_enforced_by_mainwp ) {
291
+ $disable_inputs = 'disabled';
292
+ }
293
  ?>
294
  <table class="wp-list-table wsal-tab widefat fixed wsal-sub-tab" cellspacing="0" id="tab-<?php echo esc_attr( $this->GetSafeCatgName( $subname ) ); ?>">
295
  <thead>
296
  <tr>
297
+ <th width="48"><input type="checkbox" <?php checked( $allactive ); ?> <?php echo esc_attr( $disable_inputs ); ?> /></th>
298
  <th width="80"><?php esc_html_e( 'Code', 'wp-security-audit-log' ); ?></th>
299
  <th width="100"><?php esc_html_e( 'Severity', 'wp-security-audit-log' ); ?></th>
300
  <th><?php esc_html_e( 'Description', 'wp-security-audit-log' ); ?></th>
308
  </td>
309
  </tr>
310
  <?php elseif ( __( 'WooCommerce', 'wp-security-audit-log' ) === $subname || __( 'WooCommerce Products', 'wp-security-audit-log' ) === $subname ) : ?>
311
+ <?php if ( ! empty( $disable_inputs ) ) : ?>
312
  <tr>
313
  <td colspan="4">
314
  <p class="wsal-tab-help wsal-tab-notice description"><?php esc_html_e( 'The plugin WooCommerce is not installed on your website so these events have been disabled.', 'wp-security-audit-log' ); ?></p>
328
  </td>
329
  </tr>
330
  <?php elseif ( __( 'MultiSite', 'wp-security-audit-log' ) === $subname ) : ?>
331
+ <?php if ( ! empty( $disable_inputs ) ) : ?>
332
  <tr>
333
  <td colspan="4">
334
  <p class="wsal-tab-help wsal-tab-notice description"><?php esc_html_e( 'Your website is a single site so the multisite events have been disabled.', 'wp-security-audit-log' ); ?></p>
366
  case false:
367
  $attrs = 'title="' . __( 'Not Available', 'wp-security-audit-log' ) . '" class="alert-unavailable"';
368
  break;
369
+ default:
370
+ // fallback for any other cases would go here
371
+ break;
372
  }
373
  if ( in_array( $alert->type, $subcat_alerts, true ) ) {
374
  ?>
376
  <td colspan="4">
377
  <h3 class="sub-category">
378
  <?php
379
+ $subcat_title = '';
380
+ switch ( $alert->type ) {
381
+ case 1004:
382
+ $subcat_title = esc_html__( 'User Sessions', 'wp-security-audit-log' );
383
+ break;
384
+ case 2010:
385
+ $subcat_title = esc_html__( 'Files', 'wp-security-audit-log' );
386
+ break;
387
+ case 2011:
388
+ $subcat_title = esc_html__( 'Post Settings', 'wp-security-audit-log' );
389
+ break;
390
+ default:
391
+ break;
392
+ }
393
 
394
  // Allow further titles to be added externally.
395
+ $subcat_title = apply_filters( 'wsal_togglealerts_sub_category_titles', $subcat_title, $alert->type );
396
  if ( $subcat_title ) {
397
  echo esc_html( $subcat_title );
398
  }
412
  <?php checked( $active[ $alert->type ] ); ?>
413
  value="<?php echo esc_attr( (int) $alert->type ); ?>"
414
  <?php
415
+ if ( ! empty( $disable_inputs ) ) {
416
+ echo esc_attr( $disable_inputs );
417
  }
418
  ?>
419
  <?php echo ( __( 'File Changes', 'wp-security-audit-log' ) === $subname ) ? 'onclick="wsal_toggle_file_changes(this)"' : false; ?>
447
  <td><?php echo esc_html( $alert->desc ); ?></td>
448
  </tr>
449
  <?php
450
+ if ( 1000 === $alert->type ) {
451
+ $frontend_events = WSAL_Settings::get_frontend_events();
 
 
452
  ?>
453
  <tr>
454
  <td></td>
455
+ <td><input type="checkbox" name="frontend-events[login]" id="frontend-events-login" value="1" <?php checked( $frontend_events['login'] ); ?>></td>
456
+ <td colspan="2">
457
+ <label for="frontend-events-login"><?php esc_html_e( 'Keep a log when users login to the website from other login pages / forms other than the default WordPress login page.', 'wp-security-audit-log' ); ?></label>
458
  </td>
 
459
  </tr>
460
+ <?php
461
+ }
462
+
463
+ if ( 4000 === $alert->type ) {
464
+ $frontend_events = WSAL_Settings::get_frontend_events();
465
+ ?>
466
  <tr>
467
  <td></td>
468
+ <td><input type="checkbox" name="frontend-events[register]" id="frontend-events-register" value="1" <?php checked( $frontend_events['register'] ); ?>></td>
469
+ <td colspan="2">
470
+ <label for="frontend-events-register"><?php esc_html_e( 'Keep a log when a visitor registers a user on the website. Only enable this if you allow visitors to register as users on your website. User registration is disabled by default in WordPress.', 'wp-security-audit-log' ); ?></label>
471
  </td>
 
 
 
 
 
 
 
 
 
 
 
472
  </tr>
473
  <?php
474
  }
475
+
476
  if ( 1002 === $alert->type ) {
477
  $log_failed_login_limit = (int) $this->_plugin->GetGlobalSetting( 'log-failed-login-limit', 10 );
478
  $log_failed_login_limit = ( -1 === $log_failed_login_limit ) ? '0' : $log_failed_login_limit;
499
  </tr>
500
  <?php
501
  }
502
+
503
+ do_action( 'wsal_togglealerts_append_content_to_toggle', $alert->type );
 
 
 
 
 
 
 
 
 
 
504
  }
505
 
506
  // File integrity scan link.
507
  if ( __( 'Monitor File Changes', 'wp-security-audit-log' ) === $subname && ! defined( 'WFCM_PLUGIN_FILE' ) ) :
 
508
  $redirect_args = array(
509
  'page' => 'wsal-settings',
510
  'tab' => 'file-changes',
511
  );
 
 
 
 
 
512
  ?>
513
  <tr>
514
  <td>
516
  <img src="<?php echo trailingslashit( WSAL_BASE_URL ) . 'img/help/website-file-changes-monitor.jpg'; ?>">
517
  <h4><?php echo esc_html__( 'Website File Changes Monitor', 'wp-security-audit-log' ); ?></h4>
518
  <p><?php echo esc_html__( 'To keep a log of file changes please install Website File Changes Monitor, a plugin which is also developed by us.', 'wp-security-audit-log' ); ?></p><br>
519
+ <p><button class="install-addon button button-primary" data-nonce="<?php echo esc_attr( wp_create_nonce( 'wsal-install-addon' ) ); ?>" data-plugin-slug="website-file-changes-monitor/website-file-changes-monitor.php" data-plugin-download-url="https://downloads.wordpress.org/plugin/website-file-changes-monitor.latest-stable.zip"><?php _e( 'Install plugin now', 'wp-security-audit-log' ); ?></button><span class="spinner" style="display: none; visibility: visible; float: none; margin: 0 0 0 8px;"></span> <a href="https://wpactivitylog.com/support/kb/wordpress-files-changes-warning-activity-logs/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=settings+pages" rel="noopener noreferrer" target="_blank" style="margin-left: 15px;"><?php echo esc_html__( 'Learn More', 'wp-security-audit-log' ); ?></a></p>
520
  </div>
521
  </td>
522
  </tr>
535
  ?>
536
  </div>
537
  <?php endforeach; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
538
  <?php
539
  $addons = new WSAL_PluginInstallAndActivate();
540
  $addons->render();
732
  jQuery('#wsal-tabs>a:first').click();
733
  jQuery('.wsal-sub-tabs>a:first').click();
734
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
735
  });
736
 
737
+ if (typeof toggle_modal !== 'undefined') {
738
+ jQuery(document).on('closed', toggle_modal, function (event) {
739
+ if (event.reason && event.reason === 'cancellation') {
740
+ for ( var index = 0; index < alerts.length; index++ ) {
741
+ jQuery( alerts[ index ] ).prop( 'checked', false );
742
+ }
743
  }
744
+ });
745
+ }
746
  </script>
747
  <?php
748
  }
classes/Views/addons/html-view.php CHANGED
@@ -30,6 +30,9 @@ switch ( $this->hook_suffix ) {
30
  case 'audit-log_page_wsal-search':
31
  $utm_params['utm_content'] = 'search';
32
  break;
 
 
 
33
  }
34
  // Links.
35
  $more_info = add_query_arg(
30
  case 'audit-log_page_wsal-search':
31
  $utm_params['utm_content'] = 'search';
32
  break;
33
+ default:
34
+ // fallback for any other hook suffices would go here
35
+ break;
36
  }
37
  // Links.
38
  $more_info = add_query_arg(
css/auditlog.css CHANGED
@@ -209,13 +209,21 @@ td.column-user {
209
  }
210
  .dark-tooltip.small{
211
  margin-left: 10px;
212
- font-size:13px;
213
- padding:5px 10px;
214
- max-width:150px;
215
  -webkit-border-radius: 3px;
216
  -moz-border-radius: 3px;
217
  border-radius: 3px;
 
218
  }
 
 
 
 
 
 
 
 
219
  .dark-tooltip.medium{
220
  margin-left: -15px;
221
  font-size:13px;
209
  }
210
  .dark-tooltip.small{
211
  margin-left: 10px;
212
+ font-size: 13px;
213
+ padding: 16px 16px;
 
214
  -webkit-border-radius: 3px;
215
  -moz-border-radius: 3px;
216
  border-radius: 3px;
217
+ max-width: 280px;
218
  }
219
+ .dark-tooltip.small > div {
220
+ line-height: 1.6;
221
+ margin-bottom: 10px;
222
+ }
223
+ .dark-tooltip.small > div strong {
224
+ margin-bottom: 10px;
225
+ display: inline-block;
226
+ }
227
  .dark-tooltip.medium{
228
  margin-left: -15px;
229
  font-size:13px;
css/src/common.scss DELETED
File without changes
defaults.php CHANGED
@@ -301,7 +301,7 @@ function wsaldefaults_wsal_init() {
301
 
302
  __( 'User Accounts', 'wp-security-audit-log' ) => array(
303
  __( 'User Profiles', 'wp-security-audit-log' ) => array(
304
- array( 4000, WSAL_CRITICAL, __( 'New user was created on WordPress', 'wp-security-audit-log' ), __( 'New user: %NewUserData->Username% %LineBreak% Role: %NewUserData->Roles% %LineBreak% First name: %NewUserData->FirstName% %LineBreak% Last name: %NewUserData->LastName% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'created' ),
305
  array( 4001, WSAL_CRITICAL, __( 'User created another WordPress user', 'wp-security-audit-log' ), __( 'New user: %NewUserData->Username% %LineBreak% Role: %NewUserData->Roles% %LineBreak% First name: %NewUserData->FirstName% %LineBreak% Last name: %NewUserData->LastName% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'created' ),
306
  array( 4002, WSAL_CRITICAL, __( 'The role of a user was changed by another WordPress user', 'wp-security-audit-log' ), __( 'Changed the role of the user %TargetUsername% %LineBreak% New role: %NewRole% %LineBreak% Previous role: %OldRole% %LineBreak% First name: %FirstName% %LineBreak% Last name: %LastName% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'modified' ),
307
  array( 4003, WSAL_HIGH, __( 'User has changed his or her password', 'wp-security-audit-log' ), __( 'Changed the password %LineBreak% First name: %TargetUserData->FirstName% %LineBreak% Last name: %TargetUserData->LastName% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'modified' ),
@@ -381,14 +381,10 @@ function wsaldefaults_wsal_init() {
381
  ),
382
 
383
  __( 'Activity log plugin', 'wp-security-audit-log' ) => array(
384
- array( 6000, WSAL_INFORMATIONAL, __( 'Events automatically pruned by system', 'wp-security-audit-log' ), __( 'System automatically deleted %EventCount% event(s)', 'wp-security-audit-log' ), 'activity-logs', 'deleted' ),
385
  array( 6006, WSAL_MEDIUM, __( 'Reset the plugin\'s settings to default', 'wp-security-audit-log' ), __( 'Reset the WP Activity Log plugin settings to default', 'wp-security-audit-log' ), 'wp-activity-log', 'modified' ),
386
- array( 6034, WSAL_CRITICAL, __( 'Purged the activity log', 'wp-security-audit-log' ), __( 'Purged the activity log', 'wp-security-audit-log' ), 'activity-logs', 'deleted' ),
387
- ),
388
-
389
- __( 'User/Visitor Actions', 'wp-security-audit-log' ) => array(
390
- array( 6007, WSAL_INFORMATIONAL, __( 'User requests non-existing pages (404 Error Pages)', 'wp-security-audit-log' ), __( 'Has requested a non existing page (404 error) %LineBreak% Number of times: %Attempts%', 'wp-security-audit-log' ), 'system', 'opened' ),
391
- array( 6023, WSAL_INFORMATIONAL, __( 'Website Visitor User requests non-existing pages (404 Error Pages)', 'wp-security-audit-log' ), __( 'Website visitor has requested a non existing page (404 error) %LineBreak% Number of times: %Attempts%', 'wp-security-audit-log' ), 'system', 'opened' ),
392
  ),
393
 
394
  __( 'WordPress Site Settings', 'wp-security-audit-log' ) => array(
@@ -420,6 +416,7 @@ function wsaldefaults_wsal_init() {
420
  array( 7003, WSAL_HIGH, __( 'Deactivated site has been activated', 'wp-security-audit-log' ), __( 'Activated the site: %SiteName% %LineBreak% URL: %BlogURL%', 'wp-security-audit-log' ), 'multisite-network', 'activated' ),
421
  array( 7004, WSAL_HIGH, __( 'Site has been deactivated', 'wp-security-audit-log' ), __( 'Deactivated the site: %SiteName% %LineBreak% URL: %BlogURL%', 'wp-security-audit-log' ), 'multisite-network', 'deactivated' ),
422
  array( 7005, WSAL_HIGH, __( 'Existing site deleted from network', 'wp-security-audit-log' ), __( 'The site: %SiteName% %LineBreak% URL: %BlogURL%', 'wp-security-audit-log' ), 'multisite-network', 'deleted' ),
 
423
  ),
424
  ),
425
  )
301
 
302
  __( 'User Accounts', 'wp-security-audit-log' ) => array(
303
  __( 'User Profiles', 'wp-security-audit-log' ) => array(
304
+ array( 4000, WSAL_CRITICAL, __( 'New user was created on WordPress', 'wp-security-audit-log' ), __( 'New user: %NewUserData->Username% %LineBreak% Role: %NewUserData->Roles% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'created' ),
305
  array( 4001, WSAL_CRITICAL, __( 'User created another WordPress user', 'wp-security-audit-log' ), __( 'New user: %NewUserData->Username% %LineBreak% Role: %NewUserData->Roles% %LineBreak% First name: %NewUserData->FirstName% %LineBreak% Last name: %NewUserData->LastName% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'created' ),
306
  array( 4002, WSAL_CRITICAL, __( 'The role of a user was changed by another WordPress user', 'wp-security-audit-log' ), __( 'Changed the role of the user %TargetUsername% %LineBreak% New role: %NewRole% %LineBreak% Previous role: %OldRole% %LineBreak% First name: %FirstName% %LineBreak% Last name: %LastName% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'modified' ),
307
  array( 4003, WSAL_HIGH, __( 'User has changed his or her password', 'wp-security-audit-log' ), __( 'Changed the password %LineBreak% First name: %TargetUserData->FirstName% %LineBreak% Last name: %TargetUserData->LastName% %LineBreak% %EditUserLink%', 'wp-security-audit-log' ), 'user', 'modified' ),
381
  ),
382
 
383
  __( 'Activity log plugin', 'wp-security-audit-log' ) => array(
384
+ array( 6000, WSAL_INFORMATIONAL, __( 'Events automatically pruned by system', 'wp-security-audit-log' ), __( 'System automatically deleted %EventCount% event(s)', 'wp-security-audit-log' ), 'wp-activity-log', 'deleted' ),
385
  array( 6006, WSAL_MEDIUM, __( 'Reset the plugin\'s settings to default', 'wp-security-audit-log' ), __( 'Reset the WP Activity Log plugin settings to default', 'wp-security-audit-log' ), 'wp-activity-log', 'modified' ),
386
+ array( 6034, WSAL_CRITICAL, __( 'Purged the activity log', 'wp-security-audit-log' ), __( 'Purged the activity log', 'wp-security-audit-log' ), 'wp-activity-log', 'deleted' ),
387
+ array( 6043, WSAL_HIGH, __( 'Some WP Activity Log plugin settings on this site were propagated and overridden from the MainWP dashboard', 'wp-security-audit-log' ), __( 'Some WP Activity Log plugin settings on this site were propagated and overridden from the MainWP dashboard.', 'wp-security-audit-log' ), 'wp-activity-log', 'modified' ),
 
 
 
 
388
  ),
389
 
390
  __( 'WordPress Site Settings', 'wp-security-audit-log' ) => array(
416
  array( 7003, WSAL_HIGH, __( 'Deactivated site has been activated', 'wp-security-audit-log' ), __( 'Activated the site: %SiteName% %LineBreak% URL: %BlogURL%', 'wp-security-audit-log' ), 'multisite-network', 'activated' ),
417
  array( 7004, WSAL_HIGH, __( 'Site has been deactivated', 'wp-security-audit-log' ), __( 'Deactivated the site: %SiteName% %LineBreak% URL: %BlogURL%', 'wp-security-audit-log' ), 'multisite-network', 'deactivated' ),
418
  array( 7005, WSAL_HIGH, __( 'Existing site deleted from network', 'wp-security-audit-log' ), __( 'The site: %SiteName% %LineBreak% URL: %BlogURL%', 'wp-security-audit-log' ), 'multisite-network', 'deleted' ),
419
+ array( 7012, WSAL_HIGH, __( 'Allow new registrations settings changed', 'wp-security-audit-log' ), __( 'Changed the <strong>Allow new registrations</strong> settings %LineBreak% Previous setting: %previous_setting% %LineBreak% New setting: %new_setting%', 'wp-security-audit-log' ), 'multisite-network', 'modified' ),
420
  ),
421
  ),
422
  )
js/auditlog-pointer.js CHANGED
@@ -6,8 +6,8 @@
6
  jQuery(document).ready( function($) {
7
  wsal_open_pointer(0);
8
  function wsal_open_pointer(i) {
9
- pointer = wsalPointer.pointers[i];
10
- options = $.extend( pointer.options, {
11
  close: function() {
12
  $.post( ajaxurl, {
13
  pointer: pointer.pointer_id,
6
  jQuery(document).ready( function($) {
7
  wsal_open_pointer(0);
8
  function wsal_open_pointer(i) {
9
+ var pointer = wsalPointer.pointers[i];
10
+ var options = $.extend( pointer.options, {
11
  close: function() {
12
  $.post( ajaxurl, {
13
  pointer: pointer.pointer_id,
js/auditlog.js CHANGED
@@ -13,11 +13,25 @@ window['WsalAuditLogRefreshed'] = function () {
13
  }
14
  return obj;
15
  };
16
- var paged = deparam(this.href).paged;
17
- if (typeof paged === 'undefined') paged = 1;
18
- jQuery('#audit-log-viewer').append(
19
- jQuery('<input type="hidden" name="paged"/>').val(paged)
20
- ).submit();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  });
22
 
23
  var modification_alerts = ['1002', '1003', '6007', '6023'];
@@ -187,8 +201,7 @@ function WsalSsasChange(value) {
187
  }
188
 
189
  function WsalDisableCustom(link, meta_key) {
190
- var nfe = jQuery(this).parents('div:first');
191
- var nonce = jQuery(this).data('disable-custom-nonce');
192
  jQuery(link).hide();
193
  jQuery.ajax({
194
  type: 'POST',
@@ -253,48 +266,13 @@ function download(filename, text) {
253
  document.body.removeChild(element);
254
  }
255
 
256
- /**
257
- * Onclick event handler to download 404 log file.
258
- *
259
- * @param {object} element - Current element.
260
- */
261
- function download_404_log(element) {
262
- download_nonce = jQuery(element).data('nonce-404'); // Nonce.
263
- log_file = jQuery(element).data('log-file'); // Log file URL.
264
- site_id = jQuery(element).data('site-id'); // Site ID.
265
-
266
- if (!download_nonce || !log_file) {
267
- console.log('Something went wrong!');
268
- }
269
-
270
- jQuery.ajax({
271
- type: 'POST',
272
- url: ajaxurl,
273
- async: true,
274
- dataType: 'json',
275
- data: {
276
- action: 'wsal_download_404_log',
277
- nonce: download_nonce,
278
- log_file: log_file,
279
- site_id: site_id
280
- },
281
- success: function (data) {
282
- if (data.success) {
283
- download(data.filename, data.file_content);
284
- } else {
285
- console.log(data.message);
286
- }
287
- }
288
- });
289
- }
290
-
291
  /**
292
  * Onclick event handler to download failed login log file.
293
  *
294
  * @param {object} element - Current element.
295
  */
296
  function download_failed_login_log(element) {
297
- nonce = jQuery(element).data('download-nonce'); // Nonce.
298
  alert = jQuery(element).parent().attr('id').substring(5);
299
 
300
  jQuery.ajax({
@@ -344,39 +322,6 @@ function wsal_freemius_opt_in( element ) {
344
  } );
345
  }
346
 
347
- /**
348
- * Onclick event handler to exclude URL.
349
- *
350
- * @param {string} element - Current element.
351
- * @since 3.2.2
352
- */
353
- function wsal_exclude_url(element) {
354
- var exclude_nonce = jQuery( element ).data( 'exclude-url-nonce' ); // Nonce.
355
- var exclude_url = jQuery( element ).data( 'exclude-url' ); // Nonce.
356
-
357
- if ( exclude_url ) {
358
- jQuery.ajax( {
359
- type: 'POST',
360
- url: ajaxurl,
361
- async: true,
362
- data: {
363
- action: 'wsal_exclude_url',
364
- nonce: exclude_nonce,
365
- url: exclude_url
366
- },
367
- success: function( data ) {
368
- var notice = jQuery( '<div class="updated" data-notice-name="notifications-extension"></div>' ).html( data );
369
- jQuery( 'h2:first' ).after( notice );
370
- },
371
- error: function( xhr, textStatus, error ) {
372
- console.log( xhr.statusText );
373
- console.log( textStatus );
374
- console.log( error );
375
- }
376
- } );
377
- }
378
- }
379
-
380
  /**
381
  * Onclick event handler to dismiss advert.
382
  *
@@ -559,7 +504,7 @@ jQuery( document ).ready( function() {
559
  jQuery( '.wsal-addon-install-trigger' ).attr( 'disabled', true );
560
  jQuery( '.wsal-addon-install-trigger:not([data-addon-name="' + jQuery( this ).data( 'addon-name' ) + '"])' ).text( wsalAuditLogArgs.installAddonStrings.otherInstalling );
561
  jQuery( button ).text( wsalAuditLogArgs.installAddonStrings.installingText );
562
- spinner = document.createElement( 'span' );
563
  jQuery( spinner ).addClass( 'spinner is-active' );
564
  jQuery( spinner ).css(
565
  {
13
  }
14
  return obj;
15
  };
16
+ const viewer = jQuery('#audit-log-viewer');
17
+ const url_params = deparam(this.href);
18
+ const param_keys = [ 'paged', 'orderby', 'order' ];
19
+ for ( let index in param_keys ) {
20
+ const param_name = param_keys[ index ];
21
+ let param_value = url_params[param_name];
22
+ if (typeof param_value === 'undefined' && param_name === 'paged') {
23
+ param_value = 1;
24
+ }
25
+ const input_elm = viewer.find('input[name="' + param_name + '"]');
26
+ if ( input_elm.length === 0 ) {
27
+ viewer.append('<input type="hidden" name="' + param_name + '" value="' + param_value + '"/>');
28
+ } else {
29
+ input_elm.val( param_value );
30
+ }
31
+
32
+ }
33
+
34
+ viewer.submit();
35
  });
36
 
37
  var modification_alerts = ['1002', '1003', '6007', '6023'];
201
  }
202
 
203
  function WsalDisableCustom(link, meta_key) {
204
+ var nonce = jQuery(link).data('disable-custom-nonce');
 
205
  jQuery(link).hide();
206
  jQuery.ajax({
207
  type: 'POST',
266
  document.body.removeChild(element);
267
  }
268
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
269
  /**
270
  * Onclick event handler to download failed login log file.
271
  *
272
  * @param {object} element - Current element.
273
  */
274
  function download_failed_login_log(element) {
275
+ var nonce = jQuery(element).data('download-nonce'); // Nonce.
276
  alert = jQuery(element).parent().attr('id').substring(5);
277
 
278
  jQuery.ajax({
322
  } );
323
  }
324
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
325
  /**
326
  * Onclick event handler to dismiss advert.
327
  *
504
  jQuery( '.wsal-addon-install-trigger' ).attr( 'disabled', true );
505
  jQuery( '.wsal-addon-install-trigger:not([data-addon-name="' + jQuery( this ).data( 'addon-name' ) + '"])' ).text( wsalAuditLogArgs.installAddonStrings.otherInstalling );
506
  jQuery( button ).text( wsalAuditLogArgs.installAddonStrings.installingText );
507
+ var spinner = document.createElement( 'span' );
508
  jQuery( spinner ).addClass( 'spinner is-active' );
509
  jQuery( spinner ).css(
510
  {
languages/wp-security-audit-log.pot CHANGED
@@ -1048,14 +1048,18 @@ msgstr ""
1048
  msgid "New user was created on WordPress"
1049
  msgstr ""
1050
 
1051
- #: defaults.php:304, defaults.php:305
1052
- msgid "New user: %NewUserData->Username% %LineBreak% Role: %NewUserData->Roles% %LineBreak% First name: %NewUserData->FirstName% %LineBreak% Last name: %NewUserData->LastName% %LineBreak% %EditUserLink%"
1053
  msgstr ""
1054
 
1055
  #: defaults.php:305
1056
  msgid "User created another WordPress user"
1057
  msgstr ""
1058
 
 
 
 
 
1059
  #: defaults.php:306
1060
  msgid "The role of a user was changed by another WordPress user"
1061
  msgstr ""
@@ -1468,268 +1472,268 @@ msgstr ""
1468
  msgid "Purged the activity log"
1469
  msgstr ""
1470
 
1471
- #: defaults.php:390
1472
- msgid "User requests non-existing pages (404 Error Pages)"
1473
  msgstr ""
1474
 
1475
- #: defaults.php:390
1476
- msgid "Has requested a non existing page (404 error) %LineBreak% Number of times: %Attempts%"
1477
  msgstr ""
1478
 
1479
  #: defaults.php:391
1480
- msgid "Website Visitor User requests non-existing pages (404 Error Pages)"
1481
- msgstr ""
1482
-
1483
- #: defaults.php:391
1484
- msgid "Website visitor has requested a non existing page (404 error) %LineBreak% Number of times: %Attempts%"
1485
- msgstr ""
1486
-
1487
- #: defaults.php:395
1488
  msgid "Option Anyone Can Register in WordPress settings changed"
1489
  msgstr ""
1490
 
1491
- #: defaults.php:395
1492
  msgid "The option Anyone can register"
1493
  msgstr ""
1494
 
1495
- #: defaults.php:396
1496
  msgid "New User Default Role changed"
1497
  msgstr ""
1498
 
1499
- #: defaults.php:396
1500
  msgid "Changed the new user default role %LineBreak% Previous role: %OldRole% %LineBreak% New role: %NewRole%"
1501
  msgstr ""
1502
 
1503
- #: defaults.php:397
1504
  msgid "WordPress Administrator Notification email changed"
1505
  msgstr ""
1506
 
1507
- #: defaults.php:397
1508
  msgid "Changed the WordPress administrator notification email address %LineBreak% Previous address %OldEmail% %LineBreak% New address: %NewEmail%"
1509
  msgstr ""
1510
 
1511
- #: defaults.php:398
1512
  msgid "User changes the WordPress Permalinks"
1513
  msgstr ""
1514
 
1515
- #: defaults.php:398
1516
  msgid "Changed the WordPress permalinks %LineBreak% Previous permalinks: %OldPattern% %LineBreak% New permalinks: %NewPattern%"
1517
  msgstr ""
1518
 
1519
- #: defaults.php:399
1520
  msgid "Enabled/Disabled the option Discourage search engines from indexing this site"
1521
  msgstr ""
1522
 
1523
- #: defaults.php:399
1524
  msgid "Discourage search engines from indexing this site."
1525
  msgstr ""
1526
 
1527
- #: defaults.php:400
1528
  msgid "Enabled/Disabled comments on all the website"
1529
  msgstr ""
1530
 
1531
- #: defaults.php:400
1532
  msgid "Comments on the website"
1533
  msgstr ""
1534
 
1535
- #: defaults.php:401
1536
  msgid "Enabled/Disabled the option Comment author must fill out name and email"
1537
  msgstr ""
1538
 
1539
- #: defaults.php:401
1540
  msgid "The option Comment author must fill out name and email"
1541
  msgstr ""
1542
 
1543
- #: defaults.php:402
1544
  msgid "Enabled/Disabled the option Users must be logged in and registered to comment"
1545
  msgstr ""
1546
 
1547
- #: defaults.php:402
1548
  msgid "The option Users must be logged in and registered to comment"
1549
  msgstr ""
1550
 
1551
- #: defaults.php:403
1552
  msgid "Enabled/Disabled the option to automatically close comments"
1553
  msgstr ""
1554
 
1555
- #: defaults.php:403
1556
  msgid "The option to Automatically close comments after %Value% days"
1557
  msgstr ""
1558
 
1559
- #: defaults.php:404
1560
  msgid "Changed the value of the option Automatically close comments"
1561
  msgstr ""
1562
 
1563
- #: defaults.php:404
1564
  msgid "Changed the value of the option to Automatically close comments after a number of days %LineBreak% Previous value: %OldValue% %LineBreak% New value: %NewValue%"
1565
  msgstr ""
1566
 
1567
- #: defaults.php:405
1568
  msgid "Enabled/Disabled the option for comments to be manually approved"
1569
  msgstr ""
1570
 
1571
- #: defaults.php:405
1572
  msgid "The option for comments to be manually approved"
1573
  msgstr ""
1574
 
1575
- #: defaults.php:406
1576
  msgid "Enabled/Disabled the option for an author to have previously approved comments for the comments to appear"
1577
  msgstr ""
1578
 
1579
- #: defaults.php:406
1580
  msgid "The option for an author to have previously approved comments for the comments to appear"
1581
  msgstr ""
1582
 
1583
- #: defaults.php:407
1584
  msgid "Changed the number of links that a comment must have to be held in the queue"
1585
  msgstr ""
1586
 
1587
- #: defaults.php:407
1588
  msgid "Changed the minimum number of links a comment must have to be held in the queue %LineBreak% Previous value: %OldValue% %LineBreak% New value: %NewValue%"
1589
  msgstr ""
1590
 
1591
- #: defaults.php:408
1592
  msgid "Modified the list of keywords for comments moderation"
1593
  msgstr ""
1594
 
1595
- #: defaults.php:408
1596
  msgid "Modified the list of keywords for comments medoration"
1597
  msgstr ""
1598
 
1599
- #: defaults.php:409, defaults.php:409
1600
  msgid "Modified the list of keywords for comments blacklisting"
1601
  msgstr ""
1602
 
1603
- #: defaults.php:410
1604
  msgid "Option WordPress Address (URL) in WordPress settings changed"
1605
  msgstr ""
1606
 
1607
- #: defaults.php:410
1608
  msgid "Changed the WordPress address (URL) %LineBreak% Previous URL: %old_url% %LineBreak% New URL: %new_url%"
1609
  msgstr ""
1610
 
1611
- #: defaults.php:411
1612
  msgid "Option Site Address (URL) in WordPress settings changed"
1613
  msgstr ""
1614
 
1615
- #: defaults.php:411
1616
  msgid "Changed the site address (URL) %LineBreak% Previous URL: %old_url% %LineBreak% New URL: %new_url%"
1617
  msgstr ""
1618
 
1619
- #: defaults.php:417
1620
  msgid "New site added on the network"
1621
  msgstr ""
1622
 
1623
- #: defaults.php:417
1624
  msgid "New site on the network: %SiteName% %LineBreak% URL: %BlogURL%"
1625
  msgstr ""
1626
 
1627
- #: defaults.php:418
1628
  msgid "Existing site archived"
1629
  msgstr ""
1630
 
1631
- #: defaults.php:418
1632
  msgid "Archived the site: %SiteName% %LineBreak% URL: %BlogURL%"
1633
  msgstr ""
1634
 
1635
- #: defaults.php:419
1636
  msgid "Archived site has been unarchived"
1637
  msgstr ""
1638
 
1639
- #: defaults.php:419
1640
  msgid "Unarchived the site: %SiteName% %LineBreak% URL: %BlogURL%"
1641
  msgstr ""
1642
 
1643
- #: defaults.php:420
1644
  msgid "Deactivated site has been activated"
1645
  msgstr ""
1646
 
1647
- #: defaults.php:420
1648
  msgid "Activated the site: %SiteName% %LineBreak% URL: %BlogURL%"
1649
  msgstr ""
1650
 
1651
- #: defaults.php:421
1652
  msgid "Site has been deactivated"
1653
  msgstr ""
1654
 
1655
- #: defaults.php:421
1656
  msgid "Deactivated the site: %SiteName% %LineBreak% URL: %BlogURL%"
1657
  msgstr ""
1658
 
1659
- #: defaults.php:422
1660
  msgid "Existing site deleted from network"
1661
  msgstr ""
1662
 
1663
- #: defaults.php:422
1664
  msgid "The site: %SiteName% %LineBreak% URL: %BlogURL%"
1665
  msgstr ""
1666
 
1667
- #: defaults.php:433
 
 
 
 
 
 
 
 
1668
  msgid "Dummy"
1669
  msgstr ""
1670
 
1671
  #. translators: Username
1672
  #. translators: Username
1673
- #: wp-security-audit-log.php:910, wp-security-audit-log.php:937
1674
  msgid "Hey %1$s"
1675
  msgstr ""
1676
 
1677
- #: wp-security-audit-log.php:911
1678
  msgid "Never miss an important update! Opt-in to our security and feature updates notifications, and non-sensitive diagnostic tracking with freemius.com."
1679
  msgstr ""
1680
 
1681
- #: wp-security-audit-log.php:912, wp-security-audit-log.php:940
1682
  msgid "Note: "
1683
  msgstr ""
1684
 
1685
- #: wp-security-audit-log.php:913, wp-security-audit-log.php:941
1686
  msgid "NO ACTIVITY LOG ACTIVITY & DATA IS SENT BACK TO OUR SERVERS."
1687
  msgstr ""
1688
 
1689
  #. translators: 1: Plugin name. 2: Freemius link.
1690
- #: wp-security-audit-log.php:939
1691
  msgid "Please help us improve %2$s! If you opt-in, some non-sensitive data about your usage of %2$s will be sent to %5$s, a diagnostic tracking service we use. If you skip this, that's okay! %2$s will still work just fine."
1692
  msgstr ""
1693
 
1694
  #. translators: Plugin name
1695
- #: wp-security-audit-log.php:961
1696
  msgid "Get a free 7-day trial of the premium edition of %s. No credit card required, no commitments!"
1697
  msgstr ""
1698
 
1699
- #: wp-security-audit-log.php:962, classes/AlertManager.php:1140, extensions/external-db/classes/Connections.php:173
1700
  msgid "WP Activity Log"
1701
  msgstr ""
1702
 
1703
- #: wp-security-audit-log.php:966
1704
  msgid "Start free trial"
1705
  msgstr ""
1706
 
1707
- #: wp-security-audit-log.php:1034
1708
  msgid "You need to activate the licence key to use WP Activity Log Premium. %2$s"
1709
  msgstr ""
1710
 
1711
- #: wp-security-audit-log.php:1035
1712
  msgid "Activate the licence key now"
1713
  msgstr ""
1714
 
1715
  #. translators: Number of sites
1716
- #: wp-security-audit-log.php:1052
1717
  msgid "The license is limited to %s sub-sites. You need to upgrade your license to cover all the sub-sites on this network."
1718
  msgstr ""
1719
 
1720
- #: wp-security-audit-log.php:1162
1721
  msgid "Error: You do not have sufficient permissions to disable this custom field."
1722
  msgstr ""
1723
 
1724
- #: wp-security-audit-log.php:1195
1725
- msgid "Custom Field %1$s is no longer being monitored.<br />Enable the monitoring of this custom field again from the"
1726
  msgstr ""
1727
 
1728
- #: wp-security-audit-log.php:1195
1729
  msgid "Excluded Objects"
1730
  msgstr ""
1731
 
1732
- #: wp-security-audit-log.php:1195
1733
  msgid " tab in the plugin settings"
1734
  msgstr ""
1735
 
@@ -1737,343 +1741,343 @@ msgstr ""
1737
  msgid "Error: You do not have sufficient permissions to disable this alert."
1738
  msgstr ""
1739
 
1740
- #: wp-security-audit-log.php:1230
1741
  msgid "Alert %1$s is no longer being monitored.<br /> %2$s"
1742
  msgstr ""
1743
 
1744
- #: wp-security-audit-log.php:1230
1745
  msgid "You can enable this alert again from the Enable/Disable Alerts node in the plugin menu."
1746
  msgstr ""
1747
 
1748
- #: wp-security-audit-log.php:1255, classes/Views/SetupWizard.php:275
1749
  msgid "Installing, please wait"
1750
  msgstr ""
1751
 
1752
- #: wp-security-audit-log.php:1256, classes/Views/SetupWizard.php:276
1753
  msgid "Already installed"
1754
  msgstr ""
1755
 
1756
- #: wp-security-audit-log.php:1257, classes/Utilities/PluginInstallAndActivate.php:107, classes/Views/SetupWizard.php:277, classes/Views/SetupWizard.php:894
1757
  msgid "Extension installed"
1758
  msgstr ""
1759
 
1760
- #: wp-security-audit-log.php:1258, classes/Views/SetupWizard.php:278
1761
  msgid "Extension activated"
1762
  msgstr ""
1763
 
1764
- #: wp-security-audit-log.php:1259, classes/Views/SetupWizard.php:279
1765
  msgid "Install failed"
1766
  msgstr ""
1767
 
1768
  #. translators: %s: PHP Version
1769
- #: wp-security-audit-log.php:1322
1770
  msgid "You are using a version of PHP that is older than %s, which is no longer supported."
1771
  msgstr ""
1772
 
1773
- #: wp-security-audit-log.php:1324
1774
  msgid "Contact us on <a href=\"mailto:plugins@wpwhitesecurity.com\">plugins@wpwhitesecurity.com</a> to help you switch the version of PHP you are using."
1775
  msgstr ""
1776
 
1777
  #. translators: %s: Activity Log for MainWP plugin hyperlink
1778
- #: wp-security-audit-log.php:1329
1779
  msgid "Please install the %s plugin on the MainWP dashboard."
1780
  msgstr ""
1781
 
1782
- #: wp-security-audit-log.php:1329
1783
  msgid "Activity Log for MainWP"
1784
  msgstr ""
1785
 
1786
  #. translators: %s: Getting started guide hyperlink
1787
- #: wp-security-audit-log.php:1331
1788
  msgid "The WP Activity Log should be installed on the child sites only. Refer to the %s for more information."
1789
  msgstr ""
1790
 
1791
- #: wp-security-audit-log.php:1331
1792
  msgid "getting started guide"
1793
  msgstr ""
1794
 
1795
- #: wp-security-audit-log.php:1402
1796
  msgid "This plugin uses 3 tables in the WordPress database to store the activity log and settings. It seems that these tables were not created."
1797
  msgstr ""
1798
 
1799
- #: wp-security-audit-log.php:1404
1800
  msgid "This could happen because the database user does not have the right privileges to create the tables in the database. We recommend you to update the privileges and try enabling the plugin again."
1801
  msgstr ""
1802
 
1803
  #. translators: %s: Support Hyperlink
1804
- #: wp-security-audit-log.php:1406
1805
  msgid "If after doing so you still have issues, please send us an email on %s for assistance."
1806
  msgstr ""
1807
 
1808
- #: wp-security-audit-log.php:1406
1809
  msgid "support@wpsecurityauditlog.com"
1810
  msgstr ""
1811
 
1812
- #: wp-security-audit-log.php:1888
1813
  msgid "For security and auditing purposes, a record of all of your logged-in actions and changes within the WordPress dashboard will be recorded in an activity log with the <a href=\"https://wpactivitylog.com/\" target=\"_blank\">WP Activity Log plugin</a>. The audit log also includes the IP address where you accessed this site from."
1814
  msgstr ""
1815
 
1816
- #: wp-security-audit-log.php:1907
1817
  msgid "Every 6 hours"
1818
  msgstr ""
1819
 
1820
- #: wp-security-audit-log.php:1911
1821
  msgid "Every 45 minutes"
1822
  msgstr ""
1823
 
1824
- #: wp-security-audit-log.php:1915
1825
  msgid "Every 30 minutes"
1826
  msgstr ""
1827
 
1828
- #: wp-security-audit-log.php:1919
1829
  msgid "Every 15 minutes"
1830
  msgstr ""
1831
 
1832
- #: wp-security-audit-log.php:1923
1833
  msgid "Every 10 minutes"
1834
  msgstr ""
1835
 
1836
- #: wp-security-audit-log.php:1927
1837
  msgid "Every 1 minute"
1838
  msgstr ""
1839
 
1840
  #. translators: 1. Deprecated method name 2. Version since deprecated
1841
- #: wp-security-audit-log.php:1941
1842
  msgid "Method %1$s is deprecated since version %2$s!"
1843
  msgstr ""
1844
 
1845
  #. translators: Event ID
1846
- #: classes/AlertManager.php:372
1847
  msgid "Event with code %d has not be registered."
1848
  msgstr ""
1849
 
1850
  #. translators: Event ID
1851
- #: classes/AlertManager.php:434
1852
  msgid "Event %s already registered with WP Activity Log."
1853
  msgstr ""
1854
 
1855
- #: classes/AlertManager.php:507
1856
  msgid "You have custom events that are using the same ID or IDs which are already registered in the plugin, so they have been disabled."
1857
  msgstr ""
1858
 
1859
  #. translators: 1.CSS classes, 2. Notice, 3. Contact us link
1860
- #: classes/AlertManager.php:510
1861
  msgid "%4$s to help you solve this issue."
1862
  msgstr ""
1863
 
1864
- #: classes/AlertManager.php:512
1865
  msgid "ERROR:"
1866
  msgstr ""
1867
 
1868
- #: classes/AlertManager.php:514
1869
  msgid "Contact us"
1870
  msgstr ""
1871
 
1872
- #: classes/AlertManager.php:1121, classes/AuditLogListView.php:333, classes/AuditLogListView.php:367, classes/WidgetManager.php:76, classes/Views/Settings.php:1160, extensions/search/classes/Filters/UserNameFilter.php:44, extensions/user-sessions/classes/View/Sessions.php:172
1873
  msgid "User"
1874
  msgstr ""
1875
 
1876
- #: classes/AlertManager.php:1122, classes/AlertManager.php:1907, classes/AuditLogGridView.php:517, classes/AuditLogListView.php:543, extensions/email-notifications/classes/DailyNotification.php:241, extensions/email-notifications/classes/Notifier.php:633, extensions/reports/classes/Common.php:665
1877
  msgid "System"
1878
  msgstr ""
1879
 
1880
- #: classes/AlertManager.php:1123, classes/AuditLogGridView.php:508, classes/AuditLogListView.php:531
1881
  msgid "Plugin"
1882
  msgstr ""
1883
 
1884
- #: classes/AlertManager.php:1124
1885
  msgid "Database"
1886
  msgstr ""
1887
 
1888
- #: classes/AlertManager.php:1125
1889
  msgid "Post"
1890
  msgstr ""
1891
 
1892
- #: classes/AlertManager.php:1126, classes/AlertManager.php:1130
1893
  msgid "File"
1894
  msgstr ""
1895
 
1896
- #: classes/AlertManager.php:1127
1897
  msgid "Tag"
1898
  msgstr ""
1899
 
1900
- #: classes/AlertManager.php:1128
1901
  msgid "Comment"
1902
  msgstr ""
1903
 
1904
- #: classes/AlertManager.php:1129
1905
  msgid "Setting"
1906
  msgstr ""
1907
 
1908
- #: classes/AlertManager.php:1131
1909
  msgid "System Setting"
1910
  msgstr ""
1911
 
1912
- #: classes/AlertManager.php:1132
1913
  msgid "MainWP Network"
1914
  msgstr ""
1915
 
1916
- #: classes/AlertManager.php:1133
1917
  msgid "MainWP"
1918
  msgstr ""
1919
 
1920
- #: classes/AlertManager.php:1134
1921
  msgid "Category"
1922
  msgstr ""
1923
 
1924
- #: classes/AlertManager.php:1135
1925
  msgid "Custom Field"
1926
  msgstr ""
1927
 
1928
- #: classes/AlertManager.php:1136
1929
  msgid "Widget"
1930
  msgstr ""
1931
 
1932
- #: classes/AlertManager.php:1137
1933
  msgid "Menu"
1934
  msgstr ""
1935
 
1936
- #: classes/AlertManager.php:1138
1937
  msgid "Theme"
1938
  msgstr ""
1939
 
1940
- #: classes/AlertManager.php:1139
1941
  msgid "Activity log"
1942
  msgstr ""
1943
 
1944
- #: classes/AlertManager.php:1141
1945
  msgid "Multisite Network"
1946
  msgstr ""
1947
 
1948
- #: classes/AlertManager.php:1142, extensions/email-notifications/classes/Common.php:1148, extensions/search/classes/Filters/IpFilter.php:87, extensions/user-sessions/classes/View/Sessions.php:352
1949
  msgid "IP Address"
1950
  msgstr ""
1951
 
1952
- #: classes/AlertManager.php:1158
1953
  msgid "unknown object"
1954
  msgstr ""
1955
 
1956
- #: classes/AlertManager.php:1195
1957
  msgid "Login"
1958
  msgstr ""
1959
 
1960
- #: classes/AlertManager.php:1196
1961
  msgid "Logout"
1962
  msgstr ""
1963
 
1964
- #: classes/AlertManager.php:1197
1965
  msgid "Installed"
1966
  msgstr ""
1967
 
1968
- #: classes/AlertManager.php:1198
1969
  msgid "Activated"
1970
  msgstr ""
1971
 
1972
- #: classes/AlertManager.php:1199
1973
  msgid "Deactivated"
1974
  msgstr ""
1975
 
1976
- #: classes/AlertManager.php:1200
1977
  msgid "Uninstalled"
1978
  msgstr ""
1979
 
1980
- #: classes/AlertManager.php:1201
1981
  msgid "Updated"
1982
  msgstr ""
1983
 
1984
- #: classes/AlertManager.php:1202, extensions/user-sessions/classes/View/Sessions.php:179
1985
  msgid "Created"
1986
  msgstr ""
1987
 
1988
- #: classes/AlertManager.php:1203
1989
  msgid "Modified"
1990
  msgstr ""
1991
 
1992
- #: classes/AlertManager.php:1204, extensions/search/search-init.php:341
1993
  msgid "Deleted"
1994
  msgstr ""
1995
 
1996
- #: classes/AlertManager.php:1205
1997
  msgid "Published"
1998
  msgstr ""
1999
 
2000
- #: classes/AlertManager.php:1206
2001
  msgid "Approved"
2002
  msgstr ""
2003
 
2004
- #: classes/AlertManager.php:1207
2005
  msgid "Unapproved"
2006
  msgstr ""
2007
 
2008
- #: classes/AlertManager.php:1208
2009
  msgid "Enabled"
2010
  msgstr ""
2011
 
2012
- #: classes/AlertManager.php:1209, extensions/email-notifications/classes/Notifications.php:1862
2013
  msgid "Disabled"
2014
  msgstr ""
2015
 
2016
- #: classes/AlertManager.php:1210
2017
  msgid "Added"
2018
  msgstr ""
2019
 
2020
- #: classes/AlertManager.php:1211
2021
  msgid "Failed Login"
2022
  msgstr ""
2023
 
2024
- #: classes/AlertManager.php:1212
2025
  msgid "Blocked"
2026
  msgstr ""
2027
 
2028
- #: classes/AlertManager.php:1213
2029
  msgid "Uploaded"
2030
  msgstr ""
2031
 
2032
- #: classes/AlertManager.php:1214
2033
  msgid "Restored"
2034
  msgstr ""
2035
 
2036
- #: classes/AlertManager.php:1215
2037
  msgid "Opened"
2038
  msgstr ""
2039
 
2040
- #: classes/AlertManager.php:1216
2041
  msgid "Viewed"
2042
  msgstr ""
2043
 
2044
- #: classes/AlertManager.php:1217
2045
  msgid "Started"
2046
  msgstr ""
2047
 
2048
- #: classes/AlertManager.php:1218
2049
  msgid "Stopped"
2050
  msgstr ""
2051
 
2052
- #: classes/AlertManager.php:1219
2053
  msgid "Removed"
2054
  msgstr ""
2055
 
2056
- #: classes/AlertManager.php:1220
2057
  msgid "Unblocked"
2058
  msgstr ""
2059
 
2060
- #: classes/AlertManager.php:1221
2061
  msgid "Renamed"
2062
  msgstr ""
2063
 
2064
- #: classes/AlertManager.php:1222
2065
  msgid "Duplicated"
2066
  msgstr ""
2067
 
2068
- #: classes/AlertManager.php:1239
2069
  msgid "unknown type"
2070
  msgstr ""
2071
 
2072
- #: classes/AlertManager.php:1866, classes/ConstantManager.php:146, extensions/external-db/classes/Common.php:661, extensions/external-db/classes/Common.php:902
2073
  msgid "Unknown error code."
2074
  msgstr ""
2075
 
2076
- #: classes/AlertManager.php:1885, classes/AlertManager.php:1873, extensions/reports/classes/Common.php:645, extensions/reports/classes/Common.php:635
2077
  msgid "Unknown Site"
2078
  msgstr ""
2079
 
@@ -2101,7 +2105,7 @@ msgstr ""
2101
  msgid "— End of Activity Log —"
2102
  msgstr ""
2103
 
2104
- #: classes/AuditLogGridView.php:229, classes/AuditLogListView.php:235, classes/Views/AuditLog.php:627, extensions/reports/inc/wsal-reporting-view.inc.php:601
2105
  msgid "All Sites"
2106
  msgstr ""
2107
 
@@ -2113,11 +2117,11 @@ msgstr ""
2113
  msgid "Archive Database"
2114
  msgstr ""
2115
 
2116
- #: classes/AuditLogGridView.php:314, classes/AuditLogGridView.php:338, classes/AuditLogListView.php:330, classes/AuditLogListView.php:358
2117
  msgid "ID"
2118
  msgstr ""
2119
 
2120
- #: classes/AuditLogGridView.php:315, classes/AuditLogGridView.php:341, classes/AuditLogListView.php:331, classes/AuditLogListView.php:361, classes/Views/Settings.php:1156, classes/Views/ToggleAlerts.php:319, extensions/search/classes/Filters/CodeFilter.php:38, extensions/search/classes/Filters/CodeFilter.php:64
2121
  msgid "Severity"
2122
  msgstr ""
2123
 
@@ -2125,11 +2129,11 @@ msgstr ""
2125
  msgid "Info"
2126
  msgstr ""
2127
 
2128
- #: classes/AuditLogGridView.php:321, classes/AuditLogListView.php:341, classes/AuditLogListView.php:373, extensions/email-notifications/classes/Common.php:1146, extensions/email-notifications/classes/Common.php:1205, extensions/search/classes/Filters/SiteFilter.php:29
2129
  msgid "Site"
2130
  msgstr ""
2131
 
2132
- #: classes/AuditLogGridView.php:324, classes/AuditLogGridView.php:347, classes/AuditLogListView.php:344, classes/AuditLogListView.php:382, extensions/email-notifications/classes/Common.php:1179
2133
  msgid "Message"
2134
  msgstr ""
2135
 
@@ -2137,47 +2141,43 @@ msgstr ""
2137
  msgid "Grid"
2138
  msgstr ""
2139
 
2140
- #: classes/AuditLogGridView.php:416, classes/AuditLogListView.php:466
2141
  msgid "Disable this type of events."
2142
  msgstr ""
2143
 
2144
- #: classes/AuditLogGridView.php:459, classes/AuditLogGridView.php:466, classes/AuditLogGridView.php:505, classes/AuditLogListView.php:486, classes/AuditLogListView.php:527
2145
  msgid "Unknown"
2146
  msgstr ""
2147
 
2148
- #: classes/AuditLogGridView.php:514, classes/AuditLogListView.php:539
2149
  msgid "Unregistered user"
2150
  msgstr ""
2151
 
2152
- #: classes/AuditLogGridView.php:511, classes/AuditLogListView.php:535
2153
  msgid "Plugins"
2154
  msgstr ""
2155
 
2156
- #: classes/AuditLogGridView.php:490, classes/AuditLogListView.php:512
2157
  msgid "Show me all activity by this User"
2158
  msgstr ""
2159
 
2160
- #: classes/AuditLogGridView.php:551, classes/AuditLogGridView.php:564, classes/AuditLogListView.php:575, classes/AuditLogListView.php:588
2161
  msgid "Show me all activity originating from this IP Address"
2162
  msgstr ""
2163
 
2164
- #: classes/AuditLogGridView.php:621, classes/AuditLogListView.php:617
2165
  msgid "View all details of this change"
2166
  msgstr ""
2167
 
2168
- #: classes/AuditLogGridView.php:622, classes/AuditLogGridView.php:772, classes/AuditLogListView.php:618, classes/AuditLogListView.php:772
2169
  msgid "Alert Data Inspector"
2170
  msgstr ""
2171
 
2172
- #: classes/AuditLogGridView.php:724, classes/AuditLogGridView.php:724, classes/AuditLogListView.php:724, classes/AuditLogListView.php:724, classes/Settings.php:1792, classes/Settings.php:1792
2173
- msgid "Download the log file"
2174
- msgstr ""
2175
-
2176
- #: classes/AuditLogGridView.php:744, classes/AuditLogGridView.php:744, classes/AuditLogListView.php:744, classes/AuditLogListView.php:744, classes/Settings.php:1834, classes/Settings.php:1834
2177
  msgid "Download the log file."
2178
  msgstr ""
2179
 
2180
- #: classes/AuditLogGridView.php:752, classes/AuditLogListView.php:752, classes/Settings.php:1847, classes/Settings.php:2087, extensions/email-notifications/classes/Notifier.php:794
2181
  msgid "published"
2182
  msgstr ""
2183
 
@@ -2187,139 +2187,139 @@ msgstr ""
2187
  #. translators: Mailto link for support.
2188
  #. translators: Mailto link for support.
2189
  #. translators: Mailto link for support.
2190
- #: classes/AuditLogGridView.php:780, classes/AuditLogListView.php:780, classes/Settings.php:1873, classes/Settings.php:2113, extensions/email-notifications/classes/Notifier.php:820, extensions/reports/classes/Common.php:541
2191
  msgid "Contact us on %s for assistance"
2192
  msgstr ""
2193
 
2194
- #: classes/AuditLogListView.php:332, classes/AuditLogListView.php:364, extensions/search/classes/Filters/DateFilter.php:27
2195
  msgid "Date"
2196
  msgstr ""
2197
 
2198
- #: classes/AuditLogListView.php:334, classes/AuditLogListView.php:370, extensions/search/classes/Filters/IpFilter.php:45
2199
  msgid "IP"
2200
  msgstr ""
2201
 
2202
- #: classes/AuditLogListView.php:335, classes/AuditLogListView.php:376, extensions/email-notifications/classes/Common.php:1119, extensions/search/classes/Filters/ObjectFilter.php:29, extensions/search/classes/Filters/ObjectFilter.php:53
2203
  msgid "Object"
2204
  msgstr ""
2205
 
2206
- #: classes/AuditLogListView.php:336, classes/AuditLogListView.php:379, extensions/email-notifications/classes/Common.php:1120, extensions/search/classes/Filters/EventTypeFilter.php:29, extensions/search/classes/Filters/EventTypeFilter.php:53
2207
  msgid "Event Type"
2208
  msgstr ""
2209
 
2210
- #: classes/AuditLogListView.php:441
2211
  msgid "Click to toggle."
2212
  msgstr ""
2213
 
2214
- #: classes/AuditLogListView.php:446, classes/Models/Occurrence.php:83
2215
  msgid "Alert message not found."
2216
  msgstr ""
2217
 
2218
- #: classes/AuditLogListView.php:447, classes/Models/Occurrence.php:84
2219
  msgid "Alert description not found."
2220
  msgstr ""
2221
 
2222
- #: classes/ConstantManager.php:166, classes/Views/ToggleAlerts.php:457
2223
  msgid "Informational"
2224
  msgstr ""
2225
 
2226
- #: classes/ConstantManager.php:164, classes/Views/ToggleAlerts.php:455, extensions/search/classes/Filters/CodeFilter.php:70
2227
  msgid "Low"
2228
  msgstr ""
2229
 
2230
- #: classes/ConstantManager.php:162, classes/Views/ToggleAlerts.php:453, extensions/search/classes/Filters/CodeFilter.php:69
2231
  msgid "Medium"
2232
  msgstr ""
2233
 
2234
- #: classes/ConstantManager.php:160, classes/Views/ToggleAlerts.php:451, extensions/search/classes/Filters/CodeFilter.php:68
2235
  msgid "High"
2236
  msgstr ""
2237
 
2238
- #: classes/ConstantManager.php:158, classes/ConstantManager.php:152, classes/Views/ToggleAlerts.php:449, classes/Views/ToggleAlerts.php:443, extensions/search/classes/Filters/CodeFilter.php:67
2239
  msgid "Critical"
2240
  msgstr ""
2241
 
2242
- #: classes/ConstantManager.php:156, classes/Views/ToggleAlerts.php:459, classes/Views/ToggleAlerts.php:447
2243
  msgid "Notification"
2244
  msgstr ""
2245
 
2246
- #: classes/ConstantManager.php:154, classes/Views/ToggleAlerts.php:445
2247
  msgid "Warning"
2248
  msgstr ""
2249
 
2250
- #: classes/Settings.php:591
2251
  msgid "This function is deprecated"
2252
  msgstr ""
2253
 
2254
- #: classes/Settings.php:1751, extensions/email-notifications/classes/Notifier.php:742, extensions/reports/classes/Common.php:482
2255
  msgid "View the content changes"
2256
  msgstr ""
2257
 
2258
- #: classes/Settings.php:1756, extensions/email-notifications/classes/Notifier.php:747, extensions/email-notifications/classes/Notifier.php:753, extensions/reports/classes/Common.php:487, extensions/reports/classes/Common.php:493
2259
  msgid "View post in the editor"
2260
  msgstr ""
2261
 
2262
- #: classes/Settings.php:1759, extensions/email-notifications/classes/Notifier.php:750, extensions/reports/classes/Common.php:490
2263
  msgid "View Order"
2264
  msgstr ""
2265
 
2266
- #: classes/Settings.php:1764, extensions/email-notifications/classes/Notifier.php:756, extensions/reports/classes/Common.php:496
2267
  msgid "View category"
2268
  msgstr ""
2269
 
2270
- #: classes/Settings.php:1767, extensions/email-notifications/classes/Notifier.php:759, extensions/reports/classes/Common.php:499
2271
  msgid "View tag"
2272
  msgstr ""
2273
 
2274
- #: classes/Settings.php:1771, extensions/email-notifications/classes/Notifier.php:769, extensions/reports/classes/Common.php:509
2275
  msgid "User profile page"
2276
  msgstr ""
2277
 
2278
- #: classes/Settings.php:1885, extensions/reports/classes/Common.php:553
2279
  msgid "Increase maximum file size limit"
2280
  msgstr ""
2281
 
2282
- #: classes/Settings.php:1888, extensions/reports/classes/Common.php:556
2283
  msgid "Contact Support"
2284
  msgstr ""
2285
 
2286
- #: classes/Settings.php:2125, extensions/email-notifications/classes/Notifier.php:831, extensions/email-notifications/classes/Notifier.php:959
2287
  msgid "plugin settings"
2288
  msgstr ""
2289
 
2290
- #: classes/Settings.php:2128, extensions/email-notifications/classes/Notifier.php:834, extensions/email-notifications/classes/Notifier.php:964
2291
  msgid "contact our support"
2292
  msgstr ""
2293
 
2294
- #: classes/Settings.php:2299
2295
  msgid "Root directory of WordPress (excluding sub directories)"
2296
  msgstr ""
2297
 
2298
- #: classes/Settings.php:2300
2299
  msgid "WP Admin directory (/wp-admin/)"
2300
  msgstr ""
2301
 
2302
- #: classes/Settings.php:2301
2303
  msgid "WP Includes directory (/wp-includes/)"
2304
  msgstr ""
2305
 
2306
- #: classes/Settings.php:2302
2307
  msgid "/wp-content/ directory (excluding plugins, themes & uploads directories)"
2308
  msgstr ""
2309
 
2310
- #: classes/Settings.php:2303
2311
  msgid "Themes directory (/wp-content/themes/)"
2312
  msgstr ""
2313
 
2314
- #: classes/Settings.php:2304
2315
  msgid "Plugins directory (/wp-content/plugins/)"
2316
  msgstr ""
2317
 
2318
- #: classes/Settings.php:2305
2319
  msgid "Uploads directory (/wp-content/uploads/)"
2320
  msgstr ""
2321
 
2322
- #: classes/Settings.php:2310
2323
  msgid "Uploads directory of all sub sites on this network (/wp-content/sites/*)"
2324
  msgstr ""
2325
 
@@ -2335,7 +2335,7 @@ msgstr ""
2335
  msgid "Latest Events"
2336
  msgstr ""
2337
 
2338
- #: classes/WidgetManager.php:77, classes/Views/ToggleAlerts.php:320
2339
  msgid "Description"
2340
  msgstr ""
2341
 
@@ -2351,7 +2351,7 @@ msgstr ""
2351
  msgid "Mirroring"
2352
  msgstr ""
2353
 
2354
- #: extensions/class-wsal-extension-manager.php:374, extensions/external-db/classes/Settings.php:115, extensions/external-db/classes/Settings.php:871
2355
  msgid "Archiving"
2356
  msgstr ""
2357
 
@@ -2360,45 +2360,29 @@ msgstr ""
2360
  msgid "Code %1$d: %2$s"
2361
  msgstr ""
2362
 
2363
- #: classes/Loggers/Database.php:235, classes/Views/addons/html-view.php:92, classes/Views/addons/html-view.php:117
2364
- msgid "Upgrade to Premium"
2365
- msgstr ""
2366
-
2367
- #: classes/Loggers/Database.php:236, classes/Views/addons/html-view.php:93
2368
- msgid "More Information"
2369
- msgstr ""
2370
-
2371
  #: classes/Models/Occurrence.php:200
2372
  msgid "WFCM"
2373
  msgstr ""
2374
 
2375
  #. translators: 1: html that opens a link, 2: html that closes a link.
2376
- #: classes/Models/Occurrence.php:226
2377
- msgid "Alert message was not available, this may have been a custom alert that no longer exists. Read more about custom events %1$shere%2$s."
2378
  msgstr ""
2379
 
2380
- #: classes/Sensors/Content.php:1037, classes/Sensors/Content.php:1045
2381
  msgid "Public"
2382
  msgstr ""
2383
 
2384
- #: classes/Sensors/Content.php:1035, classes/Sensors/Content.php:1043
2385
  msgid "Private"
2386
  msgstr ""
2387
 
2388
- #: classes/Sensors/Content.php:1033, classes/Sensors/Content.php:1041
2389
  msgid "Password Protected"
2390
  msgstr ""
2391
 
2392
- #: classes/Sensors/FrontendWooCommerce.php:232, classes/Sensors/Public.php:417
2393
- msgid "On backorder"
2394
- msgstr ""
2395
-
2396
- #: classes/Sensors/FrontendWooCommerce.php:230, classes/Sensors/Public.php:415
2397
- msgid "Out of stock"
2398
- msgstr ""
2399
-
2400
- #: classes/Sensors/FrontendWooCommerce.php:228, classes/Sensors/Public.php:413
2401
- msgid "In stock"
2402
  msgstr ""
2403
 
2404
  #: classes/ThirdPartyExtensions/BBPressExtension.php:29
@@ -2443,184 +2427,172 @@ msgstr ""
2443
  msgid "WP Activity Log can keep a log of changes done on other plugins. Install the relevant extension from the below list to keep a log of changes done on that plugin."
2444
  msgstr ""
2445
 
2446
- #: classes/Utilities/PluginInstallAndActivate.php:100, classes/Views/SetupWizard.php:887
2447
  msgid "Extension for "
2448
  msgstr ""
2449
 
2450
- #: classes/Utilities/PluginInstallAndActivate.php:109, classes/Views/SetupWizard.php:896
2451
  msgid "Install Extension"
2452
  msgstr ""
2453
 
2454
- #: classes/Utilities/PluginInstallAndActivate.php:105, classes/Views/SetupWizard.php:892
2455
  msgid "Extension installed, activate now?"
2456
  msgstr ""
2457
 
2458
- #: classes/Utilities/PluginInstallerAction.php:76
2459
  msgid "Tried to install a zip or slug that was not in the allowed list"
2460
  msgstr ""
2461
 
2462
- #: classes/Views/AuditLog.php:100
2463
  msgid "Get instantly alerted of critical changes via SMS & email, search the activity log, generate user reports, see who is logged in and more!"
2464
  msgstr ""
2465
 
2466
- #: classes/Views/AuditLog.php:101
2467
  msgid "Upgrade to premium to unlock these powerful activity log features & more!"
2468
  msgstr ""
2469
 
2470
- #: classes/Views/AuditLog.php:104
2471
  msgid "Instant SMS & email alerts, search & filters, reports, users sessions management and much more!"
2472
  msgstr ""
2473
 
2474
- #: classes/Views/AuditLog.php:105
2475
  msgid "Upgrade to premium to get more out of your activity logs!"
2476
  msgstr ""
2477
 
2478
- #: classes/Views/AuditLog.php:108
2479
  msgid "See who logged in on your site in real-time, generate reports, get SMS & email alerts of critical changes and more!"
2480
  msgstr ""
2481
 
2482
- #: classes/Views/AuditLog.php:109
2483
  msgid "Unlock these and other powerful features with WP Activity Log Premium."
2484
  msgstr ""
2485
 
2486
- #: classes/Views/AuditLog.php:187
2487
  msgid "UPGRADE NOW"
2488
  msgstr ""
2489
 
2490
- #: classes/Views/AuditLog.php:188
2491
  msgid "Start Free Trial"
2492
  msgstr ""
2493
 
2494
- #: classes/Views/AuditLog.php:189
2495
  msgid "Tell me more"
2496
  msgstr ""
2497
 
2498
- #: classes/Views/AuditLog.php:191
2499
  msgid "Dismiss the banner"
2500
  msgstr ""
2501
 
2502
- #: classes/Views/AuditLog.php:191
2503
  msgid "Close"
2504
  msgstr ""
2505
 
2506
- #: classes/Views/AuditLog.php:216
2507
  msgid "There are connectivity issues with the database where the WordPress activity log is stored. The logs will be temporary buffered in the WordPress database until the connection is fully restored."
2508
  msgstr ""
2509
 
2510
- #: classes/Views/AuditLog.php:234
2511
  msgid "Help WP Activity Log improve."
2512
  msgstr ""
2513
 
2514
- #: classes/Views/AuditLog.php:235
2515
  msgid "Gathering non-sensitive diagnostic data about the plugin install helps us improve the plugin. When you opt-in, you also subscribe to our announcements (you can opt-out at any time). If you would rather opt-out, we will not collect any data."
2516
  msgstr ""
2517
 
2518
- #: classes/Views/AuditLog.php:235
2519
  msgid "Read more about what we collect."
2520
  msgstr ""
2521
 
2522
- #: classes/Views/AuditLog.php:237
2523
  msgid "Sure, opt-in"
2524
  msgstr ""
2525
 
2526
- #: classes/Views/AuditLog.php:238
2527
  msgid "No, thank you"
2528
  msgstr ""
2529
 
2530
- #: classes/Views/AuditLog.php:294
2531
  msgid "We noticed you have"
2532
  msgstr ""
2533
 
2534
- #: classes/Views/AuditLog.php:296
2535
  msgid "installed."
2536
  msgstr ""
2537
 
2538
- #: classes/Views/AuditLog.php:298
2539
  msgid "Install extension"
2540
  msgstr ""
2541
 
2542
- #: classes/Views/AuditLog.php:361, classes/Views/Settings.php:92
2543
  msgid "Activity Log Viewer"
2544
  msgstr ""
2545
 
2546
- #: classes/Views/AuditLog.php:388
2547
  msgid "Log Viewer"
2548
  msgstr ""
2549
 
2550
- #: classes/Views/AuditLog.php:543, classes/Views/Settings.php:326, classes/Views/ToggleAlerts.php:131, extensions/email-notifications/classes/AddNotification.php:246, extensions/email-notifications/classes/AddNotification.php:279, extensions/email-notifications/classes/EditNotification.php:250, extensions/email-notifications/classes/EditNotification.php:258, extensions/email-notifications/classes/EditNotification.php:254, extensions/email-notifications/classes/EditNotification.php:263, extensions/email-notifications/classes/EditNotification.php:291, extensions/external-db/classes/Settings.php:421
2551
  msgid "You do not have sufficient permissions to access this page."
2552
  msgstr ""
2553
 
2554
- #: classes/Views/AuditLog.php:592
2555
  msgid "Thank you for installing WP Activity Log. Do you want to run the wizard to configure the basic plugin settings?"
2556
  msgstr ""
2557
 
2558
- #: classes/Views/AuditLog.php:594, classes/Views/Settings.php:527, classes/Views/Settings.php:554, classes/Views/Settings.php:620, classes/Views/Settings.php:678, classes/Views/Settings.php:1192, classes/Views/Settings.php:1483, classes/Views/Settings.php:1542, classes/Views/Settings.php:1583, classes/Views/Settings.php:1614, classes/Views/SetupWizard.php:567, classes/Views/SetupWizard.php:615
2559
  msgid "Yes"
2560
  msgstr ""
2561
 
2562
- #: classes/Views/AuditLog.php:595, classes/Views/Settings.php:532, classes/Views/Settings.php:559, classes/Views/Settings.php:650, classes/Views/Settings.php:688, classes/Views/Settings.php:1197, classes/Views/Settings.php:1488, classes/Views/Settings.php:1549, classes/Views/Settings.php:1590, classes/Views/Settings.php:1615, classes/Views/SetupWizard.php:572, classes/Views/SetupWizard.php:620
2563
  msgid "No"
2564
  msgstr ""
2565
 
2566
- #: classes/Views/AuditLog.php:626
2567
  msgid "Please enter the number of alerts you would like to see on one page:"
2568
  msgstr ""
2569
 
2570
- #: classes/Views/AuditLog.php:628
2571
  msgid "No Results"
2572
  msgstr ""
2573
 
2574
- #: classes/Views/AuditLog.php:798, classes/Views/AuditLog.php:848, classes/Views/AuditLog.php:905, classes/Views/AuditLog.php:1219, classes/Views/AuditLog.php:1281, classes/Views/AuditLog.php:1334, classes/Views/Settings.php:235, classes/Views/Settings.php:1792, classes/Views/Settings.php:1820, classes/Views/Settings.php:1850, classes/Views/SetupWizard.php:96, extensions/search/search-init.php:450, extensions/search/search-init.php:498, extensions/email-notifications/classes/Notifications.php:492, extensions/external-db/classes/Connections.php:753, extensions/external-db/classes/Connections.php:787, extensions/external-db/classes/Connections.php:980, extensions/external-db/classes/Settings.php:312, extensions/external-db/classes/Settings.php:386, extensions/external-db/classes/Settings.php:1092, extensions/external-db/classes/Settings.php:1367, extensions/external-db/classes/Settings.php:1419, extensions/external-db/classes/Settings.php:1452, extensions/user-sessions/classes/Views.php:521, extensions/reports/classes/Views/Main.php:756
2575
  msgid "Nonce verification failed."
2576
  msgstr ""
2577
 
2578
- #: classes/Views/AuditLog.php:816
2579
  msgid "No users found."
2580
  msgstr ""
2581
 
2582
- #: classes/Views/AuditLog.php:836
2583
- msgid "Log file does not exist."
2584
- msgstr ""
2585
-
2586
- #: classes/Views/AuditLog.php:878
2587
- msgid "Request to get log file failed."
2588
- msgstr ""
2589
-
2590
- #: classes/Views/AuditLog.php:952
2591
  msgid "Freemius opt choice not found."
2592
  msgstr ""
2593
 
2594
- #: classes/Views/AuditLog.php:945
2595
  msgid "Freemius opt choice selected."
2596
  msgstr ""
2597
 
2598
  #. translators: 1 - an opening link tag, 2 - the closing tag.
2599
- #: classes/Views/AuditLog.php:1040
2600
  msgid "<br>An error occurred when trying to install and activate the plugin. Please try install it again from the %1$sevent settings%2$s page."
2601
  msgstr ""
2602
 
2603
- #: classes/Views/AuditLog.php:1139
2604
  msgid "WordPress Activity Log"
2605
  msgstr ""
2606
 
2607
- #: classes/Views/AuditLog.php:1140
2608
  msgid "When a user makes a change on your website the plugin will keep a record of that event here. Right now there is nothing because this is a new install."
2609
  msgstr ""
2610
 
2611
- #: classes/Views/AuditLog.php:1141
2612
  msgid "Thank you for using WP Activity Log"
2613
  msgstr ""
2614
 
2615
- #: classes/Views/AuditLog.php:1162
2616
- msgid "Error: You do not have sufficient permissions to exclude this URL."
2617
- msgstr ""
2618
-
2619
- #: classes/Views/AuditLog.php:1208, classes/Views/AuditLog.php:1318
2620
  msgid "You do not have sufficient permissions to dismiss this notice."
2621
  msgstr ""
2622
 
2623
- #: classes/Views/AuditLog.php:1276
2624
  msgid "Access Denied"
2625
  msgstr ""
2626
 
@@ -3008,7 +2980,7 @@ msgstr ""
3008
  msgid "Unknown settings tab."
3009
  msgstr ""
3010
 
3011
- #: classes/Views/Settings.php:220, classes/Views/Settings.php:1880, classes/Views/Settings.php:1903, classes/Views/SetupWizard.php:83, extensions/email-notifications/classes/Notifications.php:117, extensions/external-db/classes/Connections.php:738, extensions/external-db/classes/Connections.php:772, extensions/external-db/classes/Connections.php:970, extensions/external-db/classes/Settings.php:282, extensions/external-db/classes/Settings.php:373, extensions/external-db/classes/Settings.php:1079, extensions/external-db/classes/Settings.php:1320, extensions/external-db/classes/Settings.php:1384, extensions/external-db/classes/Settings.php:1436
3012
  msgid "Access Denied."
3013
  msgstr ""
3014
 
@@ -3016,7 +2988,7 @@ msgstr ""
3016
  msgid "Invalid input."
3017
  msgstr ""
3018
 
3019
- #: classes/Views/Settings.php:342, classes/Views/ToggleAlerts.php:148, extensions/external-db/classes/Settings.php:432
3020
  msgid "Settings have been saved."
3021
  msgstr ""
3022
 
@@ -3024,7 +2996,7 @@ msgstr ""
3024
  msgid "Message sent successfully."
3025
  msgstr ""
3026
 
3027
- #: classes/Views/Settings.php:348, classes/Views/ToggleAlerts.php:154, extensions/external-db/classes/Settings.php:437, extensions/user-sessions/classes/View/Sessions.php:164
3028
  msgid "Error: "
3029
  msgstr ""
3030
 
@@ -3288,370 +3260,355 @@ msgstr ""
3288
  msgid "<a href=\"https://wpactivitylog.com/pricing/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=settings+pages\" target=\"_blank\">Upgrade to Premium</a> to store the activity log data in an external database."
3289
  msgstr ""
3290
 
3291
- #: classes/Views/Settings.php:983
3292
- msgid "Activity log retention"
3293
- msgstr ""
3294
-
3295
- #: classes/Views/Settings.php:989
3296
- msgid "Keep all data"
3297
- msgstr ""
3298
-
3299
- #: classes/Views/Settings.php:1016, extensions/external-db/classes/Settings.php:754
3300
- msgid "Delete events older than"
3301
- msgstr ""
3302
-
3303
- #: classes/Views/Settings.php:1023, extensions/external-db/classes/Settings.php:760
3304
- msgid "Months"
3305
- msgstr ""
3306
-
3307
- #: classes/Views/Settings.php:1024, extensions/external-db/classes/Settings.php:761
3308
- msgid "Years"
3309
- msgstr ""
3310
-
3311
- #: classes/Views/Settings.php:1032
3312
- msgid "The next scheduled purging of activity log data that is older than "
3313
- msgstr ""
3314
-
3315
- #: classes/Views/Settings.php:1039
3316
- msgid "You can run the purging process now by clicking the button below."
3317
- msgstr ""
3318
-
3319
- #: classes/Views/Settings.php:1043
3320
- msgid "Purge Old Data"
3321
- msgstr ""
3322
-
3323
  #: classes/Views/Settings.php:976
3324
  msgid "Retention settings moved to %1$s archiving settings %2$s because archiving is enabled"
3325
  msgstr ""
3326
 
3327
- #: classes/Views/Settings.php:1054
3328
  msgid "What timestamp you would like to see in the WordPress activity log?"
3329
  msgstr ""
3330
 
3331
- #: classes/Views/Settings.php:1055
3332
  msgid "Note that the WordPress' timezone might be different from that configured on the server so when you switch from UTC to WordPress timezone or vice versa you might notice a big difference."
3333
  msgstr ""
3334
 
3335
- #: classes/Views/Settings.php:1059
3336
  msgid "Events Timestamp"
3337
  msgstr ""
3338
 
3339
- #: classes/Views/Settings.php:1079
3340
  msgid "UTC"
3341
  msgstr ""
3342
 
3343
- #: classes/Views/Settings.php:1085
3344
  msgid "Timezone configured on this WordPress website"
3345
  msgstr ""
3346
 
3347
- #: classes/Views/Settings.php:1092
3348
  msgid "Show Milliseconds"
3349
  msgstr ""
3350
 
3351
- #: classes/Views/Settings.php:1099
3352
  msgid "Show Milliseconds in list view"
3353
  msgstr ""
3354
 
3355
- #: classes/Views/Settings.php:1109
3356
  msgid "What user information should be displayed in the WordPress activity log?"
3357
  msgstr ""
3358
 
3359
- #: classes/Views/Settings.php:1110
3360
  msgid "Usernames might not be the same as a user's first and last name so it can be difficult to recognize whose user was that did a change. When there is no first & last name or public display name configured the plugin will revert back to the WordPress username."
3361
  msgstr ""
3362
 
3363
- #: classes/Views/Settings.php:1114
3364
  msgid "User information in Activity log"
3365
  msgstr ""
3366
 
3367
- #: classes/Views/Settings.php:1120
3368
  msgid "WordPress username"
3369
  msgstr ""
3370
 
3371
- #: classes/Views/Settings.php:1125
3372
  msgid "First name & last name"
3373
  msgstr ""
3374
 
3375
- #: classes/Views/Settings.php:1130
3376
  msgid "Configured public display name"
3377
  msgstr ""
3378
 
3379
- #: classes/Views/Settings.php:1140
3380
  msgid "Select the columns to be displayed in the WordPress activity log"
3381
  msgstr ""
3382
 
3383
- #: classes/Views/Settings.php:1141
3384
  msgid "When you deselect a column it won’t be shown in the activity log viewer in both views. The data will still be recorded by the plugin."
3385
  msgstr ""
3386
 
3387
- #: classes/Views/Settings.php:1145
3388
  msgid "Activity log columns selection"
3389
  msgstr ""
3390
 
3391
- #: classes/Views/Settings.php:1164
3392
  msgid "Info (used in Grid view mode only)"
3393
  msgstr ""
3394
 
3395
- #: classes/Views/Settings.php:1162
3396
  msgid "Source IP Address"
3397
  msgstr ""
3398
 
3399
- #: classes/Views/Settings.php:1158
3400
  msgid "Date & Time"
3401
  msgstr ""
3402
 
3403
- #: classes/Views/Settings.php:1154, extensions/email-notifications/classes/Common.php:1115, extensions/email-notifications/classes/Common.php:1149, extensions/email-notifications/classes/Common.php:1176, extensions/search/classes/Filters/AlertFilter.php:26, extensions/search/classes/Filters/AlertFilter.php:51
3404
  msgid "Event ID"
3405
  msgstr ""
3406
 
3407
- #: classes/Views/Settings.php:1180
3408
  msgid "Do you want to keep a log of WordPress background activity?"
3409
  msgstr ""
3410
 
3411
- #: classes/Views/Settings.php:1182
3412
  msgid "WordPress does a lot of things in the background that you do not necessarily need to know about, such as; deletion of post revisions, deletion of auto saved drafts etc. By default the plugin does not report them since there might be a lot and are irrelevant to the user."
3413
  msgstr ""
3414
 
3415
- #: classes/Views/Settings.php:1187
3416
  msgid "Enable Events for WordPress Background Activity"
3417
  msgstr ""
3418
 
3419
- #: classes/Views/Settings.php:1262
3420
  msgid "Configure how often file changes scan run and other settings from the"
3421
  msgstr ""
3422
 
3423
- #: classes/Views/Settings.php:1262
3424
  msgid "Website File Changes plugin settings"
3425
  msgstr ""
3426
 
3427
- #: classes/Views/Settings.php:1246, classes/Views/ToggleAlerts.php:556
3428
  msgid "Website File Changes Monitor"
3429
  msgstr ""
3430
 
3431
- #: classes/Views/Settings.php:1247, classes/Views/ToggleAlerts.php:557
3432
  msgid "To keep a log of file changes please install Website File Changes Monitor, a plugin which is also developed by us."
3433
  msgstr ""
3434
 
3435
- #: classes/Views/Settings.php:1248, classes/Views/ToggleAlerts.php:558
3436
  msgid "Install plugin now"
3437
  msgstr ""
3438
 
3439
- #: classes/Views/Settings.php:1248, classes/Views/ToggleAlerts.php:558
3440
  msgid "Learn More"
3441
  msgstr ""
3442
 
3443
- #: classes/Views/Settings.php:1277
3444
  msgid "By default the plugin keeps a log of all user changes done on your WordPress website. Use the setting below to exclude any objects from the activity log. When an object is excluded from the activity log, any event in which that object is referred will not be logged in the activity log."
3445
  msgstr ""
3446
 
3447
- #: classes/Views/Settings.php:1281
3448
  msgid "Exclude Users:"
3449
  msgstr ""
3450
 
3451
- #: classes/Views/Settings.php:1302
3452
  msgid "Exclude Roles:"
3453
  msgstr ""
3454
 
3455
- #: classes/Views/Settings.php:1323
3456
  msgid "Exclude IP Address(es):"
3457
  msgstr ""
3458
 
3459
- #: classes/Views/Settings.php:1339
3460
  msgid "You can exclude an individual IP address or a range of IP addresses. To exclude a range use the following format: [first IP]-[last octet of the last IP]. Example: 172.16.180.6-127."
3461
  msgstr ""
3462
 
3463
- #: classes/Views/Settings.php:1345
3464
  msgid "Exclude Post Type:"
3465
  msgstr ""
3466
 
3467
- #: classes/Views/Settings.php:1361
3468
  msgid "WordPress has the post and page post types by default though your website might use more post types (custom post types). You can exclude all post types, including the default WordPress ones."
3469
  msgstr ""
3470
 
3471
- #: classes/Views/Settings.php:1367
3472
  msgid "Exclude Custom Fields:"
3473
  msgstr ""
3474
 
3475
- #: classes/Views/Settings.php:1383
3476
  msgid "You can use the * wildcard to exclude multiple matching custom fields. For example to exclude all custom fields starting with wp123 enter wp123*"
3477
  msgstr ""
3478
 
3479
- #: classes/Views/Settings.php:1389
3480
- msgid "Exclude Non-Existing URLs:"
3481
- msgstr ""
3482
-
3483
- #: classes/Views/Settings.php:1405
3484
- msgid "Add the non existing URLs for which you do not want to be alerted of HTTP 404 errors in the activity log by specifying the complete URL. Examples below:"
3485
- msgstr ""
3486
-
3487
- #: classes/Views/Settings.php:1405
3488
- msgid "File: "
3489
- msgstr ""
3490
-
3491
- #: classes/Views/Settings.php:1405
3492
- msgid "Directory: "
3493
- msgstr ""
3494
-
3495
- #: classes/Views/Settings.php:1437
3496
  msgid "These settings are for advanced users."
3497
  msgstr ""
3498
 
3499
- #: classes/Views/Settings.php:1438
3500
  msgid "If you have any questions <a href=\"https://wpactivitylog.com/contact/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=settings+pages\" target=\"_blank\">contact us</a>."
3501
  msgstr ""
3502
 
3503
- #: classes/Views/Settings.php:1441
3504
  msgid "Where do you want the plugin's working directory for log files, reports and other files?"
3505
  msgstr ""
3506
 
3507
- #: classes/Views/Settings.php:1442
3508
- msgid "The plugin stores the reports it generates, a number of log files ( for example to keep a log of 404 errors), and the request log in this working directory. By default the directory is in the default WordPress uploads directory. Use the below setting to create the working directory in a different location. Note that the plugin requires write permissions to this directory. Please specify the relative path of the directory."
3509
  msgstr ""
3510
 
3511
- #: classes/Views/Settings.php:1447
3512
  msgid "Working directory location"
3513
  msgstr ""
3514
 
3515
- #: classes/Views/Settings.php:1470
3516
  msgid "Troubleshooting setting: Keep a debug log of all the requests this website receives"
3517
  msgstr ""
3518
 
3519
- #: classes/Views/Settings.php:1471
3520
  msgid "Only enable the request log on testing, staging and development website. Never enable logging on a live website unless instructed to do so. Enabling request logging on a live website may degrade the performance of the website."
3521
  msgstr ""
3522
 
3523
- #: classes/Views/Settings.php:1475
3524
  msgid "Request Log"
3525
  msgstr ""
3526
 
3527
- #: classes/Views/Settings.php:1505
3528
  msgid "Reset plugin settings to default"
3529
  msgstr ""
3530
 
3531
- #: classes/Views/Settings.php:1506
3532
  msgid "Use this button to <em>factory reset</em> the plugin. This means that all the configured settings will be reset to default and all email notifications, scheduled reports, external database / third party services connections, archiving and mirroring rule will be deleted. NOTE: the activity log data will not be purged. Use the setting below to purge the activity log."
3533
  msgstr ""
3534
 
3535
- #: classes/Views/Settings.php:1510
3536
  msgid "Reset Settings"
3537
  msgstr ""
3538
 
3539
- #: classes/Views/Settings.php:1512
3540
  msgid "RESET"
3541
  msgstr ""
3542
 
3543
- #: classes/Views/Settings.php:1518
3544
  msgid "Purge the WordPress activity log"
3545
  msgstr ""
3546
 
3547
- #: classes/Views/Settings.php:1519
3548
  msgid "Click the Purge button below to delete all the data from the WordPress activity log and start afresh."
3549
  msgstr ""
3550
 
3551
- #: classes/Views/Settings.php:1523
3552
  msgid "Purge Activity Log"
3553
  msgstr ""
3554
 
3555
- #: classes/Views/Settings.php:1525
3556
  msgid "PURGE"
3557
  msgstr ""
3558
 
3559
- #: classes/Views/Settings.php:1532
3560
  msgid "MainWP Child Site Stealth Mode"
3561
  msgstr ""
3562
 
3563
- #: classes/Views/Settings.php:1533
3564
  msgid "This option is enabled automatically when the plugin detects the MainWP Child plugin on the site. When this setting is enabled plugin access is restricted to the administrator who installs the plugin, the plugin is not shown in the list of installed plugins and no admin notifications are shown. Disable this option to change the plugin to the default setup."
3565
  msgstr ""
3566
 
3567
- #: classes/Views/Settings.php:1537
3568
  msgid "Enable MainWP Child Site Stealth Mode"
3569
  msgstr ""
3570
 
3571
- #: classes/Views/Settings.php:1557
3572
  msgid "Admin blocking plugins support"
3573
  msgstr ""
3574
 
3575
- #: classes/Views/Settings.php:1562
3576
  msgid "Enable early plugin loading on sites that use admin blocking plugins"
3577
  msgstr ""
3578
 
3579
- #: classes/Views/Settings.php:1571
3580
  msgid "Do you want to delete the plugin data from the database upon uninstall?"
3581
  msgstr ""
3582
 
3583
- #: classes/Views/Settings.php:1572
3584
  msgid "The plugin saves the activity log data and settings in the WordPress database. By default upon uninstalling the plugin the data is kept in the database so if it is installed again, you can still access the data. If the data is deleted it is not possible to recover it so you won't be able to access it again even when you reinstall the plugin."
3585
  msgstr ""
3586
 
3587
- #: classes/Views/Settings.php:1576
3588
  msgid "Remove Data on Uninstall"
3589
  msgstr ""
3590
 
3591
- #: classes/Views/Settings.php:1601
3592
  msgid "Are you sure you want to reset all the plugin settings to default? This action cannot be undone."
3593
  msgstr ""
3594
 
3595
- #: classes/Views/Settings.php:1611
3596
  msgid "Are you sure you want to purge all the activity log data?"
3597
  msgstr ""
3598
 
3599
- #: classes/Views/Settings.php:1642
3600
  msgid "MainWP Child plugin is not active on this website."
3601
  msgstr ""
3602
 
3603
- #: classes/Views/Settings.php:1675
3604
  msgid "The plugin cannot create the directory for the log files. Please check permissions and configure it again."
3605
  msgstr ""
3606
 
3607
- #: classes/Views/Settings.php:1751
3608
  msgid "The specified value is not a valid URL!"
3609
  msgstr ""
3610
 
3611
- #: classes/Views/Settings.php:1752
3612
  msgid "The specified value is not a valid post type!"
3613
  msgstr ""
3614
 
3615
- #: classes/Views/Settings.php:1753
3616
  msgid "The specified value is not a valid IP address!"
3617
  msgstr ""
3618
 
3619
- #: classes/Views/Settings.php:1754
3620
  msgid "The specified value is not a user nor a role!"
3621
  msgstr ""
3622
 
3623
- #: classes/Views/Settings.php:1755
3624
  msgid "Filename cannot be added because it contains invalid characters."
3625
  msgstr ""
3626
 
3627
- #: classes/Views/Settings.php:1756
3628
  msgid "File extension cannot be added because it contains invalid characters."
3629
  msgstr ""
3630
 
3631
- #: classes/Views/Settings.php:1757
3632
  msgid "Directory cannot be added because it contains invalid characters."
3633
  msgstr ""
3634
 
3635
- #: classes/Views/Settings.php:1758
3636
  msgid "Please save any changes before switching tabs."
3637
  msgstr ""
3638
 
3639
- #: classes/Views/Settings.php:1886, classes/Views/Settings.php:1909
3640
  msgid "Nonce Verification Failed."
3641
  msgstr ""
3642
 
3643
- #: classes/Views/Settings.php:1894
3644
  msgid "Plugin settings have been reset."
3645
  msgstr ""
3646
 
3647
- #: classes/Views/Settings.php:1920
3648
  msgid "Reset query failed."
3649
  msgstr ""
3650
 
3651
- #: classes/Views/Settings.php:1918
3652
  msgid "Tables has been reset."
3653
  msgstr ""
3654
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3655
  #: classes/Views/SetupWizard.php:178
3656
  msgid "Welcome"
3657
  msgstr ""
@@ -3665,163 +3622,155 @@ msgid "Log In"
3665
  msgstr ""
3666
 
3667
  #: classes/Views/SetupWizard.php:192
3668
- msgid "404s"
3669
- msgstr ""
3670
-
3671
- #: classes/Views/SetupWizard.php:197
3672
  msgid "User Registrations"
3673
  msgstr ""
3674
 
3675
- #: classes/Views/SetupWizard.php:202
3676
  msgid "Log Retention"
3677
  msgstr ""
3678
 
3679
- #: classes/Views/SetupWizard.php:207, classes/Views/SetupWizard.php:794, classes/Views/SetupWizard.php:795
3680
  msgid "Finish"
3681
  msgstr ""
3682
 
3683
- #: classes/Views/SetupWizard.php:267
3684
  msgid "Specified value in not a user."
3685
  msgstr ""
3686
 
3687
- #: classes/Views/SetupWizard.php:268
3688
  msgid "Specified value in not a role."
3689
  msgstr ""
3690
 
3691
- #: classes/Views/SetupWizard.php:269
3692
  msgid "Specified value in not an IP address."
3693
  msgstr ""
3694
 
3695
- #: classes/Views/SetupWizard.php:309
3696
  msgid "WP Activity Log &rsaquo; Setup Wizard"
3697
  msgstr ""
3698
 
3699
- #: classes/Views/SetupWizard.php:327
3700
  msgid "Close Wizard"
3701
  msgstr ""
3702
 
3703
  #. translators: 1 - an opening link tag, 2 - a closing link tag.
3704
- #: classes/Views/SetupWizard.php:420
3705
  msgid "You have reached an invaild step - %1$sreturn to the start of the wizard%2$s."
3706
  msgstr ""
3707
 
3708
- #: classes/Views/SetupWizard.php:437
3709
  msgid "This wizard helps you configure the basic plugin settings. All these settings can be changed at a later stage from the plugin settings."
3710
  msgstr ""
3711
 
3712
- #: classes/Views/SetupWizard.php:442
3713
  msgid "Start Configuring the Plugin"
3714
  msgstr ""
3715
 
3716
- #: classes/Views/SetupWizard.php:446
3717
  msgid "Exit Wizard"
3718
  msgstr ""
3719
 
3720
- #: classes/Views/SetupWizard.php:459
3721
  msgid "Please select the level of detail for your WordPress activity logs:"
3722
  msgstr ""
3723
 
3724
- #: classes/Views/SetupWizard.php:463
3725
  msgid "Basic (I want a high level overview and I am not interested in the detail)"
3726
  msgstr ""
3727
 
3728
- #: classes/Views/SetupWizard.php:468
3729
  msgid "Geek (I want to know everything that is happening on my WordPress)"
3730
  msgstr ""
3731
 
3732
- #: classes/Views/SetupWizard.php:470
3733
  msgid "Note: You can change the WordPress logging level from the plugin’s settings anytime."
3734
  msgstr ""
3735
 
3736
- #: classes/Views/SetupWizard.php:473, classes/Views/SetupWizard.php:473, classes/Views/SetupWizard.php:530, classes/Views/SetupWizard.php:530, classes/Views/SetupWizard.php:578, classes/Views/SetupWizard.php:578, classes/Views/SetupWizard.php:627, classes/Views/SetupWizard.php:627, classes/Views/SetupWizard.php:687, classes/Views/SetupWizard.php:688, classes/Views/SetupWizard.php:909, classes/Views/SetupWizard.php:910, extensions/external-db/classes/Connections.php:214, extensions/external-db/classes/Connections.php:565, extensions/external-db/classes/Mirroring.php:286, extensions/external-db/classes/Mirroring.php:601
3737
  msgid "Next"
3738
  msgstr ""
3739
 
3740
- #: classes/Views/SetupWizard.php:514
3741
  msgid "Do you or your users use other pages to log in to WordPress other than the default login page ( /wp-admin/ )?"
3742
  msgstr ""
3743
 
3744
- #: classes/Views/SetupWizard.php:518
3745
  msgid "Yes, we use other pages to login to WordPress."
3746
  msgstr ""
3747
 
3748
- #: classes/Views/SetupWizard.php:523
3749
  msgid "No, we only use the default WordPress login page."
3750
  msgstr ""
3751
 
3752
- #: classes/Views/SetupWizard.php:525
3753
  msgid "If your website is a membership or ecommerce website most probably you have more than one area from where the users can login. If you are not sure, select Yes."
3754
  msgstr ""
3755
 
3756
- #: classes/Views/SetupWizard.php:528, classes/Views/SetupWizard.php:576, classes/Views/SetupWizard.php:625, classes/Views/SetupWizard.php:679
3757
  msgid "Note: You can change the WordPress activity log retention settings at any time from the plugin settings later on."
3758
  msgstr ""
3759
 
3760
- #: classes/Views/SetupWizard.php:563
3761
- msgid "Do you want to keep a log of (non-logged in) visitors’ requests to non-existing URLs which generate a HTTP 404 error response?"
3762
- msgstr ""
3763
-
3764
- #: classes/Views/SetupWizard.php:611
3765
  msgid "Can visitors register for a user on your website?"
3766
  msgstr ""
3767
 
3768
- #: classes/Views/SetupWizard.php:622
3769
  msgid "If you are not sure about this setting, check if the Membership setting in the WordPress General settings is checked or not. If it is not checked (default) select No."
3770
  msgstr ""
3771
 
3772
- #: classes/Views/SetupWizard.php:661
3773
  msgid "How long do you want to keep the data in the WordPress activity Log?"
3774
  msgstr ""
3775
 
3776
- #: classes/Views/SetupWizard.php:666
3777
  msgid "6 months (data older than 6 months will be deleted)"
3778
  msgstr ""
3779
 
3780
- #: classes/Views/SetupWizard.php:671
3781
  msgid "12 months (data older than 12 months will be deleted)"
3782
  msgstr ""
3783
 
3784
- #: classes/Views/SetupWizard.php:676
3785
  msgid "Keep all data."
3786
  msgstr ""
3787
 
3788
- #: classes/Views/SetupWizard.php:697
3789
  msgid "The plugin stores the data in the WordPress database in a very efficient way, though the more data you keep the more hard disk space it will consume. If you need need to retain a lot of data we would recommend you to <a href=\"https://wpactivitylog.com/features/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=wizard+configuration\" target=\"_blank\">upgrade to Premium</a> and use the Database tools to store the WordPress activity log in an external database."
3790
  msgstr ""
3791
 
3792
- #: classes/Views/SetupWizard.php:765
3793
  msgid "Your plugin is all set and it is ready to start keeping a record of everything that is happening on your WordPress in a WordPress activity log."
3794
  msgstr ""
3795
 
3796
- #: classes/Views/SetupWizard.php:766
3797
  msgid "Below are a few useful links you might need to refer to:"
3798
  msgstr ""
3799
 
3800
- #: classes/Views/SetupWizard.php:771
3801
  msgid "Getting started with the WP Activity Log plugin"
3802
  msgstr ""
3803
 
3804
- #: classes/Views/SetupWizard.php:776
3805
  msgid "Knowledge Base & Support Documents"
3806
  msgstr ""
3807
 
3808
- #: classes/Views/SetupWizard.php:781
3809
  msgid "Benefits of keeping a WordPress activity log"
3810
  msgstr ""
3811
 
3812
- #: classes/Views/SetupWizard.php:786
3813
- msgid "We trust this plugin meets all your activity log requirements. Should you encounter any problems, have feature requests or would like to share some feedback, <a href=\"https://wpactivitylog.com/contact/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=wizard+configuration\" target=\"_blank\">please get in touch!</a>"
3814
  msgstr ""
3815
 
3816
- #: classes/Views/SetupWizard.php:822
3817
  msgid "Third Party Extensions"
3818
  msgstr ""
3819
 
3820
- #: classes/Views/SetupWizard.php:863
3821
  msgid "Monitoring changes done in third party plugins"
3822
  msgstr ""
3823
 
3824
- #: classes/Views/SetupWizard.php:864
3825
  msgid "We noticed that the below plugins are installed on this website. You can install our extensions to also keep a log of changes users do on these plugins."
3826
  msgstr ""
3827
 
@@ -3829,277 +3778,225 @@ msgstr ""
3829
  msgid "Enable/Disable Events"
3830
  msgstr ""
3831
 
3832
- #: classes/Views/ToggleAlerts.php:192
3833
  msgid "Log Level: "
3834
  msgstr ""
3835
 
3836
- #: classes/Views/ToggleAlerts.php:197
3837
  msgid "Basic"
3838
  msgstr ""
3839
 
3840
- #: classes/Views/ToggleAlerts.php:202
3841
  msgid "Geek"
3842
  msgstr ""
3843
 
3844
- #: classes/Views/ToggleAlerts.php:205
3845
  msgid "Custom"
3846
  msgstr ""
3847
 
3848
- #: classes/Views/ToggleAlerts.php:209
3849
  msgid "Use the Log level drop down menu above to use one of our preset log levels. Alternatively you can enable or disable any of the individual events from the below tabs. Refer to <a href=\"https://wpactivitylog.com/support/kb/list-wordpress-activity-log-event-ids/\" target=\"_blank\">the complete list of WordPress activity log event IDs</a> for reference on all the events the plugin can keep a log of."
3850
  msgstr ""
3851
 
3852
- #: classes/Views/ToggleAlerts.php:219
3853
- msgid "Front-end Events"
3854
- msgstr ""
3855
-
3856
- #: classes/Views/ToggleAlerts.php:222
3857
  msgid "Third party plugins"
3858
  msgstr ""
3859
 
3860
- #: classes/Views/ToggleAlerts.php:318
3861
  msgid "Code"
3862
  msgstr ""
3863
 
3864
- #: classes/Views/ToggleAlerts.php:361
3865
  msgid "Logins & Logouts"
3866
  msgstr ""
3867
 
3868
- #: classes/Views/ToggleAlerts.php:354
3869
  msgid "Your website is a single site so the multisite events have been disabled."
3870
  msgstr ""
3871
 
3872
- #: classes/Views/ToggleAlerts.php:334
3873
  msgid "The plugin WooCommerce is not installed on your website so these events have been disabled."
3874
  msgstr ""
3875
 
3876
- #: classes/Views/ToggleAlerts.php:341
3877
  msgid "Products"
3878
  msgstr ""
3879
 
3880
- #: classes/Views/ToggleAlerts.php:347
3881
  msgid "Post Changes"
3882
  msgstr ""
3883
 
3884
- #: classes/Views/ToggleAlerts.php:327
3885
  msgid "<strong>Note:</strong> Post refers to any type of content, i.e. blog post, page or a post with a custom post type."
3886
  msgstr ""
3887
 
3888
- #: classes/Views/ToggleAlerts.php:384
3889
  msgid "Not Implemented"
3890
  msgstr ""
3891
 
3892
- #: classes/Views/ToggleAlerts.php:387
3893
  msgid "Not Available"
3894
  msgstr ""
3895
 
3896
- #: classes/Views/ToggleAlerts.php:407
3897
- msgid "Product Attributes"
3898
- msgstr ""
3899
-
3900
- #: classes/Views/ToggleAlerts.php:405
3901
- msgid "Product Stock Changes"
3902
- msgstr ""
3903
-
3904
- #: classes/Views/ToggleAlerts.php:403
3905
- msgid "Product Admin"
3906
- msgstr ""
3907
-
3908
- #: classes/Views/ToggleAlerts.php:401
3909
- msgid "Post Settings"
3910
- msgstr ""
3911
-
3912
- #: classes/Views/ToggleAlerts.php:399
3913
- msgid "Files"
3914
- msgstr ""
3915
-
3916
- #: classes/Views/ToggleAlerts.php:397
3917
  msgid "User Sessions"
3918
  msgstr ""
3919
 
3920
- #: classes/Views/ToggleAlerts.php:477, classes/Views/ToggleAlerts.php:627
3921
- msgid "Capture 404 requests to file (the log file are created in the /wp-content/uploads/wp-activity-log/404s/ directory)"
3922
- msgstr ""
3923
-
3924
- #: classes/Views/ToggleAlerts.php:485, classes/Views/ToggleAlerts.php:631
3925
- msgid "Purge log files older than one month"
3926
- msgstr ""
3927
-
3928
- #: classes/Views/ToggleAlerts.php:490
3929
- msgid "Number of 404 Requests to Log. By default the plugin keeps up to 99 requests to non-existing pages from the same IP address. Increase the value in this setting to the desired amount to keep a log of more or less requests."
3930
- msgstr ""
3931
-
3932
- #: classes/Views/ToggleAlerts.php:495, classes/Views/ToggleAlerts.php:639
3933
- msgid "Record the referrer that generated the 404 error."
3934
- msgstr ""
3935
-
3936
- #: classes/Views/ToggleAlerts.php:507, classes/Views/ToggleAlerts.php:520
3937
- msgid "Number of login attempts to log. Enter 0 to log all failed login attempts. (By default the plugin only logs up to 10 failed login because the process can be very resource intensive in case of a brute force attack)"
3938
- msgstr ""
3939
-
3940
- #: classes/Views/ToggleAlerts.php:533
3941
- msgid "Log all stock changes. Disable this setting to only keep a log of stock changes done manually via the WooCommerce dashboard. Therefore automated stock changes typically done via customers placing orders or via other plugins will not be logged."
3942
- msgstr ""
3943
-
3944
- #: classes/Views/ToggleAlerts.php:584
3945
- msgid "This plugin keeps a log of what your website users are doing when they are logged in. On top of that it can also keep a log of some important events of (non logged in) website visitors. Use the below settings to enable / disable any of the front-end sensors:"
3946
- msgstr ""
3947
-
3948
- #: classes/Views/ToggleAlerts.php:589
3949
- msgid "Front-end users registrations"
3950
- msgstr ""
3951
-
3952
- #: classes/Views/ToggleAlerts.php:595
3953
- msgid "Keep a log when a visitor registers a user on the website. Only enable this if you allow visitors to register as users on your website. User registration is disabled by default in WordPress."
3954
  msgstr ""
3955
 
3956
- #: classes/Views/ToggleAlerts.php:600
3957
- msgid "Front-end users logins"
3958
  msgstr ""
3959
 
3960
- #: classes/Views/ToggleAlerts.php:606
3961
  msgid "Keep a log when users login to the website from other login pages / forms other than the default WordPress login page."
3962
  msgstr ""
3963
 
3964
- #: classes/Views/ToggleAlerts.php:611
3965
- msgid "Website visitors 404 errors"
3966
- msgstr ""
3967
-
3968
- #: classes/Views/ToggleAlerts.php:617
3969
- msgid "Event ID 6023: Keep a log when a website visitor requests a non-existing URL (HTTP 404 response error)."
3970
  msgstr ""
3971
 
3972
- #: classes/Views/ToggleAlerts.php:635
3973
- msgid "Number of 404 Requests to Log. By default the plugin keeps up to 99 requests to non-existing pages from the same IP address. Increase the value in this setting to the desired amount to keep a log of more or less requests. Note that by increasing this value to a high number, should your website be scanned the plugin will consume more resources to log all the requests."
3974
  msgstr ""
3975
 
3976
- #: classes/Views/ToggleAlerts.php:648
3977
  msgid "Save Changes"
3978
  msgstr ""
3979
 
3980
- #: classes/Views/ToggleAlerts.php:655
3981
  msgid "Log Level Updated"
3982
  msgstr ""
3983
 
3984
  #. translators: Alerts log level.
3985
- #: classes/Views/ToggleAlerts.php:659
3986
  msgid "The %s log level has been successfully loaded and applied."
3987
  msgstr ""
3988
 
3989
- #: classes/Views/ToggleAlerts.php:663, extensions/email-notifications/classes/Notifications.php:292, extensions/email-notifications/classes/Notifications.php:892, extensions/email-notifications/classes/Notifications.php:1976
3990
  msgid "OK"
3991
  msgstr ""
3992
 
3993
- #: classes/Views/ToggleAlerts.php:678
3994
  msgid "Enable File Integrity Scanner"
3995
  msgstr ""
3996
 
3997
- #: classes/Views/ToggleAlerts.php:680
3998
  msgid "The file integrity scanner is switched off. To enable this event it has to be switched on."
3999
  msgstr ""
4000
 
4001
- #: classes/Views/ToggleAlerts.php:684
4002
  msgid "SWITCH ON"
4003
  msgstr ""
4004
 
4005
- #: classes/Views/ToggleAlerts.php:685
4006
  msgid "DISABLE EVENT"
4007
  msgstr ""
4008
 
4009
- #: extensions/search/search-init.php:197
4010
  msgid "An identical search filter already exists."
4011
  msgstr ""
4012
 
4013
- #: extensions/search/search-init.php:216, extensions/search/search-init.php:332, extensions/user-sessions/classes/View/Sessions.php:367
4014
  msgid "Search"
4015
  msgstr ""
4016
 
4017
- #: extensions/search/search-init.php:333
4018
  msgid "- Use the free-text search to search for text in the event's message.<br>- To search for a particular Event ID, user, IP address, Post ID or Type or use date ranges, use the filters."
4019
  msgstr ""
4020
 
4021
- #: extensions/search/search-init.php:334
4022
  msgid "Clear Search Results"
4023
  msgstr ""
4024
 
4025
- #: extensions/search/search-init.php:335
4026
  msgid "Nothing found!"
4027
  msgstr ""
4028
 
4029
- #: extensions/search/search-init.php:336
4030
  msgid "Load"
4031
  msgstr ""
4032
 
4033
- #: extensions/search/search-init.php:337
4034
  msgid "Loading..."
4035
  msgstr ""
4036
 
4037
- #: extensions/search/search-init.php:338
4038
  msgid "Load & Run"
4039
  msgstr ""
4040
 
4041
- #: extensions/search/search-init.php:339, extensions/email-notifications/classes/NotificationBuilder.php:76, extensions/email-notifications/classes/Notifications.php:1886, extensions/email-notifications/classes/Notifications.php:1949, extensions/email-notifications/classes/Notifications.php:1964, extensions/external-db/classes/Connections.php:144, extensions/external-db/classes/Mirroring.php:204
4042
  msgid "Delete"
4043
  msgstr ""
4044
 
4045
- #: extensions/search/search-init.php:340, extensions/external-db/classes/Connections.php:556, extensions/external-db/classes/Mirroring.php:589
4046
  msgid "Deleting..."
4047
  msgstr ""
4048
 
4049
- #: extensions/search/search-init.php:342, extensions/search/classes/FilterManager.php:383
4050
  msgid "Load Search & Filters"
4051
  msgstr ""
4052
 
4053
- #: extensions/search/search-init.php:343
4054
  msgid "* Invalid IP"
4055
  msgstr ""
4056
 
4057
- #: extensions/search/search-init.php:344, extensions/search/classes/FilterManager.php:386
4058
  msgid "Remove"
4059
  msgstr ""
4060
 
4061
- #: extensions/search/search-init.php:345
4062
  msgid "Close Filters"
4063
  msgstr ""
4064
 
4065
- #: extensions/search/search-init.php:346, extensions/search/classes/FilterManager.php:411
4066
  msgid "Filter View"
4067
  msgstr ""
4068
 
4069
  #. translators: both placeholders are html formatting strings for itallics
4070
- #: extensions/search/search-init.php:349
4071
  msgid "Click the %1$sSearch%2$s button to apply the filters. Click the %1$sClear Search Results%2$s button to reset the search and filters."
4072
  msgstr ""
4073
 
4074
- #: extensions/search/search-init.php:395
4075
  msgid "Widget could not be found."
4076
  msgstr ""
4077
 
4078
- #: extensions/search/search-init.php:477, extensions/search/search-init.php:547
4079
  msgid "No saved search found."
4080
  msgstr ""
4081
 
4082
- #: extensions/search/search-init.php:469
4083
  msgid "Saved searches found."
4084
  msgstr ""
4085
 
4086
- #: extensions/search/search-init.php:511
4087
  msgid "Search name not specified."
4088
  msgstr ""
4089
 
4090
- #: extensions/search/search-init.php:538
4091
  msgid "Saved search not found."
4092
  msgstr ""
4093
 
4094
- #: extensions/search/search-init.php:530
4095
  msgid "Saved search deleted."
4096
  msgstr ""
4097
 
4098
- #: classes/Views/addons/html-view.php:101
 
 
 
 
 
 
 
 
4099
  msgid "Screenshots"
4100
  msgstr ""
4101
 
4102
- #: classes/Views/addons/html-view.php:118
4103
  msgid "Start Free 14-Day Premium Trial"
4104
  msgstr ""
4105
 
@@ -4128,11 +4025,11 @@ msgstr ""
4128
  #. translators: Twilio settings hyperlink.
4129
  #. translators: Twilio settings hyperlink.
4130
  #. translators: Twilio settings hyperlink.
4131
- #: extensions/email-notifications/classes/AddNotification.php:297, extensions/email-notifications/classes/EditNotification.php:348, extensions/email-notifications/classes/Notifications.php:826, extensions/email-notifications/classes/Notifications.php:946, extensions/email-notifications/classes/Notifications.php:1301, extensions/email-notifications/classes/Notifications.php:1465, extensions/email-notifications/classes/Notifications.php:1559, extensions/email-notifications/classes/Notifications.php:1725, extensions/email-notifications/classes/SMSProviderSettings.php:237
4132
  msgid "Click %s to configure Twilio integration for SMS notifications."
4133
  msgstr ""
4134
 
4135
- #: extensions/email-notifications/classes/AddNotification.php:297, extensions/email-notifications/classes/EditNotification.php:348, extensions/email-notifications/classes/Notifications.php:826, extensions/email-notifications/classes/Notifications.php:946, extensions/email-notifications/classes/Notifications.php:1301, extensions/email-notifications/classes/Notifications.php:1465, extensions/email-notifications/classes/Notifications.php:1559, extensions/email-notifications/classes/Notifications.php:1725, extensions/email-notifications/classes/SMSProviderSettings.php:237
4136
  msgid "here"
4137
  msgstr ""
4138
 
@@ -4162,200 +4059,200 @@ msgstr ""
4162
  msgid "Name"
4163
  msgstr ""
4164
 
4165
- #: extensions/email-notifications/classes/AddNotification.php:356, extensions/email-notifications/classes/EditNotification.php:448, extensions/email-notifications/classes/Notifications.php:1899, extensions/email-notifications/classes/Notifications.php:1910
4166
  msgid "Title"
4167
  msgstr ""
4168
 
4169
- #: extensions/email-notifications/classes/AddNotification.php:364, extensions/email-notifications/classes/EditNotification.php:456, extensions/email-notifications/classes/Notifications.php:963, extensions/email-notifications/classes/Notifications.php:986, extensions/email-notifications/classes/Notifications.php:1003, extensions/email-notifications/classes/Notifications.php:1020, extensions/email-notifications/classes/Notifications.php:1037, extensions/email-notifications/classes/Notifications.php:1061, extensions/email-notifications/classes/Notifications.php:1083, extensions/email-notifications/classes/Notifications.php:1096, extensions/email-notifications/classes/Notifications.php:1109, extensions/email-notifications/classes/Notifications.php:1122, extensions/email-notifications/classes/Notifications.php:1135, extensions/email-notifications/classes/Notifications.php:1148, extensions/email-notifications/classes/Notifications.php:1172, extensions/email-notifications/classes/Notifications.php:1187, extensions/email-notifications/classes/Notifications.php:1202, extensions/email-notifications/classes/Notifications.php:1217, extensions/email-notifications/classes/Notifications.php:1232, extensions/email-notifications/classes/Notifications.php:1254, extensions/email-notifications/classes/Notifications.php:1319, extensions/email-notifications/classes/Notifications.php:1334, extensions/email-notifications/classes/Notifications.php:1349, extensions/email-notifications/classes/Notifications.php:1373, extensions/email-notifications/classes/Notifications.php:1388, extensions/email-notifications/classes/Notifications.php:1403, extensions/email-notifications/classes/Notifications.php:1418, extensions/email-notifications/classes/Notifications.php:1480, extensions/email-notifications/classes/Notifications.php:1495, extensions/email-notifications/classes/Notifications.php:1510, extensions/email-notifications/classes/Notifications.php:1574, extensions/email-notifications/classes/Notifications.php:1591, extensions/email-notifications/classes/Notifications.php:1608, extensions/email-notifications/classes/Notifications.php:1625, extensions/email-notifications/classes/Notifications.php:1642, extensions/email-notifications/classes/Notifications.php:1659, extensions/email-notifications/classes/Notifications.php:1676, extensions/email-notifications/classes/Notifications.php:1742, extensions/email-notifications/classes/Notifications.php:1759, extensions/email-notifications/classes/Notifications.php:1776, extensions/email-notifications/classes/Notifications.php:1793, extensions/user-sessions/classes/View/Sessions.php:349
4170
  msgid "Email"
4171
  msgstr ""
4172
 
4173
- #: extensions/email-notifications/classes/AddNotification.php:370, extensions/email-notifications/classes/EditNotification.php:462, extensions/email-notifications/classes/Notifications.php:989, extensions/email-notifications/classes/Notifications.php:1006, extensions/email-notifications/classes/Notifications.php:1023, extensions/email-notifications/classes/Notifications.php:1040, extensions/email-notifications/classes/Notifications.php:1064, extensions/email-notifications/classes/Notifications.php:1086, extensions/email-notifications/classes/Notifications.php:1099, extensions/email-notifications/classes/Notifications.php:1112, extensions/email-notifications/classes/Notifications.php:1125, extensions/email-notifications/classes/Notifications.php:1138, extensions/email-notifications/classes/Notifications.php:1151, extensions/email-notifications/classes/Notifications.php:1175, extensions/email-notifications/classes/Notifications.php:1190, extensions/email-notifications/classes/Notifications.php:1205, extensions/email-notifications/classes/Notifications.php:1220, extensions/email-notifications/classes/Notifications.php:1235, extensions/email-notifications/classes/Notifications.php:1257, extensions/email-notifications/classes/Notifications.php:1322, extensions/email-notifications/classes/Notifications.php:1337, extensions/email-notifications/classes/Notifications.php:1352, extensions/email-notifications/classes/Notifications.php:1376, extensions/email-notifications/classes/Notifications.php:1391, extensions/email-notifications/classes/Notifications.php:1406, extensions/email-notifications/classes/Notifications.php:1421, extensions/email-notifications/classes/Notifications.php:1483, extensions/email-notifications/classes/Notifications.php:1498, extensions/email-notifications/classes/Notifications.php:1513, extensions/email-notifications/classes/Notifications.php:1577, extensions/email-notifications/classes/Notifications.php:1594, extensions/email-notifications/classes/Notifications.php:1611, extensions/email-notifications/classes/Notifications.php:1628, extensions/email-notifications/classes/Notifications.php:1645, extensions/email-notifications/classes/Notifications.php:1662, extensions/email-notifications/classes/Notifications.php:1679, extensions/email-notifications/classes/Notifications.php:1745, extensions/email-notifications/classes/Notifications.php:1762, extensions/email-notifications/classes/Notifications.php:1779, extensions/email-notifications/classes/Notifications.php:1796
4174
  msgid "Mobile Number"
4175
  msgstr ""
4176
 
4177
- #: extensions/email-notifications/classes/Common.php:383, extensions/email-notifications/classes/Common.php:448
4178
  msgid "The form is not valid. Please reload the page and try again."
4179
  msgstr ""
4180
 
4181
  #. translators: Event type
4182
- #: extensions/email-notifications/classes/Common.php:585, extensions/email-notifications/classes/Common.php:575, extensions/email-notifications/classes/Common.php:561, extensions/email-notifications/classes/Common.php:548, extensions/email-notifications/classes/Common.php:525, extensions/email-notifications/classes/Common.php:505, extensions/email-notifications/classes/Common.php:426
4183
  msgid "%s is not valid"
4184
  msgstr ""
4185
 
4186
- #: extensions/email-notifications/classes/Common.php:591
4187
  msgid "Selected TYPE is not valid."
4188
  msgstr ""
4189
 
4190
- #: extensions/email-notifications/classes/Common.php:581
4191
  msgid "Selected OBJECT is not valid."
4192
  msgstr ""
4193
 
4194
- #: extensions/email-notifications/classes/Common.php:570
4195
  msgid "Selected POST STATUS is not valid."
4196
  msgstr ""
4197
 
4198
- #: extensions/email-notifications/classes/Common.php:557
4199
  msgid "Selected POST TYPE is not valid."
4200
  msgstr ""
4201
 
4202
- #: extensions/email-notifications/classes/Common.php:536
4203
  msgid "The enviroment is not multisite."
4204
  msgstr ""
4205
 
4206
- #: extensions/email-notifications/classes/Common.php:542, extensions/email-notifications/classes/Common.php:519
4207
  msgid "%s was not found"
4208
  msgstr ""
4209
 
4210
- #: extensions/email-notifications/classes/Common.php:492, extensions/email-notifications/classes/Common.php:498
4211
  msgid "TIME is not valid."
4212
  msgstr ""
4213
 
4214
- #: extensions/email-notifications/classes/Common.php:483
4215
  msgid "DATE is not valid."
4216
  msgstr ""
4217
 
4218
- #: extensions/email-notifications/classes/Common.php:442
4219
  msgid "The SOURCE IP is not valid. Maximum of 15 characters allowed."
4220
  msgstr ""
4221
 
4222
- #: extensions/email-notifications/classes/Common.php:457
4223
  msgid "The SOURCE IP is not valid."
4224
  msgstr ""
4225
 
4226
- #: extensions/email-notifications/classes/Common.php:466
4227
  msgid "The SOURCE IP fragment is not valid."
4228
  msgstr ""
4229
 
4230
- #: extensions/email-notifications/classes/Common.php:435
4231
  msgid "Selected USER ROLE is not valid."
4232
  msgstr ""
4233
 
4234
- #: extensions/email-notifications/classes/Common.php:416
4235
  msgid "The USERNAME is not valid. Maximum of 50 characters allowed."
4236
  msgstr ""
4237
 
4238
- #: extensions/email-notifications/classes/Common.php:422
4239
  msgid "The USERNAME does not exist."
4240
  msgstr ""
4241
 
4242
- #: extensions/email-notifications/classes/Common.php:394, extensions/email-notifications/classes/Common.php:409
4243
  msgid "The EVENT ID is not valid."
4244
  msgstr ""
4245
 
4246
- #: extensions/email-notifications/classes/Common.php:400
4247
  msgid "Internal Error. Please reload the page and try again."
4248
  msgstr ""
4249
 
4250
- #: extensions/email-notifications/classes/Common.php:816, extensions/email-notifications/classes/Common.php:844, extensions/email-notifications/classes/Common.php:846
4251
  msgid "Title is required."
4252
  msgstr ""
4253
 
4254
- #: extensions/email-notifications/classes/Common.php:853
4255
  msgid "Title is not valid."
4256
  msgstr ""
4257
 
4258
- #: extensions/email-notifications/classes/Common.php:863
4259
  msgid "Please add at least one condition."
4260
  msgstr ""
4261
 
4262
- #: extensions/email-notifications/classes/Common.php:911, extensions/email-notifications/classes/Common.php:917, extensions/email-notifications/classes/Common.php:922
4263
  msgid "The form is not valid. Please refresh the page and try again."
4264
  msgstr ""
4265
 
4266
- #: extensions/email-notifications/classes/Common.php:931
4267
  msgid "A trigger's condition must not be longer than 50 characters."
4268
  msgstr ""
4269
 
4270
- #: extensions/email-notifications/classes/Common.php:967
4271
  msgid "Email or Username is not valid."
4272
  msgstr ""
4273
 
4274
- #: extensions/email-notifications/classes/Common.php:974
4275
  msgid "Mobile number is not valid."
4276
  msgstr ""
4277
 
4278
- #: extensions/email-notifications/classes/Common.php:961
4279
  msgid "Email or Username is required."
4280
  msgstr ""
4281
 
4282
- #: extensions/email-notifications/classes/Common.php:962
4283
  msgid "Mobile number is required."
4284
  msgstr ""
4285
 
4286
- #: extensions/email-notifications/classes/Common.php:1026, extensions/email-notifications/classes/Notifications.php:586
4287
  msgid "Notification could not be saved."
4288
  msgstr ""
4289
 
4290
- #: extensions/email-notifications/classes/Common.php:1033, extensions/email-notifications/classes/Notifications.php:645
4291
  msgid "Notification successfully saved."
4292
  msgstr ""
4293
 
4294
- #: extensions/email-notifications/classes/Common.php:1111, extensions/email-notifications/classes/Common.php:1173
4295
  msgid "Notification {title} on website {site} triggered"
4296
  msgstr ""
4297
 
4298
- #: extensions/email-notifications/classes/Common.php:1112, extensions/email-notifications/classes/Common.php:1174
4299
  msgid "Notification <strong>{title}</strong> was triggered. Below are the notification details:"
4300
  msgstr ""
4301
 
4302
- #: extensions/email-notifications/classes/Common.php:1114
4303
  msgid "Website"
4304
  msgstr ""
4305
 
4306
- #: extensions/email-notifications/classes/Common.php:1116, extensions/email-notifications/classes/Common.php:1177, extensions/search/classes/FilterManager.php:474, extensions/user-sessions/classes/View/Sessions.php:174, extensions/user-sessions/classes/View/Sessions.php:348
4307
  msgid "Username"
4308
  msgstr ""
4309
 
4310
- #: extensions/email-notifications/classes/Common.php:1117
4311
  msgid "User role"
4312
  msgstr ""
4313
 
4314
- #: extensions/email-notifications/classes/Common.php:1118
4315
  msgid "IP address"
4316
  msgstr ""
4317
 
4318
- #: extensions/email-notifications/classes/Common.php:1121
4319
  msgid "Event Message"
4320
  msgstr ""
4321
 
4322
- #: extensions/email-notifications/classes/Common.php:1122
4323
  msgid "Event generated on"
4324
  msgstr ""
4325
 
4326
- #: extensions/email-notifications/classes/Common.php:1124
4327
  msgid "These email notifications are sent with <a href=\"http://wpactivitylog.com\">WP Activity Log</a>, the most comprehensive WordPress activity log plugin solution."
4328
  msgstr ""
4329
 
4330
- #: extensions/email-notifications/classes/Common.php:1147, extensions/email-notifications/classes/Common.php:1206
4331
  msgid "User/Role"
4332
  msgstr ""
4333
 
4334
- #: extensions/email-notifications/classes/Common.php:1178, extensions/search/classes/FilterManager.php:486, extensions/search/classes/Filters/userrolefilter.php:49, extensions/search/classes/Filters/userrolefilter.php:87, extensions/user-sessions/classes/View/Sessions.php:353
4335
  msgid "User Role"
4336
  msgstr ""
4337
 
4338
- #: extensions/email-notifications/classes/Common.php:1180
4339
  msgid "Generated On"
4340
  msgstr ""
4341
 
4342
- #: extensions/email-notifications/classes/Common.php:1182
4343
  msgid "Monitoring of WordPress and Email Notifications provided by <a href=\"http://wpactivitylog.com\">WP Activity Log, WordPress most comprehensive audit trail plugin</a>."
4344
  msgstr ""
4345
 
4346
- #: extensions/email-notifications/classes/Common.php:1207
4347
  msgid "Event"
4348
  msgstr ""
4349
 
4350
- #: extensions/email-notifications/classes/Common.php:1222
4351
  msgid "Subject "
4352
  msgstr ""
4353
 
4354
- #: extensions/email-notifications/classes/Common.php:1231
4355
  msgid "Body "
4356
  msgstr ""
4357
 
4358
- #: extensions/email-notifications/classes/Common.php:1234
4359
  msgid "HTML is accepted. Available template tags:"
4360
  msgstr ""
4361
 
@@ -4394,7 +4291,7 @@ msgstr ""
4394
  msgid "Edit Notification"
4395
  msgstr ""
4396
 
4397
- #: extensions/email-notifications/classes/EditNotification.php:239, extensions/email-notifications/classes/Notifications.php:1848
4398
  msgid "Add New"
4399
  msgstr ""
4400
 
@@ -4442,7 +4339,7 @@ msgstr ""
4442
  msgid "Multisite"
4443
  msgstr ""
4444
 
4445
- #: extensions/email-notifications/classes/Notifications.php:185, extensions/email-notifications/classes/Notifications.php:845
4446
  msgid "Custom Notifications"
4447
  msgstr ""
4448
 
@@ -4450,11 +4347,11 @@ msgstr ""
4450
  msgid "Notifications Templates"
4451
  msgstr ""
4452
 
4453
- #: extensions/email-notifications/classes/Notifications.php:197, extensions/email-notifications/classes/Notifications.php:2025
4454
  msgid "Default Email Template"
4455
  msgstr ""
4456
 
4457
- #: extensions/email-notifications/classes/Notifications.php:201, extensions/email-notifications/classes/Notifications.php:2021
4458
  msgid "Default SMS Template"
4459
  msgstr ""
4460
 
@@ -4462,7 +4359,7 @@ msgstr ""
4462
  msgid "Notifications"
4463
  msgstr ""
4464
 
4465
- #: extensions/email-notifications/classes/Notifications.php:293, extensions/email-notifications/classes/Notifications.php:863
4466
  msgid "Test Notifications"
4467
  msgstr ""
4468
 
@@ -4474,488 +4371,472 @@ msgstr ""
4474
  msgid "Please specify an email address or a phone number to test."
4475
  msgstr ""
4476
 
4477
- #: extensions/email-notifications/classes/Notifications.php:603
4478
  msgid "Email Address or Username is not valid."
4479
  msgstr ""
4480
 
4481
- #: extensions/email-notifications/classes/Notifications.php:613
4482
  msgid "Phone number is not valid."
4483
  msgstr ""
4484
 
4485
- #: extensions/email-notifications/classes/Notifications.php:595
4486
  msgid "Email Address and Mobile Number cannot be empty."
4487
  msgstr ""
4488
 
4489
- #: extensions/email-notifications/classes/Notifications.php:742
4490
  msgid "To configure email notifications please contact the administrator of this multisite network on "
4491
  msgstr ""
4492
 
4493
- #: extensions/email-notifications/classes/Notifications.php:761
4494
  msgid "Daily summary email sent."
4495
  msgstr ""
4496
 
4497
- #: extensions/email-notifications/classes/Notifications.php:757
4498
  msgid "An error occurred while sending the daily summary email."
4499
  msgstr ""
4500
 
4501
- #: extensions/email-notifications/classes/Notifications.php:751
4502
  msgid "Invalid request."
4503
  msgstr ""
4504
 
4505
  #. translators: %s: Twilio settings link
4506
- #: extensions/email-notifications/classes/Notifications.php:835
4507
  msgid "Tick the check box and specify an email address or username to enable a notification. You can specify a phone number to send a SMS notification as well (%s). Multiple recipients or numbers should be separated with a comma (,). Click the Save Notifications button to save the changes."
4508
  msgstr ""
4509
 
4510
- #: extensions/email-notifications/classes/Notifications.php:836
4511
  msgid "Configure Twilio account integration"
4512
  msgstr ""
4513
 
4514
  #. translators: %s: Twilio settings link
4515
- #: extensions/email-notifications/classes/Notifications.php:844
4516
  msgid "You can create your own notification criteria in the %s tab."
4517
  msgstr ""
4518
 
4519
- #: extensions/email-notifications/classes/Notifications.php:864
4520
  msgid "Save Notifications"
4521
  msgstr ""
4522
 
4523
- #: extensions/email-notifications/classes/Notifications.php:873
4524
  msgid "Specify an email address to where you would like to send a test email notification:"
4525
  msgstr ""
4526
 
4527
- #: extensions/email-notifications/classes/Notifications.php:878
4528
  msgid "Specify a mobile phone number to where you would like to send a test SMS notification:"
4529
  msgstr ""
4530
 
4531
- #: extensions/email-notifications/classes/Notifications.php:884
4532
  msgid "Send"
4533
  msgstr ""
4534
 
4535
- #: extensions/email-notifications/classes/Notifications.php:885, extensions/external-db/classes/Connections.php:216, extensions/external-db/classes/Mirroring.php:287
4536
  msgid "Cancel"
4537
  msgstr ""
4538
 
4539
- #: extensions/email-notifications/classes/Notifications.php:949
4540
  msgid "Daily Summary of Activity Log"
4541
  msgstr ""
4542
 
4543
- #: extensions/email-notifications/classes/Notifications.php:960
4544
  msgid "Send me a summary of what happens every day."
4545
  msgstr ""
4546
 
4547
- #: extensions/email-notifications/classes/Notifications.php:964
4548
  msgid "Send Summary Now"
4549
  msgstr ""
4550
 
4551
- #: extensions/email-notifications/classes/Notifications.php:970
4552
  msgid "Suspicious Activity"
4553
  msgstr ""
4554
 
4555
- #: extensions/email-notifications/classes/Notifications.php:979, extensions/email-notifications/classes/Notifications.php:996
4556
  msgid "There are more than"
4557
  msgstr ""
4558
 
4559
- #: extensions/email-notifications/classes/Notifications.php:981
4560
  msgid "failed WordPress logins for a WordPress user (Event ID 1002)"
4561
  msgstr ""
4562
 
4563
- #: extensions/email-notifications/classes/Notifications.php:998
4564
  msgid "failed logins of non existing users (Event ID 1003)"
4565
  msgstr ""
4566
 
4567
- #: extensions/email-notifications/classes/Notifications.php:1013
4568
- msgid "A user generates more than"
4569
- msgstr ""
4570
-
4571
- #: extensions/email-notifications/classes/Notifications.php:1015
4572
- msgid "404 HTTP errors (Event ID 6007)"
4573
- msgstr ""
4574
-
4575
- #: extensions/email-notifications/classes/Notifications.php:1030
4576
- msgid "More than"
4577
- msgstr ""
4578
-
4579
- #: extensions/email-notifications/classes/Notifications.php:1032
4580
- msgid "404 HTTP errors are generated by the same IP address (Event ID 6023)"
4581
- msgstr ""
4582
-
4583
- #: extensions/email-notifications/classes/Notifications.php:1047
4584
  msgid "WordPress Install Changes"
4585
  msgstr ""
4586
 
4587
- #: extensions/email-notifications/classes/Notifications.php:1056
4588
  msgid "WordPress was updated (Event ID 6004)"
4589
  msgstr ""
4590
 
4591
- #: extensions/email-notifications/classes/Notifications.php:1071
4592
  msgid "Plugin Changes Notifications"
4593
  msgstr ""
4594
 
4595
- #: extensions/email-notifications/classes/Notifications.php:1079
4596
  msgid "New plugin is installed (Event ID 5000)"
4597
  msgstr ""
4598
 
4599
- #: extensions/email-notifications/classes/Notifications.php:1092
4600
  msgid "Installed plugin is activated (Event ID 5001)"
4601
  msgstr ""
4602
 
4603
- #: extensions/email-notifications/classes/Notifications.php:1105
4604
  msgid "Plugin file is modified (Event ID 2051)"
4605
  msgstr ""
4606
 
4607
- #: extensions/email-notifications/classes/Notifications.php:1118
4608
  msgid "Installed plugin is deactivated (Event ID 5002)"
4609
  msgstr ""
4610
 
4611
- #: extensions/email-notifications/classes/Notifications.php:1131
4612
  msgid "A plugin is uninstalled (Event ID 5003)"
4613
  msgstr ""
4614
 
4615
- #: extensions/email-notifications/classes/Notifications.php:1144
4616
  msgid "Installed plugin is upgraded (Event ID 5004)"
4617
  msgstr ""
4618
 
4619
- #: extensions/email-notifications/classes/Notifications.php:1158
4620
  msgid "Themes Changes Notifications"
4621
  msgstr ""
4622
 
4623
- #: extensions/email-notifications/classes/Notifications.php:1167
4624
  msgid "New theme is installed (Event ID 5005)"
4625
  msgstr ""
4626
 
4627
- #: extensions/email-notifications/classes/Notifications.php:1182
4628
  msgid "Installed theme is activated (Event ID 5006)"
4629
  msgstr ""
4630
 
4631
- #: extensions/email-notifications/classes/Notifications.php:1197
4632
  msgid "Theme file is modified (Event ID 2046)"
4633
  msgstr ""
4634
 
4635
- #: extensions/email-notifications/classes/Notifications.php:1212
4636
  msgid "A theme is uninstalled (Event ID 5007)"
4637
  msgstr ""
4638
 
4639
- #: extensions/email-notifications/classes/Notifications.php:1227
4640
  msgid "Installed theme is updated (Event ID 5031)"
4641
  msgstr ""
4642
 
4643
- #: extensions/email-notifications/classes/Notifications.php:1242
4644
  msgid "Critical Events"
4645
  msgstr ""
4646
 
4647
- #: extensions/email-notifications/classes/Notifications.php:1250
4648
  msgid "Critical Event is Generated"
4649
  msgstr ""
4650
 
4651
- #: extensions/email-notifications/classes/Notifications.php:1305
4652
  msgid "User Activity"
4653
  msgstr ""
4654
 
4655
- #: extensions/email-notifications/classes/Notifications.php:1314
4656
  msgid "User logs in (Event ID 1000)"
4657
  msgstr ""
4658
 
4659
- #: extensions/email-notifications/classes/Notifications.php:1329
4660
  msgid "First time user logs in"
4661
  msgstr ""
4662
 
4663
- #: extensions/email-notifications/classes/Notifications.php:1344
4664
  msgid "User changed password (Event ID 4003)"
4665
  msgstr ""
4666
 
4667
- #: extensions/email-notifications/classes/Notifications.php:1359
4668
  msgid "User Profile Changes"
4669
  msgstr ""
4670
 
4671
- #: extensions/email-notifications/classes/Notifications.php:1368
4672
  msgid "User changed email address (Event IDs 4005, 4006)"
4673
  msgstr ""
4674
 
4675
- #: extensions/email-notifications/classes/Notifications.php:1383
4676
  msgid "User's role has changed (Event ID 4002)"
4677
  msgstr ""
4678
 
4679
- #: extensions/email-notifications/classes/Notifications.php:1398
4680
  msgid "User changed the password of another user (Event ID 4004)"
4681
  msgstr ""
4682
 
4683
- #: extensions/email-notifications/classes/Notifications.php:1413
4684
  msgid "New user is created (Event IDs 4000, 4001, 4012)"
4685
  msgstr ""
4686
 
4687
- #: extensions/email-notifications/classes/Notifications.php:1475
4688
  msgid "New content is published (Event ID 2001)"
4689
  msgstr ""
4690
 
4691
- #: extensions/email-notifications/classes/Notifications.php:1490
4692
  msgid "Content in a post, page or custom post type is changed (Event ID 2065)"
4693
  msgstr ""
4694
 
4695
- #: extensions/email-notifications/classes/Notifications.php:1505
4696
  msgid "Anything but content in a post is changed (such as date, category, status, parent page etc)"
4697
  msgstr ""
4698
 
4699
- #: extensions/email-notifications/classes/Notifications.php:1570
4700
  msgid "User granted super admin (Event ID 4008)"
4701
  msgstr ""
4702
 
4703
- #: extensions/email-notifications/classes/Notifications.php:1586
4704
  msgid "User revoked super admin (Event ID 4009)"
4705
  msgstr ""
4706
 
4707
- #: extensions/email-notifications/classes/Notifications.php:1603
4708
  msgid "User added to site (Event ID 4010)"
4709
  msgstr ""
4710
 
4711
- #: extensions/email-notifications/classes/Notifications.php:1620
4712
  msgid "User removed from site (Event ID 4011)"
4713
  msgstr ""
4714
 
4715
- #: extensions/email-notifications/classes/Notifications.php:1637
4716
  msgid "Site changes"
4717
  msgstr ""
4718
 
4719
- #: extensions/email-notifications/classes/Notifications.php:1654
4720
  msgid "Activated theme on network (Event ID 5008)"
4721
  msgstr ""
4722
 
4723
- #: extensions/email-notifications/classes/Notifications.php:1671
4724
  msgid "Deactivated theme from network (Event ID 5009)"
4725
  msgstr ""
4726
 
4727
- #: extensions/email-notifications/classes/Notifications.php:1737
4728
  msgid "Any product change"
4729
  msgstr ""
4730
 
4731
- #: extensions/email-notifications/classes/Notifications.php:1754
4732
  msgid "Any store settings change"
4733
  msgstr ""
4734
 
4735
- #: extensions/email-notifications/classes/Notifications.php:1771
4736
  msgid "Any coupon code changes"
4737
  msgstr ""
4738
 
4739
- #: extensions/email-notifications/classes/Notifications.php:1788
4740
  msgid "Any orders changes"
4741
  msgstr ""
4742
 
4743
  #. translators: WSAL Notifications Documentation hyperlink
4744
- #: extensions/email-notifications/classes/Notifications.php:1843
4745
  msgid "Use the trigger builder to build any type of criteria that triggers email and / or SMS notifications. Refer to the %s for more detailed information."
4746
  msgstr ""
4747
 
4748
- #: extensions/email-notifications/classes/Notifications.php:1844
4749
  msgid "WordPress notifications documentation"
4750
  msgstr ""
4751
 
4752
- #: extensions/email-notifications/classes/Notifications.php:2000
4753
  msgid "No notifications found. Click the <code>Add New</code> button above to create one."
4754
  msgstr ""
4755
 
4756
- #: extensions/email-notifications/classes/Notifications.php:1986
4757
  msgid "No notifications found to match your search."
4758
  msgstr ""
4759
 
4760
- #: extensions/email-notifications/classes/Notifications.php:1993, extensions/email-notifications/classes/Notifications.php:1995, extensions/email-notifications/classes/Notifications.php:1870, extensions/email-notifications/classes/Notifications.php:1872
4761
  msgid "Search Notifications"
4762
  msgstr ""
4763
 
4764
- #: extensions/email-notifications/classes/Notifications.php:1861, extensions/reports/classes/HtmlReportGenerator.php:175, extensions/reports/classes/HtmlReportGenerator.php:179, extensions/user-sessions/classes/View/Options/Policies.php:24
4765
  msgid "All"
4766
  msgstr ""
4767
 
4768
- #: extensions/email-notifications/classes/Notifications.php:1883, extensions/email-notifications/classes/Notifications.php:1961
4769
  msgid "Bulk actions"
4770
  msgstr ""
4771
 
4772
- #: extensions/email-notifications/classes/Notifications.php:1884, extensions/email-notifications/classes/Notifications.php:1945, extensions/email-notifications/classes/Notifications.php:1962, extensions/external-db/classes/Connections.php:432, extensions/external-db/classes/Mirroring.php:185, extensions/external-db/classes/Settings.php:1347
4773
  msgid "Enable"
4774
  msgstr ""
4775
 
4776
- #: extensions/email-notifications/classes/Notifications.php:1885, extensions/email-notifications/classes/Notifications.php:1943, extensions/email-notifications/classes/Notifications.php:1963, extensions/external-db/classes/Mirroring.php:188, extensions/external-db/classes/Settings.php:1350
4777
  msgid "Disable"
4778
  msgstr ""
4779
 
4780
- #: extensions/email-notifications/classes/Notifications.php:1888, extensions/email-notifications/classes/Notifications.php:1966
4781
  msgid "Apply"
4782
  msgstr ""
4783
 
4784
- #: extensions/email-notifications/classes/Notifications.php:1896, extensions/email-notifications/classes/Notifications.php:1907, extensions/reports/inc/wsal-reporting-view.inc.php:735
4785
  msgid "Select All"
4786
  msgstr ""
4787
 
4788
- #: extensions/email-notifications/classes/Notifications.php:1933
4789
  msgid "Select"
4790
  msgstr ""
4791
 
4792
- #: extensions/email-notifications/classes/Notifications.php:1937, extensions/email-notifications/classes/Notifications.php:1939
4793
  msgid "Edit this notification"
4794
  msgstr ""
4795
 
4796
- #: extensions/email-notifications/classes/Notifications.php:1939
4797
  msgid "Edit"
4798
  msgstr ""
4799
 
4800
- #: extensions/email-notifications/classes/Notifications.php:1945
4801
  msgid "Enable this notification"
4802
  msgstr ""
4803
 
4804
- #: extensions/email-notifications/classes/Notifications.php:1943
4805
  msgid "Disable this notification"
4806
  msgstr ""
4807
 
4808
- #: extensions/email-notifications/classes/Notifications.php:1949
4809
  msgid "Delete this notification"
4810
  msgstr ""
4811
 
4812
- #: extensions/email-notifications/classes/Notifications.php:1952
4813
  msgid "Send Test Email"
4814
  msgstr ""
4815
 
4816
- #: extensions/email-notifications/classes/Notifications.php:1953
4817
  msgid "Send Test SMS"
4818
  msgstr ""
4819
 
4820
- #: extensions/email-notifications/classes/Notifications.php:2024
4821
  msgid "You can modify the default notification email template from here."
4822
  msgstr ""
4823
 
4824
- #: extensions/email-notifications/classes/Notifications.php:2026
4825
  msgid "This is the default template. You can override this default template with notification specific template which you can modify when using the Trigger Builder."
4826
  msgstr ""
4827
 
4828
- #: extensions/email-notifications/classes/Notifications.php:2020
4829
  msgid "You can modify the default notification SMS template from here."
4830
  msgstr ""
4831
 
4832
- #: extensions/email-notifications/classes/Notifications.php:2022
4833
  msgid "This is the default template for SMS notifications. The maximum number of characters for a SMS is 160, so if you configure longer notifications you will be charged for multiple SMS notifications."
4834
  msgstr ""
4835
 
4836
- #: extensions/email-notifications/classes/Notifications.php:2062
4837
  msgid "Subject"
4838
  msgstr ""
4839
 
4840
- #: extensions/email-notifications/classes/Notifications.php:2067
4841
  msgid "Body"
4842
  msgstr ""
4843
 
4844
- #: extensions/email-notifications/classes/Notifications.php:2092
4845
  msgid "HTML is accepted."
4846
  msgstr ""
4847
 
4848
- #: extensions/email-notifications/classes/Notifications.php:2093
4849
  msgid "Available template tags:"
4850
  msgstr ""
4851
 
4852
- #: extensions/email-notifications/classes/Notifications.php:2115
4853
  msgid "Shorten URLs"
4854
  msgstr ""
4855
 
4856
- #: extensions/email-notifications/classes/Notifications.php:2120
4857
  msgid "Shorten URLs with Bit.ly"
4858
  msgstr ""
4859
 
4860
- #: extensions/email-notifications/classes/Notifications.php:2123
4861
  msgid "Bit.ly Access Token"
4862
  msgstr ""
4863
 
4864
  #. translators: Bit.ly documentation hyperlink
4865
- #: extensions/email-notifications/classes/Notifications.php:2128
4866
  msgid "The URL shortener works for URLs in the {message} variable and will not shorten the URL of the website in the variable {site}. Shorten all URLs in the message using the %s."
4867
  msgstr ""
4868
 
4869
- #: extensions/email-notifications/classes/Notifications.php:2128
4870
  msgid "Bit.ly URL Shortener API"
4871
  msgstr ""
4872
 
4873
- #: extensions/email-notifications/classes/Notifications.php:2170
4874
  msgid "Template successfully saved."
4875
  msgstr ""
4876
 
4877
- #: extensions/email-notifications/classes/Notifications.php:2168
4878
  msgid "Template could not be saved."
4879
  msgstr ""
4880
 
4881
- #: extensions/email-notifications/classes/Notifications.php:2288, extensions/email-notifications/classes/Notifications.php:2394
4882
  msgid "You do not have sufficient permissions to perform this test."
4883
  msgstr ""
4884
 
4885
- #: extensions/email-notifications/classes/Notifications.php:2299, extensions/email-notifications/classes/Notifications.php:2400
4886
  msgid "Nonce verification failed. Please refresh and try again."
4887
  msgstr ""
4888
 
4889
- #: extensions/email-notifications/classes/Notifications.php:2320
4890
  msgid "Email address is invalid."
4891
  msgstr ""
4892
 
4893
- #: extensions/email-notifications/classes/Notifications.php:2316
4894
  msgid "Test email notification from the WP Activity Log plugin."
4895
  msgstr ""
4896
 
4897
- #: extensions/email-notifications/classes/Notifications.php:2317
4898
  msgid "This is a test email notification sent with the WP Activity Log plugin."
4899
  msgstr ""
4900
 
4901
- #: extensions/email-notifications/classes/Notifications.php:2330
4902
  msgid "Phone number is invalid."
4903
  msgstr ""
4904
 
4905
- #: extensions/email-notifications/classes/Notifications.php:2327
4906
  msgid "This is a test SMS notification sent with the WP Activity Log plugin."
4907
  msgstr ""
4908
 
4909
  #. translators: Support email hyperlink
4910
- #: extensions/email-notifications/classes/Notifications.php:2354
4911
  msgid "There are some problems sending the test email / SMS. Please contact us on %s to assist you with this problem."
4912
  msgstr ""
4913
 
4914
- #: extensions/email-notifications/classes/Notifications.php:2351, extensions/email-notifications/classes/Notifications.php:2446
4915
  msgid "There was a problem sending the SMS. Below is the error we got back from the SMS provider. Please contact us on %s if you need assistance with this issue."
4916
  msgstr ""
4917
 
4918
- #: extensions/email-notifications/classes/Notifications.php:2342
4919
  msgid "Email / SMS sent successfully."
4920
  msgstr ""
4921
 
4922
- #: extensions/email-notifications/classes/Notifications.php:2339, extensions/email-notifications/classes/Notifications.php:2448
4923
  msgid "SMS sent successfully."
4924
  msgstr ""
4925
 
4926
- #: extensions/email-notifications/classes/Notifications.php:2336, extensions/email-notifications/classes/Notifications.php:2427
4927
  msgid "Email sent successfully."
4928
  msgstr ""
4929
 
4930
- #: extensions/email-notifications/classes/Notifications.php:2454
4931
  msgid "Unknown notification type."
4932
  msgstr ""
4933
 
4934
- #: extensions/email-notifications/classes/Notifications.php:2451
4935
  msgid "There are some problems sending the test SMS. Please contact us on %s to assist you with this problem."
4936
  msgstr ""
4937
 
4938
- #: extensions/email-notifications/classes/Notifications.php:2443
4939
  msgid "Mobile number is not set for this notification."
4940
  msgstr ""
4941
 
4942
- #: extensions/email-notifications/classes/Notifications.php:2430
4943
  msgid "There are some problems sending the test email. Please contact us on %s to assist you with this problem."
4944
  msgstr ""
4945
 
4946
- #: extensions/email-notifications/classes/Notifications.php:2410
4947
  msgid "Unknown notification."
4948
  msgstr ""
4949
 
4950
- #: extensions/email-notifications/classes/Notifier.php:762, extensions/reports/classes/Common.php:502
4951
  msgid "View the Forum in editor"
4952
  msgstr ""
4953
 
4954
- #: extensions/email-notifications/classes/Notifier.php:765, extensions/reports/classes/Common.php:505
4955
  msgid "View the Topic in editor"
4956
  msgstr ""
4957
 
4958
- #: extensions/email-notifications/classes/Notifier.php:947
4959
  msgid "Contact us on support@wpsecurityauditlog.com for assistance"
4960
  msgstr ""
4961
 
@@ -5352,7 +5233,7 @@ msgstr ""
5352
  msgid "Successfully connected to Papertrail App."
5353
  msgstr ""
5354
 
5355
- #: extensions/external-db/classes/Connections.php:804, extensions/external-db/classes/Connections.php:1014, extensions/external-db/classes/Settings.php:1141, extensions/external-db/classes/Settings.php:1109
5356
  msgid "Successfully connected to database."
5357
  msgstr ""
5358
 
@@ -5380,23 +5261,23 @@ msgstr ""
5380
  msgid "Frequency"
5381
  msgstr ""
5382
 
5383
- #: extensions/external-db/classes/Mirroring.php:164, extensions/external-db/classes/Mirroring.php:401, extensions/external-db/classes/Settings.php:928
5384
  msgid "15 minutes"
5385
  msgstr ""
5386
 
5387
- #: extensions/external-db/classes/Mirroring.php:167, extensions/external-db/classes/Mirroring.php:402, extensions/external-db/classes/Settings.php:931
5388
  msgid "1 hour"
5389
  msgstr ""
5390
 
5391
- #: extensions/external-db/classes/Mirroring.php:170, extensions/external-db/classes/Mirroring.php:403, extensions/external-db/classes/Settings.php:934
5392
  msgid "6 hours"
5393
  msgstr ""
5394
 
5395
- #: extensions/external-db/classes/Mirroring.php:173, extensions/external-db/classes/Mirroring.php:404, extensions/external-db/classes/Settings.php:937
5396
  msgid "12 hours"
5397
  msgstr ""
5398
 
5399
- #: extensions/external-db/classes/Mirroring.php:176, extensions/external-db/classes/Mirroring.php:405, extensions/external-db/classes/Settings.php:940
5400
  msgid "24 hours"
5401
  msgstr ""
5402
 
@@ -5493,7 +5374,7 @@ msgstr ""
5493
  msgid "Connection"
5494
  msgstr ""
5495
 
5496
- #: extensions/external-db/classes/Mirroring.php:373, extensions/external-db/classes/Settings.php:1175
5497
  msgid "Select a connection"
5498
  msgstr ""
5499
 
@@ -5607,7 +5488,7 @@ msgstr ""
5607
  msgid "Save & Test Changes"
5608
  msgstr ""
5609
 
5610
- #: extensions/external-db/classes/Settings.php:545, extensions/external-db/classes/Settings.php:795
5611
  msgid "Test Connection"
5612
  msgstr ""
5613
 
@@ -5671,134 +5552,113 @@ msgstr ""
5671
  msgid "Once you configure archiving these data retention settings will be used instead of the ones configured in the plugin's general settings."
5672
  msgstr ""
5673
 
5674
- #: extensions/external-db/classes/Settings.php:733
5675
- msgid "Activity Log Retention"
5676
- msgstr ""
5677
-
5678
- #: extensions/external-db/classes/Settings.php:739
5679
- msgid "None"
5680
- msgstr ""
5681
-
5682
- #: extensions/external-db/classes/Settings.php:768
5683
- msgid "Next Scheduled Cleanup is in "
5684
- msgstr ""
5685
-
5686
- #. translators: Events Purning Link
5687
- #: extensions/external-db/classes/Settings.php:773
5688
- msgid "(or %s)"
5689
- msgstr ""
5690
-
5691
- #: extensions/external-db/classes/Settings.php:774
5692
- msgid "Run Manually"
5693
- msgstr ""
5694
-
5695
- #: extensions/external-db/classes/Settings.php:796
5696
  msgid "Execute Archiving Now"
5697
  msgstr ""
5698
 
5699
- #: extensions/external-db/classes/Settings.php:799
5700
  msgid "Reset Archiving Settings"
5701
  msgstr ""
5702
 
5703
- #: extensions/external-db/classes/Settings.php:800
5704
  msgid "Click the button below to disable archiving and reset the settings to no archiving. Note that the archived data will not be deleted."
5705
  msgstr ""
5706
 
5707
- #: extensions/external-db/classes/Settings.php:801
5708
  msgid "Disable Archiving & Reset Settings"
5709
  msgstr ""
5710
 
5711
- #: extensions/external-db/classes/Settings.php:917
5712
  msgid "Run the Archiving Process Every"
5713
  msgstr ""
5714
 
5715
- #: extensions/external-db/classes/Settings.php:946
5716
  msgid "Stop Archiving"
5717
  msgstr ""
5718
 
5719
- #: extensions/external-db/classes/Settings.php:1047
5720
  msgid "Attention!"
5721
  msgstr ""
5722
 
5723
  #. translators: %1$s: Alerts Pruning Period, %2$s: Alerts Archiving Period
5724
- #: extensions/external-db/classes/Settings.php:1051
5725
  msgid "The activity log retention setting is configured to delete events older than %1$s. This period should be longer than the configured %2$s archiving period otherwise events will be deleted and not archived."
5726
  msgstr ""
5727
 
5728
- #: extensions/external-db/classes/Settings.php:1295
5729
  msgid "Resetting..."
5730
  msgstr ""
5731
 
5732
- #: extensions/external-db/classes/Settings.php:1296
5733
  msgid "Resetting Failed!"
5734
  msgstr ""
5735
 
5736
  #. translators: %d: Number of events.
5737
- #: extensions/external-db/classes/Settings.php:1298
5738
  msgid " So far %d events have been migrated."
5739
  msgstr ""
5740
 
5741
- #: extensions/external-db/classes/Settings.php:1299
5742
  msgid "WordPress security events successfully migrated to WordPress database."
5743
  msgstr ""
5744
 
5745
- #: extensions/external-db/classes/Settings.php:1300
5746
  msgid "WordPress security events successfully migrated to the external database."
5747
  msgstr ""
5748
 
5749
- #: extensions/external-db/classes/Settings.php:1301
5750
  msgid "No events to migrate."
5751
  msgstr ""
5752
 
5753
- #: extensions/external-db/classes/Settings.php:1340
5754
  msgid "Mirror not found."
5755
  msgstr ""
5756
 
5757
- #: extensions/reports/classes/Common.php:709, extensions/reports/classes/Common.php:713, extensions/reports/classes/Common.php:717, extensions/reports/classes/Common.php:721, extensions/reports/classes/Common.php:725, extensions/reports/classes/Common.php:729, extensions/reports/classes/Common.php:733, extensions/reports/classes/Common.php:737, extensions/reports/classes/Common.php:741, extensions/reports/classes/Common.php:745, extensions/reports/classes/Common.php:749
5758
  msgid "Internal error. <code>%s</code> key was not found."
5759
  msgstr ""
5760
 
5761
- #: extensions/reports/classes/Common.php:773, extensions/reports/classes/Common.php:1586
5762
  msgid "Please specify at least one Alert Group or specify an Alert Code."
5763
  msgstr ""
5764
 
5765
- #: extensions/reports/classes/Common.php:778
5766
  msgid "Internal Error: Could not detect the type of the report to generate."
5767
  msgstr ""
5768
 
5769
- #: extensions/reports/classes/Common.php:888, extensions/reports/classes/Common.php:922, extensions/reports/classes/Common.php:967, extensions/reports/classes/Common.php:985, extensions/reports/classes/Common.php:1778
5770
  msgid "There are no alerts that match your filtering criteria. Please try a different set of rules."
5771
  msgstr ""
5772
 
5773
- #: extensions/reports/classes/Common.php:970, extensions/reports/classes/Common.php:988, extensions/reports/classes/Common.php:1781
5774
  msgid "Error: The <strong>%s</strong> path is not accessible."
5775
  msgstr ""
5776
 
5777
- #: extensions/reports/classes/Common.php:1249, extensions/reports/classes/Common.php:1685
5778
  msgid "%1$s - Website %2$s"
5779
  msgstr ""
5780
 
5781
- #: extensions/reports/classes/Common.php:1252, extensions/reports/classes/Common.php:1688
5782
  msgid "Week number %1$s - Website %2$s"
5783
  msgstr ""
5784
 
5785
- #: extensions/reports/classes/Common.php:1255, extensions/reports/classes/Common.php:1691
5786
  msgid "Month %1$s %2$s- Website %3$s"
5787
  msgstr ""
5788
 
5789
- #: extensions/reports/classes/Common.php:1258, extensions/reports/classes/Common.php:1694
5790
  msgid "Quarter %1$s - Website %2$s"
5791
  msgstr ""
5792
 
5793
- #: extensions/reports/classes/Common.php:1270, extensions/reports/classes/Common.php:1700
5794
  msgid " - %s Email Report"
5795
  msgstr ""
5796
 
5797
- #: extensions/reports/classes/Common.php:1558
5798
  msgid "Internal Error. Could not retrieve the alerts from the main plugin."
5799
  msgstr ""
5800
 
5801
- #: extensions/reports/classes/HtmlReportGenerator.php:108, extensions/reports/classes/HtmlReportGenerator.php:355
5802
  msgid "WP Activity Log Reporter"
5803
  msgstr ""
5804
 
@@ -5810,15 +5670,15 @@ msgstr ""
5810
  msgid "website"
5811
  msgstr ""
5812
 
5813
- #: extensions/reports/classes/HtmlReportGenerator.php:150, extensions/reports/classes/HtmlReportGenerator.php:364
5814
  msgid "Report Details:"
5815
  msgstr ""
5816
 
5817
- #: extensions/reports/classes/HtmlReportGenerator.php:151, extensions/reports/classes/HtmlReportGenerator.php:365
5818
  msgid "Generated on:"
5819
  msgstr ""
5820
 
5821
- #: extensions/reports/classes/HtmlReportGenerator.php:152, extensions/reports/classes/HtmlReportGenerator.php:366
5822
  msgid "Generated by:"
5823
  msgstr ""
5824
 
@@ -5842,15 +5702,15 @@ msgstr ""
5842
  msgid "Alert Groups"
5843
  msgstr ""
5844
 
5845
- #: extensions/reports/classes/HtmlReportGenerator.php:163, extensions/reports/classes/HtmlReportGenerator.php:370
5846
  msgid "Alert Code(s)"
5847
  msgstr ""
5848
 
5849
- #: extensions/reports/classes/HtmlReportGenerator.php:164, extensions/reports/classes/HtmlReportGenerator.php:371
5850
  msgid "Start date"
5851
  msgstr ""
5852
 
5853
- #: extensions/reports/classes/HtmlReportGenerator.php:165, extensions/reports/classes/HtmlReportGenerator.php:372
5854
  msgid "End date"
5855
  msgstr ""
5856
 
@@ -5862,15 +5722,15 @@ msgstr ""
5862
  msgid "Post Status"
5863
  msgstr ""
5864
 
5865
- #: extensions/reports/classes/HtmlReportGenerator.php:176, extensions/reports/classes/HtmlReportGenerator.php:341
5866
  msgid "From the beginning"
5867
  msgstr ""
5868
 
5869
- #: extensions/reports/classes/HtmlReportGenerator.php:221, extensions/reports/classes/HtmlReportGenerator.php:367
5870
  msgid "Criteria"
5871
  msgstr ""
5872
 
5873
- #: extensions/reports/classes/HtmlReportGenerator.php:383
5874
  msgid "Results"
5875
  msgstr ""
5876
 
@@ -6427,7 +6287,7 @@ msgstr ""
6427
  msgid "Users sessions termination is in progress. Please wait..."
6428
  msgstr ""
6429
 
6430
- #: extensions/user-sessions/classes/Views.php:429, extensions/reports/classes/Views/Main.php:741
6431
  msgid "You do not have sufficient permissions."
6432
  msgstr ""
6433
 
@@ -6435,27 +6295,27 @@ msgstr ""
6435
  msgid "No sessions."
6436
  msgstr ""
6437
 
6438
- #: extensions/user-sessions/classes/Views.php:487
6439
  msgid "Session destroyed."
6440
  msgstr ""
6441
 
6442
- #: extensions/user-sessions/classes/Views.php:495
6443
  msgid "User session data is not set."
6444
  msgstr ""
6445
 
6446
- #: extensions/user-sessions/classes/Views.php:511, extensions/user-sessions/classes/Views.php:604
6447
  msgid "User do not have sufficient permissions."
6448
  msgstr ""
6449
 
6450
- #: extensions/user-sessions/classes/Views.php:582
6451
  msgid "Users offset is not set."
6452
  msgstr ""
6453
 
6454
- #: extensions/user-sessions/classes/Views.php:575, extensions/user-sessions/classes/Views.php:558
6455
  msgid "Sessions destroyed!"
6456
  msgstr ""
6457
 
6458
- #: extensions/user-sessions/classes/Views.php:614
6459
  msgid "Nonce check failed."
6460
  msgstr ""
6461
 
@@ -6467,19 +6327,19 @@ msgstr ""
6467
  msgid "Reports"
6468
  msgstr ""
6469
 
6470
- #: extensions/reports/classes/Views/Main.php:666
6471
  msgid " Generating reports. Please do not close this window"
6472
  msgstr ""
6473
 
6474
- #: extensions/reports/classes/Views/Main.php:679
6475
  msgid "To generate a report or configure automated scheduled report please contact the administrator of this multisite network on "
6476
  msgstr ""
6477
 
6478
- #: extensions/reports/classes/Views/Main.php:697
6479
  msgid "The %s directory which the Reports plugin uses to create reports in was either not found or is not accessible."
6480
  msgstr ""
6481
 
6482
- #: extensions/reports/classes/Views/Main.php:701
6483
  msgid "In order for the plugin to function, the directory %1$s must be created and the plugin should have access to write to this directory, so please configure the following permissions: 0755. If you have any questions or need further assistance please %2$s"
6484
  msgstr ""
6485
 
@@ -6551,7 +6411,7 @@ msgstr ""
6551
  msgid "Select a user role to filter"
6552
  msgstr ""
6553
 
6554
- #: extensions/user-sessions/classes/Sensors/UserSessionsTracking.php:283, extensions/user-sessions/classes/View/Options/Policies.php:234
6555
  msgid "ERROR: Your session was blocked with the <a href=\"https://en-gb.wordpress.org/plugins/wp-security-audit-log\" target=\"_blank\">WP Activity Log plugin</a> because there is already another user logged in with the same username. Please contact the site administrator for more information."
6556
  msgstr ""
6557
 
1048
  msgid "New user was created on WordPress"
1049
  msgstr ""
1050
 
1051
+ #: defaults.php:304
1052
+ msgid "New user: %NewUserData->Username% %LineBreak% Role: %NewUserData->Roles% %LineBreak% %EditUserLink%"
1053
  msgstr ""
1054
 
1055
  #: defaults.php:305
1056
  msgid "User created another WordPress user"
1057
  msgstr ""
1058
 
1059
+ #: defaults.php:305
1060
+ msgid "New user: %NewUserData->Username% %LineBreak% Role: %NewUserData->Roles% %LineBreak% First name: %NewUserData->FirstName% %LineBreak% Last name: %NewUserData->LastName% %LineBreak% %EditUserLink%"
1061
+ msgstr ""
1062
+
1063
  #: defaults.php:306
1064
  msgid "The role of a user was changed by another WordPress user"
1065
  msgstr ""
1472
  msgid "Purged the activity log"
1473
  msgstr ""
1474
 
1475
+ #: defaults.php:387
1476
+ msgid "Some WP Activity Log plugin settings on this site were propagated and overridden from the MainWP dashboard"
1477
  msgstr ""
1478
 
1479
+ #: defaults.php:387
1480
+ msgid "Some WP Activity Log plugin settings on this site were propagated and overridden from the MainWP dashboard."
1481
  msgstr ""
1482
 
1483
  #: defaults.php:391
 
 
 
 
 
 
 
 
1484
  msgid "Option Anyone Can Register in WordPress settings changed"
1485
  msgstr ""
1486
 
1487
+ #: defaults.php:391
1488
  msgid "The option Anyone can register"
1489
  msgstr ""
1490
 
1491
+ #: defaults.php:392
1492
  msgid "New User Default Role changed"
1493
  msgstr ""
1494
 
1495
+ #: defaults.php:392
1496
  msgid "Changed the new user default role %LineBreak% Previous role: %OldRole% %LineBreak% New role: %NewRole%"
1497
  msgstr ""
1498
 
1499
+ #: defaults.php:393
1500
  msgid "WordPress Administrator Notification email changed"
1501
  msgstr ""
1502
 
1503
+ #: defaults.php:393
1504
  msgid "Changed the WordPress administrator notification email address %LineBreak% Previous address %OldEmail% %LineBreak% New address: %NewEmail%"
1505
  msgstr ""
1506
 
1507
+ #: defaults.php:394
1508
  msgid "User changes the WordPress Permalinks"
1509
  msgstr ""
1510
 
1511
+ #: defaults.php:394
1512
  msgid "Changed the WordPress permalinks %LineBreak% Previous permalinks: %OldPattern% %LineBreak% New permalinks: %NewPattern%"
1513
  msgstr ""
1514
 
1515
+ #: defaults.php:395
1516
  msgid "Enabled/Disabled the option Discourage search engines from indexing this site"
1517
  msgstr ""
1518
 
1519
+ #: defaults.php:395
1520
  msgid "Discourage search engines from indexing this site."
1521
  msgstr ""
1522
 
1523
+ #: defaults.php:396
1524
  msgid "Enabled/Disabled comments on all the website"
1525
  msgstr ""
1526
 
1527
+ #: defaults.php:396
1528
  msgid "Comments on the website"
1529
  msgstr ""
1530
 
1531
+ #: defaults.php:397
1532
  msgid "Enabled/Disabled the option Comment author must fill out name and email"
1533
  msgstr ""
1534
 
1535
+ #: defaults.php:397
1536
  msgid "The option Comment author must fill out name and email"
1537
  msgstr ""
1538
 
1539
+ #: defaults.php:398
1540
  msgid "Enabled/Disabled the option Users must be logged in and registered to comment"
1541
  msgstr ""
1542
 
1543
+ #: defaults.php:398
1544
  msgid "The option Users must be logged in and registered to comment"
1545
  msgstr ""
1546
 
1547
+ #: defaults.php:399
1548
  msgid "Enabled/Disabled the option to automatically close comments"
1549
  msgstr ""
1550
 
1551
+ #: defaults.php:399
1552
  msgid "The option to Automatically close comments after %Value% days"
1553
  msgstr ""
1554
 
1555
+ #: defaults.php:400
1556
  msgid "Changed the value of the option Automatically close comments"
1557
  msgstr ""
1558
 
1559
+ #: defaults.php:400
1560
  msgid "Changed the value of the option to Automatically close comments after a number of days %LineBreak% Previous value: %OldValue% %LineBreak% New value: %NewValue%"
1561
  msgstr ""
1562
 
1563
+ #: defaults.php:401
1564
  msgid "Enabled/Disabled the option for comments to be manually approved"
1565
  msgstr ""
1566
 
1567
+ #: defaults.php:401
1568
  msgid "The option for comments to be manually approved"
1569
  msgstr ""
1570
 
1571
+ #: defaults.php:402
1572
  msgid "Enabled/Disabled the option for an author to have previously approved comments for the comments to appear"
1573
  msgstr ""
1574
 
1575
+ #: defaults.php:402
1576
  msgid "The option for an author to have previously approved comments for the comments to appear"
1577
  msgstr ""
1578
 
1579
+ #: defaults.php:403
1580
  msgid "Changed the number of links that a comment must have to be held in the queue"
1581
  msgstr ""
1582
 
1583
+ #: defaults.php:403
1584
  msgid "Changed the minimum number of links a comment must have to be held in the queue %LineBreak% Previous value: %OldValue% %LineBreak% New value: %NewValue%"
1585
  msgstr ""
1586
 
1587
+ #: defaults.php:404
1588
  msgid "Modified the list of keywords for comments moderation"
1589
  msgstr ""
1590
 
1591
+ #: defaults.php:404
1592
  msgid "Modified the list of keywords for comments medoration"
1593
  msgstr ""
1594
 
1595
+ #: defaults.php:405, defaults.php:405
1596
  msgid "Modified the list of keywords for comments blacklisting"
1597
  msgstr ""
1598
 
1599
+ #: defaults.php:406
1600
  msgid "Option WordPress Address (URL) in WordPress settings changed"
1601
  msgstr ""
1602
 
1603
+ #: defaults.php:406
1604
  msgid "Changed the WordPress address (URL) %LineBreak% Previous URL: %old_url% %LineBreak% New URL: %new_url%"
1605
  msgstr ""
1606
 
1607
+ #: defaults.php:407
1608
  msgid "Option Site Address (URL) in WordPress settings changed"
1609
  msgstr ""
1610
 
1611
+ #: defaults.php:407
1612
  msgid "Changed the site address (URL) %LineBreak% Previous URL: %old_url% %LineBreak% New URL: %new_url%"
1613
  msgstr ""
1614
 
1615
+ #: defaults.php:413
1616
  msgid "New site added on the network"
1617
  msgstr ""
1618
 
1619
+ #: defaults.php:413
1620
  msgid "New site on the network: %SiteName% %LineBreak% URL: %BlogURL%"
1621
  msgstr ""
1622
 
1623
+ #: defaults.php:414
1624
  msgid "Existing site archived"
1625
  msgstr ""
1626
 
1627
+ #: defaults.php:414
1628
  msgid "Archived the site: %SiteName% %LineBreak% URL: %BlogURL%"
1629
  msgstr ""
1630
 
1631
+ #: defaults.php:415
1632
  msgid "Archived site has been unarchived"
1633
  msgstr ""
1634
 
1635
+ #: defaults.php:415
1636
  msgid "Unarchived the site: %SiteName% %LineBreak% URL: %BlogURL%"
1637
  msgstr ""
1638
 
1639
+ #: defaults.php:416
1640
  msgid "Deactivated site has been activated"
1641
  msgstr ""
1642
 
1643
+ #: defaults.php:416
1644
  msgid "Activated the site: %SiteName% %LineBreak% URL: %BlogURL%"
1645
  msgstr ""
1646
 
1647
+ #: defaults.php:417
1648
  msgid "Site has been deactivated"
1649
  msgstr ""
1650
 
1651
+ #: defaults.php:417
1652
  msgid "Deactivated the site: %SiteName% %LineBreak% URL: %BlogURL%"
1653
  msgstr ""
1654
 
1655
+ #: defaults.php:418
1656
  msgid "Existing site deleted from network"
1657
  msgstr ""
1658
 
1659
+ #: defaults.php:418
1660
  msgid "The site: %SiteName% %LineBreak% URL: %BlogURL%"
1661
  msgstr ""
1662
 
1663
+ #: defaults.php:419
1664
+ msgid "Allow new registrations settings changed"
1665
+ msgstr ""
1666
+
1667
+ #: defaults.php:419
1668
+ msgid "Changed the <strong>Allow new registrations</strong> settings %LineBreak% Previous setting: %previous_setting% %LineBreak% New setting: %new_setting%"
1669
+ msgstr ""
1670
+
1671
+ #: defaults.php:430
1672
  msgid "Dummy"
1673
  msgstr ""
1674
 
1675
  #. translators: Username
1676
  #. translators: Username
1677
+ #: wp-security-audit-log.php:903, wp-security-audit-log.php:930
1678
  msgid "Hey %1$s"
1679
  msgstr ""
1680
 
1681
+ #: wp-security-audit-log.php:904
1682
  msgid "Never miss an important update! Opt-in to our security and feature updates notifications, and non-sensitive diagnostic tracking with freemius.com."
1683
  msgstr ""
1684
 
1685
+ #: wp-security-audit-log.php:905, wp-security-audit-log.php:933
1686
  msgid "Note: "
1687
  msgstr ""
1688
 
1689
+ #: wp-security-audit-log.php:906, wp-security-audit-log.php:934
1690
  msgid "NO ACTIVITY LOG ACTIVITY & DATA IS SENT BACK TO OUR SERVERS."
1691
  msgstr ""
1692
 
1693
  #. translators: 1: Plugin name. 2: Freemius link.
1694
+ #: wp-security-audit-log.php:932
1695
  msgid "Please help us improve %2$s! If you opt-in, some non-sensitive data about your usage of %2$s will be sent to %5$s, a diagnostic tracking service we use. If you skip this, that's okay! %2$s will still work just fine."
1696
  msgstr ""
1697
 
1698
  #. translators: Plugin name
1699
+ #: wp-security-audit-log.php:954
1700
  msgid "Get a free 7-day trial of the premium edition of %s. No credit card required, no commitments!"
1701
  msgstr ""
1702
 
1703
+ #: wp-security-audit-log.php:955, classes/AlertManager.php:1145, extensions/external-db/classes/Connections.php:173
1704
  msgid "WP Activity Log"
1705
  msgstr ""
1706
 
1707
+ #: wp-security-audit-log.php:959
1708
  msgid "Start free trial"
1709
  msgstr ""
1710
 
1711
+ #: wp-security-audit-log.php:1027
1712
  msgid "You need to activate the licence key to use WP Activity Log Premium. %2$s"
1713
  msgstr ""
1714
 
1715
+ #: wp-security-audit-log.php:1028
1716
  msgid "Activate the licence key now"
1717
  msgstr ""
1718
 
1719
  #. translators: Number of sites
1720
+ #: wp-security-audit-log.php:1045
1721
  msgid "The license is limited to %s sub-sites. You need to upgrade your license to cover all the sub-sites on this network."
1722
  msgstr ""
1723
 
1724
+ #: wp-security-audit-log.php:1155
1725
  msgid "Error: You do not have sufficient permissions to disable this custom field."
1726
  msgstr ""
1727
 
1728
+ #: wp-security-audit-log.php:1190
1729
+ msgid "Custom Field <strong>%1$s</strong> is no longer being monitored.<br />Enable the monitoring of this custom field again from the"
1730
  msgstr ""
1731
 
1732
+ #: wp-security-audit-log.php:1193
1733
  msgid "Excluded Objects"
1734
  msgstr ""
1735
 
1736
+ #: wp-security-audit-log.php:1194
1737
  msgid " tab in the plugin settings"
1738
  msgstr ""
1739
 
1741
  msgid "Error: You do not have sufficient permissions to disable this alert."
1742
  msgstr ""
1743
 
1744
+ #: wp-security-audit-log.php:1231
1745
  msgid "Alert %1$s is no longer being monitored.<br /> %2$s"
1746
  msgstr ""
1747
 
1748
+ #: wp-security-audit-log.php:1231
1749
  msgid "You can enable this alert again from the Enable/Disable Alerts node in the plugin menu."
1750
  msgstr ""
1751
 
1752
+ #: wp-security-audit-log.php:1256, classes/Views/SetupWizard.php:270
1753
  msgid "Installing, please wait"
1754
  msgstr ""
1755
 
1756
+ #: wp-security-audit-log.php:1257, classes/Views/SetupWizard.php:271
1757
  msgid "Already installed"
1758
  msgstr ""
1759
 
1760
+ #: wp-security-audit-log.php:1258, classes/Utilities/PluginInstallAndActivate.php:107, classes/Views/SetupWizard.php:272, classes/Views/SetupWizard.php:836
1761
  msgid "Extension installed"
1762
  msgstr ""
1763
 
1764
+ #: wp-security-audit-log.php:1259, classes/Views/SetupWizard.php:273
1765
  msgid "Extension activated"
1766
  msgstr ""
1767
 
1768
+ #: wp-security-audit-log.php:1260, classes/Views/SetupWizard.php:274
1769
  msgid "Install failed"
1770
  msgstr ""
1771
 
1772
  #. translators: %s: PHP Version
1773
+ #: wp-security-audit-log.php:1311
1774
  msgid "You are using a version of PHP that is older than %s, which is no longer supported."
1775
  msgstr ""
1776
 
1777
+ #: wp-security-audit-log.php:1313
1778
  msgid "Contact us on <a href=\"mailto:plugins@wpwhitesecurity.com\">plugins@wpwhitesecurity.com</a> to help you switch the version of PHP you are using."
1779
  msgstr ""
1780
 
1781
  #. translators: %s: Activity Log for MainWP plugin hyperlink
1782
+ #: wp-security-audit-log.php:1318
1783
  msgid "Please install the %s plugin on the MainWP dashboard."
1784
  msgstr ""
1785
 
1786
+ #: wp-security-audit-log.php:1318
1787
  msgid "Activity Log for MainWP"
1788
  msgstr ""
1789
 
1790
  #. translators: %s: Getting started guide hyperlink
1791
+ #: wp-security-audit-log.php:1320
1792
  msgid "The WP Activity Log should be installed on the child sites only. Refer to the %s for more information."
1793
  msgstr ""
1794
 
1795
+ #: wp-security-audit-log.php:1320
1796
  msgid "getting started guide"
1797
  msgstr ""
1798
 
1799
+ #: wp-security-audit-log.php:1386
1800
  msgid "This plugin uses 3 tables in the WordPress database to store the activity log and settings. It seems that these tables were not created."
1801
  msgstr ""
1802
 
1803
+ #: wp-security-audit-log.php:1388
1804
  msgid "This could happen because the database user does not have the right privileges to create the tables in the database. We recommend you to update the privileges and try enabling the plugin again."
1805
  msgstr ""
1806
 
1807
  #. translators: %s: Support Hyperlink
1808
+ #: wp-security-audit-log.php:1390
1809
  msgid "If after doing so you still have issues, please send us an email on %s for assistance."
1810
  msgstr ""
1811
 
1812
+ #: wp-security-audit-log.php:1390
1813
  msgid "support@wpsecurityauditlog.com"
1814
  msgstr ""
1815
 
1816
+ #: wp-security-audit-log.php:1902
1817
  msgid "For security and auditing purposes, a record of all of your logged-in actions and changes within the WordPress dashboard will be recorded in an activity log with the <a href=\"https://wpactivitylog.com/\" target=\"_blank\">WP Activity Log plugin</a>. The audit log also includes the IP address where you accessed this site from."
1818
  msgstr ""
1819
 
1820
+ #: wp-security-audit-log.php:1921
1821
  msgid "Every 6 hours"
1822
  msgstr ""
1823
 
1824
+ #: wp-security-audit-log.php:1925
1825
  msgid "Every 45 minutes"
1826
  msgstr ""
1827
 
1828
+ #: wp-security-audit-log.php:1929
1829
  msgid "Every 30 minutes"
1830
  msgstr ""
1831
 
1832
+ #: wp-security-audit-log.php:1933
1833
  msgid "Every 15 minutes"
1834
  msgstr ""
1835
 
1836
+ #: wp-security-audit-log.php:1937
1837
  msgid "Every 10 minutes"
1838
  msgstr ""
1839
 
1840
+ #: wp-security-audit-log.php:1941
1841
  msgid "Every 1 minute"
1842
  msgstr ""
1843
 
1844
  #. translators: 1. Deprecated method name 2. Version since deprecated
1845
+ #: wp-security-audit-log.php:1955
1846
  msgid "Method %1$s is deprecated since version %2$s!"
1847
  msgstr ""
1848
 
1849
  #. translators: Event ID
1850
+ #: classes/AlertManager.php:374
1851
  msgid "Event with code %d has not be registered."
1852
  msgstr ""
1853
 
1854
  #. translators: Event ID
1855
+ #: classes/AlertManager.php:436
1856
  msgid "Event %s already registered with WP Activity Log."
1857
  msgstr ""
1858
 
1859
+ #: classes/AlertManager.php:511
1860
  msgid "You have custom events that are using the same ID or IDs which are already registered in the plugin, so they have been disabled."
1861
  msgstr ""
1862
 
1863
  #. translators: 1.CSS classes, 2. Notice, 3. Contact us link
1864
+ #: classes/AlertManager.php:514
1865
  msgid "%4$s to help you solve this issue."
1866
  msgstr ""
1867
 
1868
+ #: classes/AlertManager.php:516
1869
  msgid "ERROR:"
1870
  msgstr ""
1871
 
1872
+ #: classes/AlertManager.php:518
1873
  msgid "Contact us"
1874
  msgstr ""
1875
 
1876
+ #: classes/AlertManager.php:1126, classes/AuditLogListView.php:324, classes/AuditLogListView.php:358, classes/WidgetManager.php:76, classes/Views/Settings.php:1090, extensions/search/classes/Filters/UserNameFilter.php:44, extensions/user-sessions/classes/View/Sessions.php:172
1877
  msgid "User"
1878
  msgstr ""
1879
 
1880
+ #: classes/AlertManager.php:1127, classes/AlertManager.php:1909, classes/AuditLogGridView.php:511, classes/AuditLogListView.php:533, extensions/email-notifications/classes/DailyNotification.php:241, extensions/email-notifications/classes/Notifier.php:627, extensions/reports/classes/Common.php:666
1881
  msgid "System"
1882
  msgstr ""
1883
 
1884
+ #: classes/AlertManager.php:1128, classes/AuditLogGridView.php:502, classes/AuditLogListView.php:521
1885
  msgid "Plugin"
1886
  msgstr ""
1887
 
1888
+ #: classes/AlertManager.php:1129
1889
  msgid "Database"
1890
  msgstr ""
1891
 
1892
+ #: classes/AlertManager.php:1130
1893
  msgid "Post"
1894
  msgstr ""
1895
 
1896
+ #: classes/AlertManager.php:1131, classes/AlertManager.php:1135
1897
  msgid "File"
1898
  msgstr ""
1899
 
1900
+ #: classes/AlertManager.php:1132
1901
  msgid "Tag"
1902
  msgstr ""
1903
 
1904
+ #: classes/AlertManager.php:1133
1905
  msgid "Comment"
1906
  msgstr ""
1907
 
1908
+ #: classes/AlertManager.php:1134
1909
  msgid "Setting"
1910
  msgstr ""
1911
 
1912
+ #: classes/AlertManager.php:1136
1913
  msgid "System Setting"
1914
  msgstr ""
1915
 
1916
+ #: classes/AlertManager.php:1137
1917
  msgid "MainWP Network"
1918
  msgstr ""
1919
 
1920
+ #: classes/AlertManager.php:1138
1921
  msgid "MainWP"
1922
  msgstr ""
1923
 
1924
+ #: classes/AlertManager.php:1139
1925
  msgid "Category"
1926
  msgstr ""
1927
 
1928
+ #: classes/AlertManager.php:1140
1929
  msgid "Custom Field"
1930
  msgstr ""
1931
 
1932
+ #: classes/AlertManager.php:1141
1933
  msgid "Widget"
1934
  msgstr ""
1935
 
1936
+ #: classes/AlertManager.php:1142
1937
  msgid "Menu"
1938
  msgstr ""
1939
 
1940
+ #: classes/AlertManager.php:1143
1941
  msgid "Theme"
1942
  msgstr ""
1943
 
1944
+ #: classes/AlertManager.php:1144
1945
  msgid "Activity log"
1946
  msgstr ""
1947
 
1948
+ #: classes/AlertManager.php:1146
1949
  msgid "Multisite Network"
1950
  msgstr ""
1951
 
1952
+ #: classes/AlertManager.php:1147, extensions/email-notifications/classes/Common.php:1146, extensions/search/classes/Filters/IpFilter.php:87, extensions/user-sessions/classes/View/Sessions.php:352
1953
  msgid "IP Address"
1954
  msgstr ""
1955
 
1956
+ #: classes/AlertManager.php:1163
1957
  msgid "unknown object"
1958
  msgstr ""
1959
 
1960
+ #: classes/AlertManager.php:1200
1961
  msgid "Login"
1962
  msgstr ""
1963
 
1964
+ #: classes/AlertManager.php:1201
1965
  msgid "Logout"
1966
  msgstr ""
1967
 
1968
+ #: classes/AlertManager.php:1202
1969
  msgid "Installed"
1970
  msgstr ""
1971
 
1972
+ #: classes/AlertManager.php:1203
1973
  msgid "Activated"
1974
  msgstr ""
1975
 
1976
+ #: classes/AlertManager.php:1204
1977
  msgid "Deactivated"
1978
  msgstr ""
1979
 
1980
+ #: classes/AlertManager.php:1205
1981
  msgid "Uninstalled"
1982
  msgstr ""
1983
 
1984
+ #: classes/AlertManager.php:1206
1985
  msgid "Updated"
1986
  msgstr ""
1987
 
1988
+ #: classes/AlertManager.php:1207, extensions/user-sessions/classes/View/Sessions.php:179
1989
  msgid "Created"
1990
  msgstr ""
1991
 
1992
+ #: classes/AlertManager.php:1208
1993
  msgid "Modified"
1994
  msgstr ""
1995
 
1996
+ #: classes/AlertManager.php:1209, extensions/search/search-init.php:343
1997
  msgid "Deleted"
1998
  msgstr ""
1999
 
2000
+ #: classes/AlertManager.php:1210
2001
  msgid "Published"
2002
  msgstr ""
2003
 
2004
+ #: classes/AlertManager.php:1211
2005
  msgid "Approved"
2006
  msgstr ""
2007
 
2008
+ #: classes/AlertManager.php:1212
2009
  msgid "Unapproved"
2010
  msgstr ""
2011
 
2012
+ #: classes/AlertManager.php:1213
2013
  msgid "Enabled"
2014
  msgstr ""
2015
 
2016
+ #: classes/AlertManager.php:1214, extensions/email-notifications/classes/Notifications.php:1812
2017
  msgid "Disabled"
2018
  msgstr ""
2019
 
2020
+ #: classes/AlertManager.php:1215
2021
  msgid "Added"
2022
  msgstr ""
2023
 
2024
+ #: classes/AlertManager.php:1216
2025
  msgid "Failed Login"
2026
  msgstr ""
2027
 
2028
+ #: classes/AlertManager.php:1217
2029
  msgid "Blocked"
2030
  msgstr ""
2031
 
2032
+ #: classes/AlertManager.php:1218
2033
  msgid "Uploaded"
2034
  msgstr ""
2035
 
2036
+ #: classes/AlertManager.php:1219
2037
  msgid "Restored"
2038
  msgstr ""
2039
 
2040
+ #: classes/AlertManager.php:1220
2041
  msgid "Opened"
2042
  msgstr ""
2043
 
2044
+ #: classes/AlertManager.php:1221
2045
  msgid "Viewed"
2046
  msgstr ""
2047
 
2048
+ #: classes/AlertManager.php:1222
2049
  msgid "Started"
2050
  msgstr ""
2051
 
2052
+ #: classes/AlertManager.php:1223
2053
  msgid "Stopped"
2054
  msgstr ""
2055
 
2056
+ #: classes/AlertManager.php:1224
2057
  msgid "Removed"
2058
  msgstr ""
2059
 
2060
+ #: classes/AlertManager.php:1225
2061
  msgid "Unblocked"
2062
  msgstr ""
2063
 
2064
+ #: classes/AlertManager.php:1226
2065
  msgid "Renamed"
2066
  msgstr ""
2067
 
2068
+ #: classes/AlertManager.php:1227
2069
  msgid "Duplicated"
2070
  msgstr ""
2071
 
2072
+ #: classes/AlertManager.php:1244
2073
  msgid "unknown type"
2074
  msgstr ""
2075
 
2076
+ #: classes/AlertManager.php:1868, classes/ConstantManager.php:146, extensions/external-db/classes/Common.php:661, extensions/external-db/classes/Common.php:902
2077
  msgid "Unknown error code."
2078
  msgstr ""
2079
 
2080
+ #: classes/AlertManager.php:1887, classes/AlertManager.php:1875, extensions/reports/classes/Common.php:646, extensions/reports/classes/Common.php:636
2081
  msgid "Unknown Site"
2082
  msgstr ""
2083
 
2105
  msgid "— End of Activity Log —"
2106
  msgstr ""
2107
 
2108
+ #: classes/AuditLogGridView.php:229, classes/AuditLogListView.php:235, classes/Views/AuditLog.php:624, extensions/reports/inc/wsal-reporting-view.inc.php:601
2109
  msgid "All Sites"
2110
  msgstr ""
2111
 
2117
  msgid "Archive Database"
2118
  msgstr ""
2119
 
2120
+ #: classes/AuditLogGridView.php:314, classes/AuditLogGridView.php:338, classes/AuditLogListView.php:321, classes/AuditLogListView.php:349
2121
  msgid "ID"
2122
  msgstr ""
2123
 
2124
+ #: classes/AuditLogGridView.php:315, classes/AuditLogGridView.php:341, classes/AuditLogListView.php:322, classes/AuditLogListView.php:352, classes/Views/Settings.php:1086, classes/Views/ToggleAlerts.php:299, extensions/search/classes/Filters/CodeFilter.php:38, extensions/search/classes/Filters/CodeFilter.php:64
2125
  msgid "Severity"
2126
  msgstr ""
2127
 
2129
  msgid "Info"
2130
  msgstr ""
2131
 
2132
+ #: classes/AuditLogGridView.php:321, classes/AuditLogListView.php:332, classes/AuditLogListView.php:364, extensions/email-notifications/classes/Common.php:1144, extensions/email-notifications/classes/Common.php:1203, extensions/search/classes/Filters/SiteFilter.php:29
2133
  msgid "Site"
2134
  msgstr ""
2135
 
2136
+ #: classes/AuditLogGridView.php:324, classes/AuditLogGridView.php:347, classes/AuditLogListView.php:335, classes/AuditLogListView.php:373, extensions/email-notifications/classes/Common.php:1177
2137
  msgid "Message"
2138
  msgstr ""
2139
 
2141
  msgid "Grid"
2142
  msgstr ""
2143
 
2144
+ #: classes/AuditLogGridView.php:415, classes/AuditLogListView.php:456
2145
  msgid "Disable this type of events."
2146
  msgstr ""
2147
 
2148
+ #: classes/AuditLogGridView.php:453, classes/AuditLogGridView.php:460, classes/AuditLogGridView.php:499, classes/AuditLogListView.php:476, classes/AuditLogListView.php:517
2149
  msgid "Unknown"
2150
  msgstr ""
2151
 
2152
+ #: classes/AuditLogGridView.php:508, classes/AuditLogListView.php:529
2153
  msgid "Unregistered user"
2154
  msgstr ""
2155
 
2156
+ #: classes/AuditLogGridView.php:505, classes/AuditLogListView.php:525
2157
  msgid "Plugins"
2158
  msgstr ""
2159
 
2160
+ #: classes/AuditLogGridView.php:484, classes/AuditLogListView.php:502
2161
  msgid "Show me all activity by this User"
2162
  msgstr ""
2163
 
2164
+ #: classes/AuditLogGridView.php:545, classes/AuditLogGridView.php:558, classes/AuditLogListView.php:565, classes/AuditLogListView.php:578
2165
  msgid "Show me all activity originating from this IP Address"
2166
  msgstr ""
2167
 
2168
+ #: classes/AuditLogGridView.php:615, classes/AuditLogListView.php:607
2169
  msgid "View all details of this change"
2170
  msgstr ""
2171
 
2172
+ #: classes/AuditLogGridView.php:616, classes/AuditLogGridView.php:755, classes/AuditLogListView.php:608, classes/AuditLogListView.php:751
2173
  msgid "Alert Data Inspector"
2174
  msgstr ""
2175
 
2176
+ #: classes/AuditLogGridView.php:727, classes/AuditLogGridView.php:727, classes/AuditLogListView.php:723, classes/AuditLogListView.php:723, classes/Settings.php:1760, classes/Settings.php:1760
 
 
 
 
2177
  msgid "Download the log file."
2178
  msgstr ""
2179
 
2180
+ #: classes/AuditLogGridView.php:735, classes/AuditLogListView.php:731, classes/Settings.php:1773, classes/Settings.php:2013, extensions/email-notifications/classes/Notifier.php:788
2181
  msgid "published"
2182
  msgstr ""
2183
 
2187
  #. translators: Mailto link for support.
2188
  #. translators: Mailto link for support.
2189
  #. translators: Mailto link for support.
2190
+ #: classes/AuditLogGridView.php:763, classes/AuditLogListView.php:759, classes/Settings.php:1799, classes/Settings.php:2039, extensions/email-notifications/classes/Notifier.php:814, extensions/reports/classes/Common.php:541
2191
  msgid "Contact us on %s for assistance"
2192
  msgstr ""
2193
 
2194
+ #: classes/AuditLogListView.php:323, classes/AuditLogListView.php:355, extensions/search/classes/Filters/DateFilter.php:27
2195
  msgid "Date"
2196
  msgstr ""
2197
 
2198
+ #: classes/AuditLogListView.php:325, classes/AuditLogListView.php:361, extensions/search/classes/Filters/IpFilter.php:45
2199
  msgid "IP"
2200
  msgstr ""
2201
 
2202
+ #: classes/AuditLogListView.php:326, classes/AuditLogListView.php:367, extensions/email-notifications/classes/Common.php:1117, extensions/search/classes/Filters/ObjectFilter.php:29, extensions/search/classes/Filters/ObjectFilter.php:53
2203
  msgid "Object"
2204
  msgstr ""
2205
 
2206
+ #: classes/AuditLogListView.php:327, classes/AuditLogListView.php:370, extensions/email-notifications/classes/Common.php:1118, extensions/search/classes/Filters/EventTypeFilter.php:29, extensions/search/classes/Filters/EventTypeFilter.php:53
2207
  msgid "Event Type"
2208
  msgstr ""
2209
 
2210
+ #: classes/AuditLogListView.php:435
2211
  msgid "Click to toggle."
2212
  msgstr ""
2213
 
2214
+ #: classes/AuditLogListView.php:440, classes/Models/Occurrence.php:83
2215
  msgid "Alert message not found."
2216
  msgstr ""
2217
 
2218
+ #: classes/AuditLogListView.php:441, classes/Models/Occurrence.php:84
2219
  msgid "Alert description not found."
2220
  msgstr ""
2221
 
2222
+ #: classes/ConstantManager.php:166, classes/Views/ToggleAlerts.php:441
2223
  msgid "Informational"
2224
  msgstr ""
2225
 
2226
+ #: classes/ConstantManager.php:164, classes/Views/ToggleAlerts.php:439, extensions/search/classes/Filters/CodeFilter.php:70
2227
  msgid "Low"
2228
  msgstr ""
2229
 
2230
+ #: classes/ConstantManager.php:162, classes/Views/ToggleAlerts.php:437, extensions/search/classes/Filters/CodeFilter.php:69
2231
  msgid "Medium"
2232
  msgstr ""
2233
 
2234
+ #: classes/ConstantManager.php:160, classes/Views/ToggleAlerts.php:435, extensions/search/classes/Filters/CodeFilter.php:68
2235
  msgid "High"
2236
  msgstr ""
2237
 
2238
+ #: classes/ConstantManager.php:158, classes/ConstantManager.php:152, classes/Views/ToggleAlerts.php:433, classes/Views/ToggleAlerts.php:427, extensions/search/classes/Filters/CodeFilter.php:67
2239
  msgid "Critical"
2240
  msgstr ""
2241
 
2242
+ #: classes/ConstantManager.php:156, classes/Views/ToggleAlerts.php:443, classes/Views/ToggleAlerts.php:431
2243
  msgid "Notification"
2244
  msgstr ""
2245
 
2246
+ #: classes/ConstantManager.php:154, classes/Views/ToggleAlerts.php:429
2247
  msgid "Warning"
2248
  msgstr ""
2249
 
2250
+ #: classes/Settings.php:583
2251
  msgid "This function is deprecated"
2252
  msgstr ""
2253
 
2254
+ #: classes/Settings.php:1694, extensions/email-notifications/classes/Notifier.php:736, extensions/reports/classes/Common.php:482
2255
  msgid "View the content changes"
2256
  msgstr ""
2257
 
2258
+ #: classes/Settings.php:1699, extensions/email-notifications/classes/Notifier.php:741, extensions/email-notifications/classes/Notifier.php:747, extensions/reports/classes/Common.php:487, extensions/reports/classes/Common.php:493
2259
  msgid "View post in the editor"
2260
  msgstr ""
2261
 
2262
+ #: classes/Settings.php:1702, extensions/email-notifications/classes/Notifier.php:744, extensions/reports/classes/Common.php:490
2263
  msgid "View Order"
2264
  msgstr ""
2265
 
2266
+ #: classes/Settings.php:1707, extensions/email-notifications/classes/Notifier.php:750, extensions/reports/classes/Common.php:496
2267
  msgid "View category"
2268
  msgstr ""
2269
 
2270
+ #: classes/Settings.php:1710, extensions/email-notifications/classes/Notifier.php:753, extensions/reports/classes/Common.php:499
2271
  msgid "View tag"
2272
  msgstr ""
2273
 
2274
+ #: classes/Settings.php:1714, extensions/email-notifications/classes/Notifier.php:763, extensions/reports/classes/Common.php:509
2275
  msgid "User profile page"
2276
  msgstr ""
2277
 
2278
+ #: classes/Settings.php:1811, extensions/reports/classes/Common.php:553
2279
  msgid "Increase maximum file size limit"
2280
  msgstr ""
2281
 
2282
+ #: classes/Settings.php:1814, extensions/reports/classes/Common.php:556
2283
  msgid "Contact Support"
2284
  msgstr ""
2285
 
2286
+ #: classes/Settings.php:2051, extensions/email-notifications/classes/Notifier.php:825, extensions/email-notifications/classes/Notifier.php:953
2287
  msgid "plugin settings"
2288
  msgstr ""
2289
 
2290
+ #: classes/Settings.php:2054, extensions/email-notifications/classes/Notifier.php:828, extensions/email-notifications/classes/Notifier.php:958
2291
  msgid "contact our support"
2292
  msgstr ""
2293
 
2294
+ #: classes/Settings.php:2225
2295
  msgid "Root directory of WordPress (excluding sub directories)"
2296
  msgstr ""
2297
 
2298
+ #: classes/Settings.php:2226
2299
  msgid "WP Admin directory (/wp-admin/)"
2300
  msgstr ""
2301
 
2302
+ #: classes/Settings.php:2227
2303
  msgid "WP Includes directory (/wp-includes/)"
2304
  msgstr ""
2305
 
2306
+ #: classes/Settings.php:2228
2307
  msgid "/wp-content/ directory (excluding plugins, themes & uploads directories)"
2308
  msgstr ""
2309
 
2310
+ #: classes/Settings.php:2229
2311
  msgid "Themes directory (/wp-content/themes/)"
2312
  msgstr ""
2313
 
2314
+ #: classes/Settings.php:2230
2315
  msgid "Plugins directory (/wp-content/plugins/)"
2316
  msgstr ""
2317
 
2318
+ #: classes/Settings.php:2231
2319
  msgid "Uploads directory (/wp-content/uploads/)"
2320
  msgstr ""
2321
 
2322
+ #: classes/Settings.php:2236
2323
  msgid "Uploads directory of all sub sites on this network (/wp-content/sites/*)"
2324
  msgstr ""
2325
 
2335
  msgid "Latest Events"
2336
  msgstr ""
2337
 
2338
+ #: classes/WidgetManager.php:77, classes/Views/ToggleAlerts.php:300
2339
  msgid "Description"
2340
  msgstr ""
2341
 
2351
  msgid "Mirroring"
2352
  msgstr ""
2353
 
2354
+ #: extensions/class-wsal-extension-manager.php:374, extensions/external-db/classes/Settings.php:115, extensions/external-db/classes/Settings.php:828
2355
  msgid "Archiving"
2356
  msgstr ""
2357
 
2360
  msgid "Code %1$d: %2$s"
2361
  msgstr ""
2362
 
 
 
 
 
 
 
 
 
2363
  #: classes/Models/Occurrence.php:200
2364
  msgid "WFCM"
2365
  msgstr ""
2366
 
2367
  #. translators: 1: html that opens a link, 2: html that closes a link.
2368
+ #: classes/Models/Occurrence.php:225
2369
+ msgid "This type of activity / change is no longer monitored. You can create your own custom event IDs to keep a log of such change. Read more about custom events %1$shere%2$s."
2370
  msgstr ""
2371
 
2372
+ #: classes/Sensors/Content.php:1039, classes/Sensors/Content.php:1047
2373
  msgid "Public"
2374
  msgstr ""
2375
 
2376
+ #: classes/Sensors/Content.php:1037, classes/Sensors/Content.php:1045
2377
  msgid "Private"
2378
  msgstr ""
2379
 
2380
+ #: classes/Sensors/Content.php:1035, classes/Sensors/Content.php:1043
2381
  msgid "Password Protected"
2382
  msgstr ""
2383
 
2384
+ #: classes/Sensors/Content.php:1210
2385
+ msgid "no tags"
 
 
 
 
 
 
 
 
2386
  msgstr ""
2387
 
2388
  #: classes/ThirdPartyExtensions/BBPressExtension.php:29
2427
  msgid "WP Activity Log can keep a log of changes done on other plugins. Install the relevant extension from the below list to keep a log of changes done on that plugin."
2428
  msgstr ""
2429
 
2430
+ #: classes/Utilities/PluginInstallAndActivate.php:100, classes/Views/SetupWizard.php:829
2431
  msgid "Extension for "
2432
  msgstr ""
2433
 
2434
+ #: classes/Utilities/PluginInstallAndActivate.php:109, classes/Views/SetupWizard.php:838
2435
  msgid "Install Extension"
2436
  msgstr ""
2437
 
2438
+ #: classes/Utilities/PluginInstallAndActivate.php:105, classes/Views/SetupWizard.php:834
2439
  msgid "Extension installed, activate now?"
2440
  msgstr ""
2441
 
2442
+ #: classes/Utilities/PluginInstallerAction.php:82
2443
  msgid "Tried to install a zip or slug that was not in the allowed list"
2444
  msgstr ""
2445
 
2446
+ #: classes/Views/AuditLog.php:98
2447
  msgid "Get instantly alerted of critical changes via SMS & email, search the activity log, generate user reports, see who is logged in and more!"
2448
  msgstr ""
2449
 
2450
+ #: classes/Views/AuditLog.php:99
2451
  msgid "Upgrade to premium to unlock these powerful activity log features & more!"
2452
  msgstr ""
2453
 
2454
+ #: classes/Views/AuditLog.php:102
2455
  msgid "Instant SMS & email alerts, search & filters, reports, users sessions management and much more!"
2456
  msgstr ""
2457
 
2458
+ #: classes/Views/AuditLog.php:103
2459
  msgid "Upgrade to premium to get more out of your activity logs!"
2460
  msgstr ""
2461
 
2462
+ #: classes/Views/AuditLog.php:106
2463
  msgid "See who logged in on your site in real-time, generate reports, get SMS & email alerts of critical changes and more!"
2464
  msgstr ""
2465
 
2466
+ #: classes/Views/AuditLog.php:107
2467
  msgid "Unlock these and other powerful features with WP Activity Log Premium."
2468
  msgstr ""
2469
 
2470
+ #: classes/Views/AuditLog.php:185
2471
  msgid "UPGRADE NOW"
2472
  msgstr ""
2473
 
2474
+ #: classes/Views/AuditLog.php:186
2475
  msgid "Start Free Trial"
2476
  msgstr ""
2477
 
2478
+ #: classes/Views/AuditLog.php:187
2479
  msgid "Tell me more"
2480
  msgstr ""
2481
 
2482
+ #: classes/Views/AuditLog.php:189
2483
  msgid "Dismiss the banner"
2484
  msgstr ""
2485
 
2486
+ #: classes/Views/AuditLog.php:189
2487
  msgid "Close"
2488
  msgstr ""
2489
 
2490
+ #: classes/Views/AuditLog.php:214
2491
  msgid "There are connectivity issues with the database where the WordPress activity log is stored. The logs will be temporary buffered in the WordPress database until the connection is fully restored."
2492
  msgstr ""
2493
 
2494
+ #: classes/Views/AuditLog.php:232
2495
  msgid "Help WP Activity Log improve."
2496
  msgstr ""
2497
 
2498
+ #: classes/Views/AuditLog.php:233
2499
  msgid "Gathering non-sensitive diagnostic data about the plugin install helps us improve the plugin. When you opt-in, you also subscribe to our announcements (you can opt-out at any time). If you would rather opt-out, we will not collect any data."
2500
  msgstr ""
2501
 
2502
+ #: classes/Views/AuditLog.php:233
2503
  msgid "Read more about what we collect."
2504
  msgstr ""
2505
 
2506
+ #: classes/Views/AuditLog.php:235
2507
  msgid "Sure, opt-in"
2508
  msgstr ""
2509
 
2510
+ #: classes/Views/AuditLog.php:236
2511
  msgid "No, thank you"
2512
  msgstr ""
2513
 
2514
+ #: classes/Views/AuditLog.php:289
2515
  msgid "We noticed you have"
2516
  msgstr ""
2517
 
2518
+ #: classes/Views/AuditLog.php:291
2519
  msgid "installed."
2520
  msgstr ""
2521
 
2522
+ #: classes/Views/AuditLog.php:293
2523
  msgid "Install extension"
2524
  msgstr ""
2525
 
2526
+ #: classes/Views/AuditLog.php:356, classes/Views/Settings.php:92
2527
  msgid "Activity Log Viewer"
2528
  msgstr ""
2529
 
2530
+ #: classes/Views/AuditLog.php:383
2531
  msgid "Log Viewer"
2532
  msgstr ""
2533
 
2534
+ #: classes/Views/AuditLog.php:540, classes/Views/Settings.php:326, classes/Views/ToggleAlerts.php:105, extensions/email-notifications/classes/AddNotification.php:246, extensions/email-notifications/classes/AddNotification.php:279, extensions/email-notifications/classes/EditNotification.php:250, extensions/email-notifications/classes/EditNotification.php:258, extensions/email-notifications/classes/EditNotification.php:254, extensions/email-notifications/classes/EditNotification.php:263, extensions/email-notifications/classes/EditNotification.php:291, extensions/external-db/classes/Settings.php:421
2535
  msgid "You do not have sufficient permissions to access this page."
2536
  msgstr ""
2537
 
2538
+ #: classes/Views/AuditLog.php:589
2539
  msgid "Thank you for installing WP Activity Log. Do you want to run the wizard to configure the basic plugin settings?"
2540
  msgstr ""
2541
 
2542
+ #: classes/Views/AuditLog.php:591, classes/Views/Settings.php:527, classes/Views/Settings.php:554, classes/Views/Settings.php:620, classes/Views/Settings.php:678, classes/Views/Settings.php:1122, classes/Views/Settings.php:1390, classes/Views/Settings.php:1449, classes/Views/Settings.php:1490, classes/Views/Settings.php:1521, classes/Views/SetupWizard.php:562
2543
  msgid "Yes"
2544
  msgstr ""
2545
 
2546
+ #: classes/Views/AuditLog.php:592, classes/Views/Settings.php:532, classes/Views/Settings.php:559, classes/Views/Settings.php:650, classes/Views/Settings.php:688, classes/Views/Settings.php:1127, classes/Views/Settings.php:1395, classes/Views/Settings.php:1456, classes/Views/Settings.php:1497, classes/Views/Settings.php:1522, classes/Views/SetupWizard.php:567
2547
  msgid "No"
2548
  msgstr ""
2549
 
2550
+ #: classes/Views/AuditLog.php:623
2551
  msgid "Please enter the number of alerts you would like to see on one page:"
2552
  msgstr ""
2553
 
2554
+ #: classes/Views/AuditLog.php:625
2555
  msgid "No Results"
2556
  msgstr ""
2557
 
2558
+ #: classes/Views/AuditLog.php:795, classes/Views/AuditLog.php:838, classes/Views/AuditLog.php:1108, classes/Views/AuditLog.php:1170, classes/Views/AuditLog.php:1223, classes/Views/Settings.php:235, classes/Views/Settings.php:1697, classes/Views/Settings.php:1725, classes/Views/Settings.php:1755, classes/Views/SetupWizard.php:96, extensions/search/search-init.php:452, extensions/search/search-init.php:500, extensions/email-notifications/classes/Notifications.php:492, extensions/external-db/classes/Connections.php:753, extensions/external-db/classes/Connections.php:787, extensions/external-db/classes/Connections.php:980, extensions/external-db/classes/Settings.php:312, extensions/external-db/classes/Settings.php:386, extensions/external-db/classes/Settings.php:1049, extensions/external-db/classes/Settings.php:1324, extensions/external-db/classes/Settings.php:1376, extensions/external-db/classes/Settings.php:1409, extensions/user-sessions/classes/Views.php:513, extensions/reports/classes/Views/Main.php:759
2559
  msgid "Nonce verification failed."
2560
  msgstr ""
2561
 
2562
+ #: classes/Views/AuditLog.php:813
2563
  msgid "No users found."
2564
  msgstr ""
2565
 
2566
+ #: classes/Views/AuditLog.php:885
 
 
 
 
 
 
 
 
2567
  msgid "Freemius opt choice not found."
2568
  msgstr ""
2569
 
2570
+ #: classes/Views/AuditLog.php:878
2571
  msgid "Freemius opt choice selected."
2572
  msgstr ""
2573
 
2574
  #. translators: 1 - an opening link tag, 2 - the closing tag.
2575
+ #: classes/Views/AuditLog.php:973
2576
  msgid "<br>An error occurred when trying to install and activate the plugin. Please try install it again from the %1$sevent settings%2$s page."
2577
  msgstr ""
2578
 
2579
+ #: classes/Views/AuditLog.php:1072
2580
  msgid "WordPress Activity Log"
2581
  msgstr ""
2582
 
2583
+ #: classes/Views/AuditLog.php:1073
2584
  msgid "When a user makes a change on your website the plugin will keep a record of that event here. Right now there is nothing because this is a new install."
2585
  msgstr ""
2586
 
2587
+ #: classes/Views/AuditLog.php:1074
2588
  msgid "Thank you for using WP Activity Log"
2589
  msgstr ""
2590
 
2591
+ #: classes/Views/AuditLog.php:1097, classes/Views/AuditLog.php:1207
 
 
 
 
2592
  msgid "You do not have sufficient permissions to dismiss this notice."
2593
  msgstr ""
2594
 
2595
+ #: classes/Views/AuditLog.php:1165
2596
  msgid "Access Denied"
2597
  msgstr ""
2598
 
2980
  msgid "Unknown settings tab."
2981
  msgstr ""
2982
 
2983
+ #: classes/Views/Settings.php:220, classes/Views/Settings.php:1785, classes/Views/Settings.php:1808, classes/Views/SetupWizard.php:83, extensions/email-notifications/classes/Notifications.php:117, extensions/external-db/classes/Connections.php:738, extensions/external-db/classes/Connections.php:772, extensions/external-db/classes/Connections.php:970, extensions/external-db/classes/Settings.php:282, extensions/external-db/classes/Settings.php:373, extensions/external-db/classes/Settings.php:1036, extensions/external-db/classes/Settings.php:1277, extensions/external-db/classes/Settings.php:1341, extensions/external-db/classes/Settings.php:1393
2984
  msgid "Access Denied."
2985
  msgstr ""
2986
 
2988
  msgid "Invalid input."
2989
  msgstr ""
2990
 
2991
+ #: classes/Views/Settings.php:342, classes/Views/ToggleAlerts.php:122, extensions/external-db/classes/Settings.php:432
2992
  msgid "Settings have been saved."
2993
  msgstr ""
2994
 
2996
  msgid "Message sent successfully."
2997
  msgstr ""
2998
 
2999
+ #: classes/Views/Settings.php:348, classes/Views/ToggleAlerts.php:128, extensions/external-db/classes/Settings.php:437, extensions/user-sessions/classes/View/Sessions.php:164
3000
  msgid "Error: "
3001
  msgstr ""
3002
 
3260
  msgid "<a href=\"https://wpactivitylog.com/pricing/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=settings+pages\" target=\"_blank\">Upgrade to Premium</a> to store the activity log data in an external database."
3261
  msgstr ""
3262
 
3263
+ #. translators: 1: Archive page link tag. 2: Link closing tag.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3264
  #: classes/Views/Settings.php:976
3265
  msgid "Retention settings moved to %1$s archiving settings %2$s because archiving is enabled"
3266
  msgstr ""
3267
 
3268
+ #: classes/Views/Settings.php:984
3269
  msgid "What timestamp you would like to see in the WordPress activity log?"
3270
  msgstr ""
3271
 
3272
+ #: classes/Views/Settings.php:985
3273
  msgid "Note that the WordPress' timezone might be different from that configured on the server so when you switch from UTC to WordPress timezone or vice versa you might notice a big difference."
3274
  msgstr ""
3275
 
3276
+ #: classes/Views/Settings.php:989
3277
  msgid "Events Timestamp"
3278
  msgstr ""
3279
 
3280
+ #: classes/Views/Settings.php:1009
3281
  msgid "UTC"
3282
  msgstr ""
3283
 
3284
+ #: classes/Views/Settings.php:1015
3285
  msgid "Timezone configured on this WordPress website"
3286
  msgstr ""
3287
 
3288
+ #: classes/Views/Settings.php:1022
3289
  msgid "Show Milliseconds"
3290
  msgstr ""
3291
 
3292
+ #: classes/Views/Settings.php:1029
3293
  msgid "Show Milliseconds in list view"
3294
  msgstr ""
3295
 
3296
+ #: classes/Views/Settings.php:1039
3297
  msgid "What user information should be displayed in the WordPress activity log?"
3298
  msgstr ""
3299
 
3300
+ #: classes/Views/Settings.php:1040
3301
  msgid "Usernames might not be the same as a user's first and last name so it can be difficult to recognize whose user was that did a change. When there is no first & last name or public display name configured the plugin will revert back to the WordPress username."
3302
  msgstr ""
3303
 
3304
+ #: classes/Views/Settings.php:1044
3305
  msgid "User information in Activity log"
3306
  msgstr ""
3307
 
3308
+ #: classes/Views/Settings.php:1050
3309
  msgid "WordPress username"
3310
  msgstr ""
3311
 
3312
+ #: classes/Views/Settings.php:1055
3313
  msgid "First name & last name"
3314
  msgstr ""
3315
 
3316
+ #: classes/Views/Settings.php:1060
3317
  msgid "Configured public display name"
3318
  msgstr ""
3319
 
3320
+ #: classes/Views/Settings.php:1070
3321
  msgid "Select the columns to be displayed in the WordPress activity log"
3322
  msgstr ""
3323
 
3324
+ #: classes/Views/Settings.php:1071
3325
  msgid "When you deselect a column it won’t be shown in the activity log viewer in both views. The data will still be recorded by the plugin."
3326
  msgstr ""
3327
 
3328
+ #: classes/Views/Settings.php:1075
3329
  msgid "Activity log columns selection"
3330
  msgstr ""
3331
 
3332
+ #: classes/Views/Settings.php:1094
3333
  msgid "Info (used in Grid view mode only)"
3334
  msgstr ""
3335
 
3336
+ #: classes/Views/Settings.php:1092
3337
  msgid "Source IP Address"
3338
  msgstr ""
3339
 
3340
+ #: classes/Views/Settings.php:1088
3341
  msgid "Date & Time"
3342
  msgstr ""
3343
 
3344
+ #: classes/Views/Settings.php:1084, extensions/email-notifications/classes/Common.php:1113, extensions/email-notifications/classes/Common.php:1147, extensions/email-notifications/classes/Common.php:1174, extensions/search/classes/Filters/AlertFilter.php:26, extensions/search/classes/Filters/AlertFilter.php:51
3345
  msgid "Event ID"
3346
  msgstr ""
3347
 
3348
+ #: classes/Views/Settings.php:1110
3349
  msgid "Do you want to keep a log of WordPress background activity?"
3350
  msgstr ""
3351
 
3352
+ #: classes/Views/Settings.php:1112
3353
  msgid "WordPress does a lot of things in the background that you do not necessarily need to know about, such as; deletion of post revisions, deletion of auto saved drafts etc. By default the plugin does not report them since there might be a lot and are irrelevant to the user."
3354
  msgstr ""
3355
 
3356
+ #: classes/Views/Settings.php:1117
3357
  msgid "Enable Events for WordPress Background Activity"
3358
  msgstr ""
3359
 
3360
+ #: classes/Views/Settings.php:1192
3361
  msgid "Configure how often file changes scan run and other settings from the"
3362
  msgstr ""
3363
 
3364
+ #: classes/Views/Settings.php:1192
3365
  msgid "Website File Changes plugin settings"
3366
  msgstr ""
3367
 
3368
+ #: classes/Views/Settings.php:1176, classes/Views/ToggleAlerts.php:517
3369
  msgid "Website File Changes Monitor"
3370
  msgstr ""
3371
 
3372
+ #: classes/Views/Settings.php:1177, classes/Views/ToggleAlerts.php:518
3373
  msgid "To keep a log of file changes please install Website File Changes Monitor, a plugin which is also developed by us."
3374
  msgstr ""
3375
 
3376
+ #: classes/Views/Settings.php:1178, classes/Views/ToggleAlerts.php:519
3377
  msgid "Install plugin now"
3378
  msgstr ""
3379
 
3380
+ #: classes/Views/Settings.php:1178, classes/Views/ToggleAlerts.php:519
3381
  msgid "Learn More"
3382
  msgstr ""
3383
 
3384
+ #: classes/Views/Settings.php:1207
3385
  msgid "By default the plugin keeps a log of all user changes done on your WordPress website. Use the setting below to exclude any objects from the activity log. When an object is excluded from the activity log, any event in which that object is referred will not be logged in the activity log."
3386
  msgstr ""
3387
 
3388
+ #: classes/Views/Settings.php:1211
3389
  msgid "Exclude Users:"
3390
  msgstr ""
3391
 
3392
+ #: classes/Views/Settings.php:1232
3393
  msgid "Exclude Roles:"
3394
  msgstr ""
3395
 
3396
+ #: classes/Views/Settings.php:1253
3397
  msgid "Exclude IP Address(es):"
3398
  msgstr ""
3399
 
3400
+ #: classes/Views/Settings.php:1269
3401
  msgid "You can exclude an individual IP address or a range of IP addresses. To exclude a range use the following format: [first IP]-[last octet of the last IP]. Example: 172.16.180.6-127."
3402
  msgstr ""
3403
 
3404
+ #: classes/Views/Settings.php:1275
3405
  msgid "Exclude Post Type:"
3406
  msgstr ""
3407
 
3408
+ #: classes/Views/Settings.php:1291
3409
  msgid "WordPress has the post and page post types by default though your website might use more post types (custom post types). You can exclude all post types, including the default WordPress ones."
3410
  msgstr ""
3411
 
3412
+ #: classes/Views/Settings.php:1297
3413
  msgid "Exclude Custom Fields:"
3414
  msgstr ""
3415
 
3416
+ #: classes/Views/Settings.php:1313
3417
  msgid "You can use the * wildcard to exclude multiple matching custom fields. For example to exclude all custom fields starting with wp123 enter wp123*"
3418
  msgstr ""
3419
 
3420
+ #: classes/Views/Settings.php:1344
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3421
  msgid "These settings are for advanced users."
3422
  msgstr ""
3423
 
3424
+ #: classes/Views/Settings.php:1345
3425
  msgid "If you have any questions <a href=\"https://wpactivitylog.com/contact/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=settings+pages\" target=\"_blank\">contact us</a>."
3426
  msgstr ""
3427
 
3428
+ #: classes/Views/Settings.php:1348
3429
  msgid "Where do you want the plugin's working directory for log files, reports and other files?"
3430
  msgstr ""
3431
 
3432
+ #: classes/Views/Settings.php:1349
3433
+ msgid "The plugin stores the reports it generates, a number of log files and the request log in this working directory. By default the directory is in the default WordPress uploads directory. Use the below setting to create the working directory in a different location. Note that the plugin requires write permissions to this directory. Please specify the relative path of the directory."
3434
  msgstr ""
3435
 
3436
+ #: classes/Views/Settings.php:1354
3437
  msgid "Working directory location"
3438
  msgstr ""
3439
 
3440
+ #: classes/Views/Settings.php:1377
3441
  msgid "Troubleshooting setting: Keep a debug log of all the requests this website receives"
3442
  msgstr ""
3443
 
3444
+ #: classes/Views/Settings.php:1378
3445
  msgid "Only enable the request log on testing, staging and development website. Never enable logging on a live website unless instructed to do so. Enabling request logging on a live website may degrade the performance of the website."
3446
  msgstr ""
3447
 
3448
+ #: classes/Views/Settings.php:1382
3449
  msgid "Request Log"
3450
  msgstr ""
3451
 
3452
+ #: classes/Views/Settings.php:1412
3453
  msgid "Reset plugin settings to default"
3454
  msgstr ""
3455
 
3456
+ #: classes/Views/Settings.php:1413
3457
  msgid "Use this button to <em>factory reset</em> the plugin. This means that all the configured settings will be reset to default and all email notifications, scheduled reports, external database / third party services connections, archiving and mirroring rule will be deleted. NOTE: the activity log data will not be purged. Use the setting below to purge the activity log."
3458
  msgstr ""
3459
 
3460
+ #: classes/Views/Settings.php:1417
3461
  msgid "Reset Settings"
3462
  msgstr ""
3463
 
3464
+ #: classes/Views/Settings.php:1419
3465
  msgid "RESET"
3466
  msgstr ""
3467
 
3468
+ #: classes/Views/Settings.php:1425
3469
  msgid "Purge the WordPress activity log"
3470
  msgstr ""
3471
 
3472
+ #: classes/Views/Settings.php:1426
3473
  msgid "Click the Purge button below to delete all the data from the WordPress activity log and start afresh."
3474
  msgstr ""
3475
 
3476
+ #: classes/Views/Settings.php:1430
3477
  msgid "Purge Activity Log"
3478
  msgstr ""
3479
 
3480
+ #: classes/Views/Settings.php:1432
3481
  msgid "PURGE"
3482
  msgstr ""
3483
 
3484
+ #: classes/Views/Settings.php:1439
3485
  msgid "MainWP Child Site Stealth Mode"
3486
  msgstr ""
3487
 
3488
+ #: classes/Views/Settings.php:1440
3489
  msgid "This option is enabled automatically when the plugin detects the MainWP Child plugin on the site. When this setting is enabled plugin access is restricted to the administrator who installs the plugin, the plugin is not shown in the list of installed plugins and no admin notifications are shown. Disable this option to change the plugin to the default setup."
3490
  msgstr ""
3491
 
3492
+ #: classes/Views/Settings.php:1444
3493
  msgid "Enable MainWP Child Site Stealth Mode"
3494
  msgstr ""
3495
 
3496
+ #: classes/Views/Settings.php:1464
3497
  msgid "Admin blocking plugins support"
3498
  msgstr ""
3499
 
3500
+ #: classes/Views/Settings.php:1469
3501
  msgid "Enable early plugin loading on sites that use admin blocking plugins"
3502
  msgstr ""
3503
 
3504
+ #: classes/Views/Settings.php:1478
3505
  msgid "Do you want to delete the plugin data from the database upon uninstall?"
3506
  msgstr ""
3507
 
3508
+ #: classes/Views/Settings.php:1479
3509
  msgid "The plugin saves the activity log data and settings in the WordPress database. By default upon uninstalling the plugin the data is kept in the database so if it is installed again, you can still access the data. If the data is deleted it is not possible to recover it so you won't be able to access it again even when you reinstall the plugin."
3510
  msgstr ""
3511
 
3512
+ #: classes/Views/Settings.php:1483
3513
  msgid "Remove Data on Uninstall"
3514
  msgstr ""
3515
 
3516
+ #: classes/Views/Settings.php:1508
3517
  msgid "Are you sure you want to reset all the plugin settings to default? This action cannot be undone."
3518
  msgstr ""
3519
 
3520
+ #: classes/Views/Settings.php:1518
3521
  msgid "Are you sure you want to purge all the activity log data?"
3522
  msgstr ""
3523
 
3524
+ #: classes/Views/Settings.php:1548
3525
  msgid "MainWP Child plugin is not active on this website."
3526
  msgstr ""
3527
 
3528
+ #: classes/Views/Settings.php:1580
3529
  msgid "The plugin cannot create the directory for the log files. Please check permissions and configure it again."
3530
  msgstr ""
3531
 
3532
+ #: classes/Views/Settings.php:1656
3533
  msgid "The specified value is not a valid URL!"
3534
  msgstr ""
3535
 
3536
+ #: classes/Views/Settings.php:1657
3537
  msgid "The specified value is not a valid post type!"
3538
  msgstr ""
3539
 
3540
+ #: classes/Views/Settings.php:1658
3541
  msgid "The specified value is not a valid IP address!"
3542
  msgstr ""
3543
 
3544
+ #: classes/Views/Settings.php:1659
3545
  msgid "The specified value is not a user nor a role!"
3546
  msgstr ""
3547
 
3548
+ #: classes/Views/Settings.php:1660
3549
  msgid "Filename cannot be added because it contains invalid characters."
3550
  msgstr ""
3551
 
3552
+ #: classes/Views/Settings.php:1661
3553
  msgid "File extension cannot be added because it contains invalid characters."
3554
  msgstr ""
3555
 
3556
+ #: classes/Views/Settings.php:1662
3557
  msgid "Directory cannot be added because it contains invalid characters."
3558
  msgstr ""
3559
 
3560
+ #: classes/Views/Settings.php:1663
3561
  msgid "Please save any changes before switching tabs."
3562
  msgstr ""
3563
 
3564
+ #: classes/Views/Settings.php:1791, classes/Views/Settings.php:1814
3565
  msgid "Nonce Verification Failed."
3566
  msgstr ""
3567
 
3568
+ #: classes/Views/Settings.php:1799
3569
  msgid "Plugin settings have been reset."
3570
  msgstr ""
3571
 
3572
+ #: classes/Views/Settings.php:1825
3573
  msgid "Reset query failed."
3574
  msgstr ""
3575
 
3576
+ #: classes/Views/Settings.php:1823
3577
  msgid "Tables has been reset."
3578
  msgstr ""
3579
 
3580
+ #: classes/Views/Settings.php:1838
3581
+ msgid "Activity log retention"
3582
+ msgstr ""
3583
+
3584
+ #: classes/Views/Settings.php:1844
3585
+ msgid "Keep all data"
3586
+ msgstr ""
3587
+
3588
+ #: classes/Views/Settings.php:1871
3589
+ msgid "Delete events older than"
3590
+ msgstr ""
3591
+
3592
+ #: classes/Views/Settings.php:1879
3593
+ msgid "Months"
3594
+ msgstr ""
3595
+
3596
+ #: classes/Views/Settings.php:1880
3597
+ msgid "Years"
3598
+ msgstr ""
3599
+
3600
+ #: classes/Views/Settings.php:1888
3601
+ msgid "The next scheduled purging of activity log data that is older than "
3602
+ msgstr ""
3603
+
3604
+ #: classes/Views/Settings.php:1895
3605
+ msgid "You can run the purging process now by clicking the button below."
3606
+ msgstr ""
3607
+
3608
+ #: classes/Views/Settings.php:1899
3609
+ msgid "Purge Old Data"
3610
+ msgstr ""
3611
+
3612
  #: classes/Views/SetupWizard.php:178
3613
  msgid "Welcome"
3614
  msgstr ""
3622
  msgstr ""
3623
 
3624
  #: classes/Views/SetupWizard.php:192
 
 
 
 
3625
  msgid "User Registrations"
3626
  msgstr ""
3627
 
3628
+ #: classes/Views/SetupWizard.php:197
3629
  msgid "Log Retention"
3630
  msgstr ""
3631
 
3632
+ #: classes/Views/SetupWizard.php:202, classes/Views/SetupWizard.php:736, classes/Views/SetupWizard.php:737
3633
  msgid "Finish"
3634
  msgstr ""
3635
 
3636
+ #: classes/Views/SetupWizard.php:262
3637
  msgid "Specified value in not a user."
3638
  msgstr ""
3639
 
3640
+ #: classes/Views/SetupWizard.php:263
3641
  msgid "Specified value in not a role."
3642
  msgstr ""
3643
 
3644
+ #: classes/Views/SetupWizard.php:264
3645
  msgid "Specified value in not an IP address."
3646
  msgstr ""
3647
 
3648
+ #: classes/Views/SetupWizard.php:304
3649
  msgid "WP Activity Log &rsaquo; Setup Wizard"
3650
  msgstr ""
3651
 
3652
+ #: classes/Views/SetupWizard.php:322
3653
  msgid "Close Wizard"
3654
  msgstr ""
3655
 
3656
  #. translators: 1 - an opening link tag, 2 - a closing link tag.
3657
+ #: classes/Views/SetupWizard.php:415
3658
  msgid "You have reached an invaild step - %1$sreturn to the start of the wizard%2$s."
3659
  msgstr ""
3660
 
3661
+ #: classes/Views/SetupWizard.php:432
3662
  msgid "This wizard helps you configure the basic plugin settings. All these settings can be changed at a later stage from the plugin settings."
3663
  msgstr ""
3664
 
3665
+ #: classes/Views/SetupWizard.php:437
3666
  msgid "Start Configuring the Plugin"
3667
  msgstr ""
3668
 
3669
+ #: classes/Views/SetupWizard.php:441
3670
  msgid "Exit Wizard"
3671
  msgstr ""
3672
 
3673
+ #: classes/Views/SetupWizard.php:454
3674
  msgid "Please select the level of detail for your WordPress activity logs:"
3675
  msgstr ""
3676
 
3677
+ #: classes/Views/SetupWizard.php:458
3678
  msgid "Basic (I want a high level overview and I am not interested in the detail)"
3679
  msgstr ""
3680
 
3681
+ #: classes/Views/SetupWizard.php:463
3682
  msgid "Geek (I want to know everything that is happening on my WordPress)"
3683
  msgstr ""
3684
 
3685
+ #: classes/Views/SetupWizard.php:465
3686
  msgid "Note: You can change the WordPress logging level from the plugin’s settings anytime."
3687
  msgstr ""
3688
 
3689
+ #: classes/Views/SetupWizard.php:468, classes/Views/SetupWizard.php:468, classes/Views/SetupWizard.php:525, classes/Views/SetupWizard.php:525, classes/Views/SetupWizard.php:574, classes/Views/SetupWizard.php:574, classes/Views/SetupWizard.php:634, classes/Views/SetupWizard.php:635, classes/Views/SetupWizard.php:851, classes/Views/SetupWizard.php:852, extensions/external-db/classes/Connections.php:214, extensions/external-db/classes/Connections.php:565, extensions/external-db/classes/Mirroring.php:286, extensions/external-db/classes/Mirroring.php:601
3690
  msgid "Next"
3691
  msgstr ""
3692
 
3693
+ #: classes/Views/SetupWizard.php:509
3694
  msgid "Do you or your users use other pages to log in to WordPress other than the default login page ( /wp-admin/ )?"
3695
  msgstr ""
3696
 
3697
+ #: classes/Views/SetupWizard.php:513
3698
  msgid "Yes, we use other pages to login to WordPress."
3699
  msgstr ""
3700
 
3701
+ #: classes/Views/SetupWizard.php:518
3702
  msgid "No, we only use the default WordPress login page."
3703
  msgstr ""
3704
 
3705
+ #: classes/Views/SetupWizard.php:520
3706
  msgid "If your website is a membership or ecommerce website most probably you have more than one area from where the users can login. If you are not sure, select Yes."
3707
  msgstr ""
3708
 
3709
+ #: classes/Views/SetupWizard.php:523, classes/Views/SetupWizard.php:572, classes/Views/SetupWizard.php:626
3710
  msgid "Note: You can change the WordPress activity log retention settings at any time from the plugin settings later on."
3711
  msgstr ""
3712
 
3713
+ #: classes/Views/SetupWizard.php:558
 
 
 
 
3714
  msgid "Can visitors register for a user on your website?"
3715
  msgstr ""
3716
 
3717
+ #: classes/Views/SetupWizard.php:569
3718
  msgid "If you are not sure about this setting, check if the Membership setting in the WordPress General settings is checked or not. If it is not checked (default) select No."
3719
  msgstr ""
3720
 
3721
+ #: classes/Views/SetupWizard.php:608
3722
  msgid "How long do you want to keep the data in the WordPress activity Log?"
3723
  msgstr ""
3724
 
3725
+ #: classes/Views/SetupWizard.php:613
3726
  msgid "6 months (data older than 6 months will be deleted)"
3727
  msgstr ""
3728
 
3729
+ #: classes/Views/SetupWizard.php:618
3730
  msgid "12 months (data older than 12 months will be deleted)"
3731
  msgstr ""
3732
 
3733
+ #: classes/Views/SetupWizard.php:623
3734
  msgid "Keep all data."
3735
  msgstr ""
3736
 
3737
+ #: classes/Views/SetupWizard.php:644
3738
  msgid "The plugin stores the data in the WordPress database in a very efficient way, though the more data you keep the more hard disk space it will consume. If you need need to retain a lot of data we would recommend you to <a href=\"https://wpactivitylog.com/features/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=wizard+configuration\" target=\"_blank\">upgrade to Premium</a> and use the Database tools to store the WordPress activity log in an external database."
3739
  msgstr ""
3740
 
3741
+ #: classes/Views/SetupWizard.php:707
3742
  msgid "Your plugin is all set and it is ready to start keeping a record of everything that is happening on your WordPress in a WordPress activity log."
3743
  msgstr ""
3744
 
3745
+ #: classes/Views/SetupWizard.php:708
3746
  msgid "Below are a few useful links you might need to refer to:"
3747
  msgstr ""
3748
 
3749
+ #: classes/Views/SetupWizard.php:713
3750
  msgid "Getting started with the WP Activity Log plugin"
3751
  msgstr ""
3752
 
3753
+ #: classes/Views/SetupWizard.php:718
3754
  msgid "Knowledge Base & Support Documents"
3755
  msgstr ""
3756
 
3757
+ #: classes/Views/SetupWizard.php:723
3758
  msgid "Benefits of keeping a WordPress activity log"
3759
  msgstr ""
3760
 
3761
+ #: classes/Views/SetupWizard.php:728
3762
+ msgid "We trust this plugin meets all your activity log requirements. Should you encounter any problems, have feature requests or would like to share some feedback, <a href=\"https://wpactivitylog.com/contact/?utm_source=plugin&utm_medium=referral&utm_campaign=WSAL&utm_content=wizard+configuration\" rel=\"noopener noreferrer\" target=\"_blank\">please get in touch!</a>"
3763
  msgstr ""
3764
 
3765
+ #: classes/Views/SetupWizard.php:764
3766
  msgid "Third Party Extensions"
3767
  msgstr ""
3768
 
3769
+ #: classes/Views/SetupWizard.php:805
3770
  msgid "Monitoring changes done in third party plugins"
3771
  msgstr ""
3772
 
3773
+ #: classes/Views/SetupWizard.php:806
3774
  msgid "We noticed that the below plugins are installed on this website. You can install our extensions to also keep a log of changes users do on these plugins."
3775
  msgstr ""
3776
 
3778
  msgid "Enable/Disable Events"
3779
  msgstr ""
3780
 
3781
+ #: classes/Views/ToggleAlerts.php:171
3782
  msgid "Log Level: "
3783
  msgstr ""
3784
 
3785
+ #: classes/Views/ToggleAlerts.php:176
3786
  msgid "Basic"
3787
  msgstr ""
3788
 
3789
+ #: classes/Views/ToggleAlerts.php:181
3790
  msgid "Geek"
3791
  msgstr ""
3792
 
3793
+ #: classes/Views/ToggleAlerts.php:184
3794
  msgid "Custom"
3795
  msgstr ""
3796
 
3797
+ #: classes/Views/ToggleAlerts.php:188
3798
  msgid "Use the Log level drop down menu above to use one of our preset log levels. Alternatively you can enable or disable any of the individual events from the below tabs. Refer to <a href=\"https://wpactivitylog.com/support/kb/list-wordpress-activity-log-event-ids/\" target=\"_blank\">the complete list of WordPress activity log event IDs</a> for reference on all the events the plugin can keep a log of."
3799
  msgstr ""
3800
 
3801
+ #: classes/Views/ToggleAlerts.php:198
 
 
 
 
3802
  msgid "Third party plugins"
3803
  msgstr ""
3804
 
3805
+ #: classes/Views/ToggleAlerts.php:298
3806
  msgid "Code"
3807
  msgstr ""
3808
 
3809
+ #: classes/Views/ToggleAlerts.php:341
3810
  msgid "Logins & Logouts"
3811
  msgstr ""
3812
 
3813
+ #: classes/Views/ToggleAlerts.php:334
3814
  msgid "Your website is a single site so the multisite events have been disabled."
3815
  msgstr ""
3816
 
3817
+ #: classes/Views/ToggleAlerts.php:314
3818
  msgid "The plugin WooCommerce is not installed on your website so these events have been disabled."
3819
  msgstr ""
3820
 
3821
+ #: classes/Views/ToggleAlerts.php:321
3822
  msgid "Products"
3823
  msgstr ""
3824
 
3825
+ #: classes/Views/ToggleAlerts.php:327
3826
  msgid "Post Changes"
3827
  msgstr ""
3828
 
3829
+ #: classes/Views/ToggleAlerts.php:307
3830
  msgid "<strong>Note:</strong> Post refers to any type of content, i.e. blog post, page or a post with a custom post type."
3831
  msgstr ""
3832
 
3833
+ #: classes/Views/ToggleAlerts.php:364
3834
  msgid "Not Implemented"
3835
  msgstr ""
3836
 
3837
+ #: classes/Views/ToggleAlerts.php:367
3838
  msgid "Not Available"
3839
  msgstr ""
3840
 
3841
+ #: classes/Views/ToggleAlerts.php:382
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3842
  msgid "User Sessions"
3843
  msgstr ""
3844
 
3845
+ #: classes/Views/ToggleAlerts.php:385
3846
+ msgid "Files"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3847
  msgstr ""
3848
 
3849
+ #: classes/Views/ToggleAlerts.php:388
3850
+ msgid "Post Settings"
3851
  msgstr ""
3852
 
3853
+ #: classes/Views/ToggleAlerts.php:457
3854
  msgid "Keep a log when users login to the website from other login pages / forms other than the default WordPress login page."
3855
  msgstr ""
3856
 
3857
+ #: classes/Views/ToggleAlerts.php:470
3858
+ msgid "Keep a log when a visitor registers a user on the website. Only enable this if you allow visitors to register as users on your website. User registration is disabled by default in WordPress."
 
 
 
 
3859
  msgstr ""
3860
 
3861
+ #: classes/Views/ToggleAlerts.php:484, classes/Views/ToggleAlerts.php:497
3862
+ msgid "Number of login attempts to log. Enter 0 to log all failed login attempts. (By default the plugin only logs up to 10 failed login because the process can be very resource intensive in case of a brute force attack)"
3863
  msgstr ""
3864
 
3865
+ #: classes/Views/ToggleAlerts.php:543
3866
  msgid "Save Changes"
3867
  msgstr ""
3868
 
3869
+ #: classes/Views/ToggleAlerts.php:550
3870
  msgid "Log Level Updated"
3871
  msgstr ""
3872
 
3873
  #. translators: Alerts log level.
3874
+ #: classes/Views/ToggleAlerts.php:554
3875
  msgid "The %s log level has been successfully loaded and applied."
3876
  msgstr ""
3877
 
3878
+ #: classes/Views/ToggleAlerts.php:558, extensions/email-notifications/classes/Notifications.php:292, extensions/email-notifications/classes/Notifications.php:882, extensions/email-notifications/classes/Notifications.php:1926
3879
  msgid "OK"
3880
  msgstr ""
3881
 
3882
+ #: classes/Views/ToggleAlerts.php:573
3883
  msgid "Enable File Integrity Scanner"
3884
  msgstr ""
3885
 
3886
+ #: classes/Views/ToggleAlerts.php:575
3887
  msgid "The file integrity scanner is switched off. To enable this event it has to be switched on."
3888
  msgstr ""
3889
 
3890
+ #: classes/Views/ToggleAlerts.php:579
3891
  msgid "SWITCH ON"
3892
  msgstr ""
3893
 
3894
+ #: classes/Views/ToggleAlerts.php:580
3895
  msgid "DISABLE EVENT"
3896
  msgstr ""
3897
 
3898
+ #: extensions/search/search-init.php:199
3899
  msgid "An identical search filter already exists."
3900
  msgstr ""
3901
 
3902
+ #: extensions/search/search-init.php:218, extensions/search/search-init.php:334, extensions/user-sessions/classes/View/Sessions.php:367
3903
  msgid "Search"
3904
  msgstr ""
3905
 
3906
+ #: extensions/search/search-init.php:335
3907
  msgid "- Use the free-text search to search for text in the event's message.<br>- To search for a particular Event ID, user, IP address, Post ID or Type or use date ranges, use the filters."
3908
  msgstr ""
3909
 
3910
+ #: extensions/search/search-init.php:336
3911
  msgid "Clear Search Results"
3912
  msgstr ""
3913
 
3914
+ #: extensions/search/search-init.php:337
3915
  msgid "Nothing found!"
3916
  msgstr ""
3917
 
3918
+ #: extensions/search/search-init.php:338
3919
  msgid "Load"
3920
  msgstr ""
3921
 
3922
+ #: extensions/search/search-init.php:339
3923
  msgid "Loading..."
3924
  msgstr ""
3925
 
3926
+ #: extensions/search/search-init.php:340
3927
  msgid "Load & Run"
3928
  msgstr ""
3929
 
3930
+ #: extensions/search/search-init.php:341, extensions/email-notifications/classes/NotificationBuilder.php:76, extensions/email-notifications/classes/Notifications.php:1836, extensions/email-notifications/classes/Notifications.php:1899, extensions/email-notifications/classes/Notifications.php:1914, extensions/external-db/classes/Connections.php:144, extensions/external-db/classes/Mirroring.php:204
3931
  msgid "Delete"
3932
  msgstr ""
3933
 
3934
+ #: extensions/search/search-init.php:342, extensions/external-db/classes/Connections.php:556, extensions/external-db/classes/Mirroring.php:589
3935
  msgid "Deleting..."
3936
  msgstr ""
3937
 
3938
+ #: extensions/search/search-init.php:344, extensions/search/classes/FilterManager.php:383
3939
  msgid "Load Search & Filters"
3940
  msgstr ""
3941
 
3942
+ #: extensions/search/search-init.php:345
3943
  msgid "* Invalid IP"
3944
  msgstr ""
3945
 
3946
+ #: extensions/search/search-init.php:346, extensions/search/classes/FilterManager.php:386
3947
  msgid "Remove"
3948
  msgstr ""
3949
 
3950
+ #: extensions/search/search-init.php:347
3951
  msgid "Close Filters"
3952
  msgstr ""
3953
 
3954
+ #: extensions/search/search-init.php:348, extensions/search/classes/FilterManager.php:411
3955
  msgid "Filter View"
3956
  msgstr ""
3957
 
3958
  #. translators: both placeholders are html formatting strings for itallics
3959
+ #: extensions/search/search-init.php:351
3960
  msgid "Click the %1$sSearch%2$s button to apply the filters. Click the %1$sClear Search Results%2$s button to reset the search and filters."
3961
  msgstr ""
3962
 
3963
+ #: extensions/search/search-init.php:397
3964
  msgid "Widget could not be found."
3965
  msgstr ""
3966
 
3967
+ #: extensions/search/search-init.php:479, extensions/search/search-init.php:549
3968
  msgid "No saved search found."
3969
  msgstr ""
3970
 
3971
+ #: extensions/search/search-init.php:471
3972
  msgid "Saved searches found."
3973
  msgstr ""
3974
 
3975
+ #: extensions/search/search-init.php:513
3976
  msgid "Search name not specified."
3977
  msgstr ""
3978
 
3979
+ #: extensions/search/search-init.php:540
3980
  msgid "Saved search not found."
3981
  msgstr ""
3982
 
3983
+ #: extensions/search/search-init.php:532
3984
  msgid "Saved search deleted."
3985
  msgstr ""
3986
 
3987
+ #: classes/Views/addons/html-view.php:95, classes/Views/addons/html-view.php:120
3988
+ msgid "Upgrade to Premium"
3989
+ msgstr ""
3990
+
3991
+ #: classes/Views/addons/html-view.php:96
3992
+ msgid "More Information"
3993
+ msgstr ""
3994
+
3995
+ #: classes/Views/addons/html-view.php:104
3996
  msgid "Screenshots"
3997
  msgstr ""
3998
 
3999
+ #: classes/Views/addons/html-view.php:121
4000
  msgid "Start Free 14-Day Premium Trial"
4001
  msgstr ""
4002
 
4025
  #. translators: Twilio settings hyperlink.
4026
  #. translators: Twilio settings hyperlink.
4027
  #. translators: Twilio settings hyperlink.
4028
+ #: extensions/email-notifications/classes/AddNotification.php:297, extensions/email-notifications/classes/EditNotification.php:348, extensions/email-notifications/classes/Notifications.php:816, extensions/email-notifications/classes/Notifications.php:930, extensions/email-notifications/classes/Notifications.php:1251, extensions/email-notifications/classes/Notifications.php:1415, extensions/email-notifications/classes/Notifications.php:1509, extensions/email-notifications/classes/Notifications.php:1675, extensions/email-notifications/classes/SMSProviderSettings.php:237
4029
  msgid "Click %s to configure Twilio integration for SMS notifications."
4030
  msgstr ""
4031
 
4032
+ #: extensions/email-notifications/classes/AddNotification.php:297, extensions/email-notifications/classes/EditNotification.php:348, extensions/email-notifications/classes/Notifications.php:816, extensions/email-notifications/classes/Notifications.php:930, extensions/email-notifications/classes/Notifications.php:1251, extensions/email-notifications/classes/Notifications.php:1415, extensions/email-notifications/classes/Notifications.php:1509, extensions/email-notifications/classes/Notifications.php:1675, extensions/email-notifications/classes/SMSProviderSettings.php:237
4033
  msgid "here"
4034
  msgstr ""
4035
 
4059
  msgid "Name"
4060
  msgstr ""
4061
 
4062
+ #: extensions/email-notifications/classes/AddNotification.php:356, extensions/email-notifications/classes/EditNotification.php:448, extensions/email-notifications/classes/Notifications.php:1849, extensions/email-notifications/classes/Notifications.php:1860
4063
  msgid "Title"
4064
  msgstr ""
4065
 
4066
+ #: extensions/email-notifications/classes/AddNotification.php:364, extensions/email-notifications/classes/EditNotification.php:456, extensions/email-notifications/classes/Notifications.php:947, extensions/email-notifications/classes/Notifications.php:970, extensions/email-notifications/classes/Notifications.php:987, extensions/email-notifications/classes/Notifications.php:1011, extensions/email-notifications/classes/Notifications.php:1033, extensions/email-notifications/classes/Notifications.php:1046, extensions/email-notifications/classes/Notifications.php:1059, extensions/email-notifications/classes/Notifications.php:1072, extensions/email-notifications/classes/Notifications.php:1085, extensions/email-notifications/classes/Notifications.php:1098, extensions/email-notifications/classes/Notifications.php:1122, extensions/email-notifications/classes/Notifications.php:1137, extensions/email-notifications/classes/Notifications.php:1152, extensions/email-notifications/classes/Notifications.php:1167, extensions/email-notifications/classes/Notifications.php:1182, extensions/email-notifications/classes/Notifications.php:1204, extensions/email-notifications/classes/Notifications.php:1269, extensions/email-notifications/classes/Notifications.php:1284, extensions/email-notifications/classes/Notifications.php:1299, extensions/email-notifications/classes/Notifications.php:1323, extensions/email-notifications/classes/Notifications.php:1338, extensions/email-notifications/classes/Notifications.php:1353, extensions/email-notifications/classes/Notifications.php:1368, extensions/email-notifications/classes/Notifications.php:1430, extensions/email-notifications/classes/Notifications.php:1445, extensions/email-notifications/classes/Notifications.php:1460, extensions/email-notifications/classes/Notifications.php:1524, extensions/email-notifications/classes/Notifications.php:1541, extensions/email-notifications/classes/Notifications.php:1558, extensions/email-notifications/classes/Notifications.php:1575, extensions/email-notifications/classes/Notifications.php:1592, extensions/email-notifications/classes/Notifications.php:1609, extensions/email-notifications/classes/Notifications.php:1626, extensions/email-notifications/classes/Notifications.php:1692, extensions/email-notifications/classes/Notifications.php:1709, extensions/email-notifications/classes/Notifications.php:1726, extensions/email-notifications/classes/Notifications.php:1743, extensions/user-sessions/classes/View/Sessions.php:349
4067
  msgid "Email"
4068
  msgstr ""
4069
 
4070
+ #: extensions/email-notifications/classes/AddNotification.php:370, extensions/email-notifications/classes/EditNotification.php:462, extensions/email-notifications/classes/Notifications.php:973, extensions/email-notifications/classes/Notifications.php:990, extensions/email-notifications/classes/Notifications.php:1014, extensions/email-notifications/classes/Notifications.php:1036, extensions/email-notifications/classes/Notifications.php:1049, extensions/email-notifications/classes/Notifications.php:1062, extensions/email-notifications/classes/Notifications.php:1075, extensions/email-notifications/classes/Notifications.php:1088, extensions/email-notifications/classes/Notifications.php:1101, extensions/email-notifications/classes/Notifications.php:1125, extensions/email-notifications/classes/Notifications.php:1140, extensions/email-notifications/classes/Notifications.php:1155, extensions/email-notifications/classes/Notifications.php:1170, extensions/email-notifications/classes/Notifications.php:1185, extensions/email-notifications/classes/Notifications.php:1207, extensions/email-notifications/classes/Notifications.php:1272, extensions/email-notifications/classes/Notifications.php:1287, extensions/email-notifications/classes/Notifications.php:1302, extensions/email-notifications/classes/Notifications.php:1326, extensions/email-notifications/classes/Notifications.php:1341, extensions/email-notifications/classes/Notifications.php:1356, extensions/email-notifications/classes/Notifications.php:1371, extensions/email-notifications/classes/Notifications.php:1433, extensions/email-notifications/classes/Notifications.php:1448, extensions/email-notifications/classes/Notifications.php:1463, extensions/email-notifications/classes/Notifications.php:1527, extensions/email-notifications/classes/Notifications.php:1544, extensions/email-notifications/classes/Notifications.php:1561, extensions/email-notifications/classes/Notifications.php:1578, extensions/email-notifications/classes/Notifications.php:1595, extensions/email-notifications/classes/Notifications.php:1612, extensions/email-notifications/classes/Notifications.php:1629, extensions/email-notifications/classes/Notifications.php:1695, extensions/email-notifications/classes/Notifications.php:1712, extensions/email-notifications/classes/Notifications.php:1729, extensions/email-notifications/classes/Notifications.php:1746
4071
  msgid "Mobile Number"
4072
  msgstr ""
4073
 
4074
+ #: extensions/email-notifications/classes/Common.php:381, extensions/email-notifications/classes/Common.php:446
4075
  msgid "The form is not valid. Please reload the page and try again."
4076
  msgstr ""
4077
 
4078
  #. translators: Event type
4079
+ #: extensions/email-notifications/classes/Common.php:583, extensions/email-notifications/classes/Common.php:573, extensions/email-notifications/classes/Common.php:559, extensions/email-notifications/classes/Common.php:546, extensions/email-notifications/classes/Common.php:523, extensions/email-notifications/classes/Common.php:503, extensions/email-notifications/classes/Common.php:424
4080
  msgid "%s is not valid"
4081
  msgstr ""
4082
 
4083
+ #: extensions/email-notifications/classes/Common.php:589
4084
  msgid "Selected TYPE is not valid."
4085
  msgstr ""
4086
 
4087
+ #: extensions/email-notifications/classes/Common.php:579
4088
  msgid "Selected OBJECT is not valid."
4089
  msgstr ""
4090
 
4091
+ #: extensions/email-notifications/classes/Common.php:568
4092
  msgid "Selected POST STATUS is not valid."
4093
  msgstr ""
4094
 
4095
+ #: extensions/email-notifications/classes/Common.php:555
4096
  msgid "Selected POST TYPE is not valid."
4097
  msgstr ""
4098
 
4099
+ #: extensions/email-notifications/classes/Common.php:534
4100
  msgid "The enviroment is not multisite."
4101
  msgstr ""
4102
 
4103
+ #: extensions/email-notifications/classes/Common.php:540, extensions/email-notifications/classes/Common.php:517
4104
  msgid "%s was not found"
4105
  msgstr ""
4106
 
4107
+ #: extensions/email-notifications/classes/Common.php:490, extensions/email-notifications/classes/Common.php:496
4108
  msgid "TIME is not valid."
4109
  msgstr ""
4110
 
4111
+ #: extensions/email-notifications/classes/Common.php:481
4112
  msgid "DATE is not valid."
4113
  msgstr ""
4114
 
4115
+ #: extensions/email-notifications/classes/Common.php:440
4116
  msgid "The SOURCE IP is not valid. Maximum of 15 characters allowed."
4117
  msgstr ""
4118
 
4119
+ #: extensions/email-notifications/classes/Common.php:455
4120
  msgid "The SOURCE IP is not valid."
4121
  msgstr ""
4122
 
4123
+ #: extensions/email-notifications/classes/Common.php:464
4124
  msgid "The SOURCE IP fragment is not valid."
4125
  msgstr ""
4126
 
4127
+ #: extensions/email-notifications/classes/Common.php:433
4128
  msgid "Selected USER ROLE is not valid."
4129
  msgstr ""
4130
 
4131
+ #: extensions/email-notifications/classes/Common.php:414
4132
  msgid "The USERNAME is not valid. Maximum of 50 characters allowed."
4133
  msgstr ""
4134
 
4135
+ #: extensions/email-notifications/classes/Common.php:420
4136
  msgid "The USERNAME does not exist."
4137
  msgstr ""
4138
 
4139
+ #: extensions/email-notifications/classes/Common.php:392, extensions/email-notifications/classes/Common.php:407
4140
  msgid "The EVENT ID is not valid."
4141
  msgstr ""
4142
 
4143
+ #: extensions/email-notifications/classes/Common.php:398
4144
  msgid "Internal Error. Please reload the page and try again."
4145
  msgstr ""
4146
 
4147
+ #: extensions/email-notifications/classes/Common.php:814, extensions/email-notifications/classes/Common.php:842, extensions/email-notifications/classes/Common.php:844
4148
  msgid "Title is required."
4149
  msgstr ""
4150
 
4151
+ #: extensions/email-notifications/classes/Common.php:851
4152
  msgid "Title is not valid."
4153
  msgstr ""
4154
 
4155
+ #: extensions/email-notifications/classes/Common.php:861
4156
  msgid "Please add at least one condition."
4157
  msgstr ""
4158
 
4159
+ #: extensions/email-notifications/classes/Common.php:909, extensions/email-notifications/classes/Common.php:915, extensions/email-notifications/classes/Common.php:920
4160
  msgid "The form is not valid. Please refresh the page and try again."
4161
  msgstr ""
4162
 
4163
+ #: extensions/email-notifications/classes/Common.php:929
4164
  msgid "A trigger's condition must not be longer than 50 characters."
4165
  msgstr ""
4166
 
4167
+ #: extensions/email-notifications/classes/Common.php:965
4168
  msgid "Email or Username is not valid."
4169
  msgstr ""
4170
 
4171
+ #: extensions/email-notifications/classes/Common.php:972
4172
  msgid "Mobile number is not valid."
4173
  msgstr ""
4174
 
4175
+ #: extensions/email-notifications/classes/Common.php:959
4176
  msgid "Email or Username is required."
4177
  msgstr ""
4178
 
4179
+ #: extensions/email-notifications/classes/Common.php:960
4180
  msgid "Mobile number is required."
4181
  msgstr ""
4182
 
4183
+ #: extensions/email-notifications/classes/Common.php:1024, extensions/email-notifications/classes/Notifications.php:582
4184
  msgid "Notification could not be saved."
4185
  msgstr ""
4186
 
4187
+ #: extensions/email-notifications/classes/Common.php:1031, extensions/email-notifications/classes/Notifications.php:641
4188
  msgid "Notification successfully saved."
4189
  msgstr ""
4190
 
4191
+ #: extensions/email-notifications/classes/Common.php:1109, extensions/email-notifications/classes/Common.php:1171
4192
  msgid "Notification {title} on website {site} triggered"
4193
  msgstr ""
4194
 
4195
+ #: extensions/email-notifications/classes/Common.php:1110, extensions/email-notifications/classes/Common.php:1172
4196
  msgid "Notification <strong>{title}</strong> was triggered. Below are the notification details:"
4197
  msgstr ""
4198
 
4199
+ #: extensions/email-notifications/classes/Common.php:1112
4200
  msgid "Website"
4201
  msgstr ""
4202
 
4203
+ #: extensions/email-notifications/classes/Common.php:1114, extensions/email-notifications/classes/Common.php:1175, extensions/search/classes/FilterManager.php:474, extensions/user-sessions/classes/View/Sessions.php:174, extensions/user-sessions/classes/View/Sessions.php:348
4204
  msgid "Username"
4205
  msgstr ""
4206
 
4207
+ #: extensions/email-notifications/classes/Common.php:1115
4208
  msgid "User role"
4209
  msgstr ""
4210
 
4211
+ #: extensions/email-notifications/classes/Common.php:1116
4212
  msgid "IP address"
4213
  msgstr ""
4214
 
4215
+ #: extensions/email-notifications/classes/Common.php:1119
4216
  msgid "Event Message"
4217
  msgstr ""
4218
 
4219
+ #: extensions/email-notifications/classes/Common.php:1120
4220
  msgid "Event generated on"
4221
  msgstr ""
4222
 
4223
+ #: extensions/email-notifications/classes/Common.php:1122
4224
  msgid "These email notifications are sent with <a href=\"http://wpactivitylog.com\">WP Activity Log</a>, the most comprehensive WordPress activity log plugin solution."
4225
  msgstr ""
4226
 
4227
+ #: extensions/email-notifications/classes/Common.php:1145, extensions/email-notifications/classes/Common.php:1204
4228
  msgid "User/Role"
4229
  msgstr ""
4230
 
4231
+ #: extensions/email-notifications/classes/Common.php:1176, extensions/search/classes/FilterManager.php:486, extensions/search/classes/Filters/userrolefilter.php:49, extensions/search/classes/Filters/userrolefilter.php:87, extensions/user-sessions/classes/View/Sessions.php:353
4232
  msgid "User Role"
4233
  msgstr ""
4234
 
4235
+ #: extensions/email-notifications/classes/Common.php:1178
4236
  msgid "Generated On"
4237
  msgstr ""
4238
 
4239
+ #: extensions/email-notifications/classes/Common.php:1180
4240
  msgid "Monitoring of WordPress and Email Notifications provided by <a href=\"http://wpactivitylog.com\">WP Activity Log, WordPress most comprehensive audit trail plugin</a>."
4241
  msgstr ""
4242
 
4243
+ #: extensions/email-notifications/classes/Common.php:1205
4244
  msgid "Event"
4245
  msgstr ""
4246
 
4247
+ #: extensions/email-notifications/classes/Common.php:1220
4248
  msgid "Subject "
4249
  msgstr ""
4250
 
4251
+ #: extensions/email-notifications/classes/Common.php:1229
4252
  msgid "Body "
4253
  msgstr ""
4254
 
4255
+ #: extensions/email-notifications/classes/Common.php:1232
4256
  msgid "HTML is accepted. Available template tags:"
4257
  msgstr ""
4258
 
4291
  msgid "Edit Notification"
4292
  msgstr ""
4293
 
4294
+ #: extensions/email-notifications/classes/EditNotification.php:239, extensions/email-notifications/classes/Notifications.php:1798
4295
  msgid "Add New"
4296
  msgstr ""
4297
 
4339
  msgid "Multisite"
4340
  msgstr ""
4341
 
4342
+ #: extensions/email-notifications/classes/Notifications.php:185, extensions/email-notifications/classes/Notifications.php:835
4343
  msgid "Custom Notifications"
4344
  msgstr ""
4345
 
4347
  msgid "Notifications Templates"
4348
  msgstr ""
4349
 
4350
+ #: extensions/email-notifications/classes/Notifications.php:197, extensions/email-notifications/classes/Notifications.php:1975
4351
  msgid "Default Email Template"
4352
  msgstr ""
4353
 
4354
+ #: extensions/email-notifications/classes/Notifications.php:201, extensions/email-notifications/classes/Notifications.php:1971
4355
  msgid "Default SMS Template"
4356
  msgstr ""
4357
 
4359
  msgid "Notifications"
4360
  msgstr ""
4361
 
4362
+ #: extensions/email-notifications/classes/Notifications.php:293, extensions/email-notifications/classes/Notifications.php:853
4363
  msgid "Test Notifications"
4364
  msgstr ""
4365
 
4371
  msgid "Please specify an email address or a phone number to test."
4372
  msgstr ""
4373
 
4374
+ #: extensions/email-notifications/classes/Notifications.php:599
4375
  msgid "Email Address or Username is not valid."
4376
  msgstr ""
4377
 
4378
+ #: extensions/email-notifications/classes/Notifications.php:609
4379
  msgid "Phone number is not valid."
4380
  msgstr ""
4381
 
4382
+ #: extensions/email-notifications/classes/Notifications.php:591
4383
  msgid "Email Address and Mobile Number cannot be empty."
4384
  msgstr ""
4385
 
4386
+ #: extensions/email-notifications/classes/Notifications.php:732
4387
  msgid "To configure email notifications please contact the administrator of this multisite network on "
4388
  msgstr ""
4389
 
4390
+ #: extensions/email-notifications/classes/Notifications.php:751
4391
  msgid "Daily summary email sent."
4392
  msgstr ""
4393
 
4394
+ #: extensions/email-notifications/classes/Notifications.php:747
4395
  msgid "An error occurred while sending the daily summary email."
4396
  msgstr ""
4397
 
4398
+ #: extensions/email-notifications/classes/Notifications.php:741
4399
  msgid "Invalid request."
4400
  msgstr ""
4401
 
4402
  #. translators: %s: Twilio settings link
4403
+ #: extensions/email-notifications/classes/Notifications.php:825
4404
  msgid "Tick the check box and specify an email address or username to enable a notification. You can specify a phone number to send a SMS notification as well (%s). Multiple recipients or numbers should be separated with a comma (,). Click the Save Notifications button to save the changes."
4405
  msgstr ""
4406
 
4407
+ #: extensions/email-notifications/classes/Notifications.php:826
4408
  msgid "Configure Twilio account integration"
4409
  msgstr ""
4410
 
4411
  #. translators: %s: Twilio settings link
4412
+ #: extensions/email-notifications/classes/Notifications.php:834
4413
  msgid "You can create your own notification criteria in the %s tab."
4414
  msgstr ""
4415
 
4416
+ #: extensions/email-notifications/classes/Notifications.php:854
4417
  msgid "Save Notifications"
4418
  msgstr ""
4419
 
4420
+ #: extensions/email-notifications/classes/Notifications.php:863
4421
  msgid "Specify an email address to where you would like to send a test email notification:"
4422
  msgstr ""
4423
 
4424
+ #: extensions/email-notifications/classes/Notifications.php:868
4425
  msgid "Specify a mobile phone number to where you would like to send a test SMS notification:"
4426
  msgstr ""
4427
 
4428
+ #: extensions/email-notifications/classes/Notifications.php:874
4429
  msgid "Send"
4430
  msgstr ""
4431
 
4432
+ #: extensions/email-notifications/classes/Notifications.php:875, extensions/external-db/classes/Connections.php:216, extensions/external-db/classes/Mirroring.php:287
4433
  msgid "Cancel"
4434
  msgstr ""
4435
 
4436
+ #: extensions/email-notifications/classes/Notifications.php:933
4437
  msgid "Daily Summary of Activity Log"
4438
  msgstr ""
4439
 
4440
+ #: extensions/email-notifications/classes/Notifications.php:944
4441
  msgid "Send me a summary of what happens every day."
4442
  msgstr ""
4443
 
4444
+ #: extensions/email-notifications/classes/Notifications.php:948
4445
  msgid "Send Summary Now"
4446
  msgstr ""
4447
 
4448
+ #: extensions/email-notifications/classes/Notifications.php:954
4449
  msgid "Suspicious Activity"
4450
  msgstr ""
4451
 
4452
+ #: extensions/email-notifications/classes/Notifications.php:963, extensions/email-notifications/classes/Notifications.php:980
4453
  msgid "There are more than"
4454
  msgstr ""
4455
 
4456
+ #: extensions/email-notifications/classes/Notifications.php:965
4457
  msgid "failed WordPress logins for a WordPress user (Event ID 1002)"
4458
  msgstr ""
4459
 
4460
+ #: extensions/email-notifications/classes/Notifications.php:982
4461
  msgid "failed logins of non existing users (Event ID 1003)"
4462
  msgstr ""
4463
 
4464
+ #: extensions/email-notifications/classes/Notifications.php:997
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4465
  msgid "WordPress Install Changes"
4466
  msgstr ""
4467
 
4468
+ #: extensions/email-notifications/classes/Notifications.php:1006
4469
  msgid "WordPress was updated (Event ID 6004)"
4470
  msgstr ""
4471
 
4472
+ #: extensions/email-notifications/classes/Notifications.php:1021
4473
  msgid "Plugin Changes Notifications"
4474
  msgstr ""
4475
 
4476
+ #: extensions/email-notifications/classes/Notifications.php:1029
4477
  msgid "New plugin is installed (Event ID 5000)"
4478
  msgstr ""
4479
 
4480
+ #: extensions/email-notifications/classes/Notifications.php:1042
4481
  msgid "Installed plugin is activated (Event ID 5001)"
4482
  msgstr ""
4483
 
4484
+ #: extensions/email-notifications/classes/Notifications.php:1055
4485
  msgid "Plugin file is modified (Event ID 2051)"
4486
  msgstr ""
4487
 
4488
+ #: extensions/email-notifications/classes/Notifications.php:1068
4489
  msgid "Installed plugin is deactivated (Event ID 5002)"
4490
  msgstr ""
4491
 
4492
+ #: extensions/email-notifications/classes/Notifications.php:1081
4493
  msgid "A plugin is uninstalled (Event ID 5003)"
4494
  msgstr ""
4495
 
4496
+ #: extensions/email-notifications/classes/Notifications.php:1094
4497
  msgid "Installed plugin is upgraded (Event ID 5004)"
4498
  msgstr ""
4499
 
4500
+ #: extensions/email-notifications/classes/Notifications.php:1108
4501
  msgid "Themes Changes Notifications"
4502
  msgstr ""
4503
 
4504
+ #: extensions/email-notifications/classes/Notifications.php:1117
4505
  msgid "New theme is installed (Event ID 5005)"
4506
  msgstr ""
4507
 
4508
+ #: extensions/email-notifications/classes/Notifications.php:1132
4509
  msgid "Installed theme is activated (Event ID 5006)"
4510
  msgstr ""
4511
 
4512
+ #: extensions/email-notifications/classes/Notifications.php:1147
4513
  msgid "Theme file is modified (Event ID 2046)"
4514
  msgstr ""
4515
 
4516
+ #: extensions/email-notifications/classes/Notifications.php:1162
4517
  msgid "A theme is uninstalled (Event ID 5007)"
4518
  msgstr ""
4519
 
4520
+ #: extensions/email-notifications/classes/Notifications.php:1177
4521
  msgid "Installed theme is updated (Event ID 5031)"
4522
  msgstr ""
4523
 
4524
+ #: extensions/email-notifications/classes/Notifications.php:1192
4525
  msgid "Critical Events"
4526
  msgstr ""
4527
 
4528
+ #: extensions/email-notifications/classes/Notifications.php:1200
4529
  msgid "Critical Event is Generated"
4530
  msgstr ""
4531
 
4532
+ #: extensions/email-notifications/classes/Notifications.php:1255
4533
  msgid "User Activity"
4534
  msgstr ""
4535
 
4536
+ #: extensions/email-notifications/classes/Notifications.php:1264
4537
  msgid "User logs in (Event ID 1000)"
4538
  msgstr ""
4539
 
4540
+ #: extensions/email-notifications/classes/Notifications.php:1279
4541
  msgid "First time user logs in"
4542
  msgstr ""
4543
 
4544
+ #: extensions/email-notifications/classes/Notifications.php:1294
4545
  msgid "User changed password (Event ID 4003)"
4546
  msgstr ""
4547
 
4548
+ #: extensions/email-notifications/classes/Notifications.php:1309
4549
  msgid "User Profile Changes"
4550
  msgstr ""
4551
 
4552
+ #: extensions/email-notifications/classes/Notifications.php:1318
4553
  msgid "User changed email address (Event IDs 4005, 4006)"
4554
  msgstr ""
4555
 
4556
+ #: extensions/email-notifications/classes/Notifications.php:1333
4557
  msgid "User's role has changed (Event ID 4002)"
4558
  msgstr ""
4559
 
4560
+ #: extensions/email-notifications/classes/Notifications.php:1348
4561
  msgid "User changed the password of another user (Event ID 4004)"
4562
  msgstr ""
4563
 
4564
+ #: extensions/email-notifications/classes/Notifications.php:1363
4565
  msgid "New user is created (Event IDs 4000, 4001, 4012)"
4566
  msgstr ""
4567
 
4568
+ #: extensions/email-notifications/classes/Notifications.php:1425
4569
  msgid "New content is published (Event ID 2001)"
4570
  msgstr ""
4571
 
4572
+ #: extensions/email-notifications/classes/Notifications.php:1440
4573
  msgid "Content in a post, page or custom post type is changed (Event ID 2065)"
4574
  msgstr ""
4575
 
4576
+ #: extensions/email-notifications/classes/Notifications.php:1455
4577
  msgid "Anything but content in a post is changed (such as date, category, status, parent page etc)"
4578
  msgstr ""
4579
 
4580
+ #: extensions/email-notifications/classes/Notifications.php:1520
4581
  msgid "User granted super admin (Event ID 4008)"
4582
  msgstr ""
4583
 
4584
+ #: extensions/email-notifications/classes/Notifications.php:1536
4585
  msgid "User revoked super admin (Event ID 4009)"
4586
  msgstr ""
4587
 
4588
+ #: extensions/email-notifications/classes/Notifications.php:1553
4589
  msgid "User added to site (Event ID 4010)"
4590
  msgstr ""
4591
 
4592
+ #: extensions/email-notifications/classes/Notifications.php:1570
4593
  msgid "User removed from site (Event ID 4011)"
4594
  msgstr ""
4595
 
4596
+ #: extensions/email-notifications/classes/Notifications.php:1587
4597
  msgid "Site changes"
4598
  msgstr ""
4599
 
4600
+ #: extensions/email-notifications/classes/Notifications.php:1604
4601
  msgid "Activated theme on network (Event ID 5008)"
4602
  msgstr ""
4603
 
4604
+ #: extensions/email-notifications/classes/Notifications.php:1621
4605
  msgid "Deactivated theme from network (Event ID 5009)"
4606
  msgstr ""
4607
 
4608
+ #: extensions/email-notifications/classes/Notifications.php:1687
4609
  msgid "Any product change"
4610
  msgstr ""
4611
 
4612
+ #: extensions/email-notifications/classes/Notifications.php:1704
4613
  msgid "Any store settings change"
4614
  msgstr ""
4615
 
4616
+ #: extensions/email-notifications/classes/Notifications.php:1721
4617
  msgid "Any coupon code changes"
4618
  msgstr ""
4619
 
4620
+ #: extensions/email-notifications/classes/Notifications.php:1738
4621
  msgid "Any orders changes"
4622
  msgstr ""
4623
 
4624
  #. translators: WSAL Notifications Documentation hyperlink
4625
+ #: extensions/email-notifications/classes/Notifications.php:1793
4626
  msgid "Use the trigger builder to build any type of criteria that triggers email and / or SMS notifications. Refer to the %s for more detailed information."
4627
  msgstr ""
4628
 
4629
+ #: extensions/email-notifications/classes/Notifications.php:1794
4630
  msgid "WordPress notifications documentation"
4631
  msgstr ""
4632
 
4633
+ #: extensions/email-notifications/classes/Notifications.php:1950
4634
  msgid "No notifications found. Click the <code>Add New</code> button above to create one."
4635
  msgstr ""
4636
 
4637
+ #: extensions/email-notifications/classes/Notifications.php:1936
4638
  msgid "No notifications found to match your search."
4639
  msgstr ""
4640
 
4641
+ #: extensions/email-notifications/classes/Notifications.php:1943, extensions/email-notifications/classes/Notifications.php:1945, extensions/email-notifications/classes/Notifications.php:1820, extensions/email-notifications/classes/Notifications.php:1822
4642
  msgid "Search Notifications"
4643
  msgstr ""
4644
 
4645
+ #: extensions/email-notifications/classes/Notifications.php:1811, extensions/reports/classes/HtmlReportGenerator.php:175, extensions/reports/classes/HtmlReportGenerator.php:179, extensions/user-sessions/classes/View/Options/Policies.php:24
4646
  msgid "All"
4647
  msgstr ""
4648
 
4649
+ #: extensions/email-notifications/classes/Notifications.php:1833, extensions/email-notifications/classes/Notifications.php:1911
4650
  msgid "Bulk actions"
4651
  msgstr ""
4652
 
4653
+ #: extensions/email-notifications/classes/Notifications.php:1834, extensions/email-notifications/classes/Notifications.php:1895, extensions/email-notifications/classes/Notifications.php:1912, extensions/external-db/classes/Connections.php:432, extensions/external-db/classes/Mirroring.php:185, extensions/external-db/classes/Settings.php:1304
4654
  msgid "Enable"
4655
  msgstr ""
4656
 
4657
+ #: extensions/email-notifications/classes/Notifications.php:1835, extensions/email-notifications/classes/Notifications.php:1893, extensions/email-notifications/classes/Notifications.php:1913, extensions/external-db/classes/Mirroring.php:188, extensions/external-db/classes/Settings.php:1307
4658
  msgid "Disable"
4659
  msgstr ""
4660
 
4661
+ #: extensions/email-notifications/classes/Notifications.php:1838, extensions/email-notifications/classes/Notifications.php:1916
4662
  msgid "Apply"
4663
  msgstr ""
4664
 
4665
+ #: extensions/email-notifications/classes/Notifications.php:1846, extensions/email-notifications/classes/Notifications.php:1857, extensions/reports/inc/wsal-reporting-view.inc.php:735
4666
  msgid "Select All"
4667
  msgstr ""
4668
 
4669
+ #: extensions/email-notifications/classes/Notifications.php:1883
4670
  msgid "Select"
4671
  msgstr ""
4672
 
4673
+ #: extensions/email-notifications/classes/Notifications.php:1887, extensions/email-notifications/classes/Notifications.php:1889
4674
  msgid "Edit this notification"
4675
  msgstr ""
4676
 
4677
+ #: extensions/email-notifications/classes/Notifications.php:1889
4678
  msgid "Edit"
4679
  msgstr ""
4680
 
4681
+ #: extensions/email-notifications/classes/Notifications.php:1895
4682
  msgid "Enable this notification"
4683
  msgstr ""
4684
 
4685
+ #: extensions/email-notifications/classes/Notifications.php:1893
4686
  msgid "Disable this notification"
4687
  msgstr ""
4688
 
4689
+ #: extensions/email-notifications/classes/Notifications.php:1899
4690
  msgid "Delete this notification"
4691
  msgstr ""
4692
 
4693
+ #: extensions/email-notifications/classes/Notifications.php:1902
4694
  msgid "Send Test Email"
4695
  msgstr ""
4696
 
4697
+ #: extensions/email-notifications/classes/Notifications.php:1903
4698
  msgid "Send Test SMS"
4699
  msgstr ""
4700
 
4701
+ #: extensions/email-notifications/classes/Notifications.php:1974
4702
  msgid "You can modify the default notification email template from here."
4703
  msgstr ""
4704
 
4705
+ #: extensions/email-notifications/classes/Notifications.php:1976
4706
  msgid "This is the default template. You can override this default template with notification specific template which you can modify when using the Trigger Builder."
4707
  msgstr ""
4708
 
4709
+ #: extensions/email-notifications/classes/Notifications.php:1970
4710
  msgid "You can modify the default notification SMS template from here."
4711
  msgstr ""
4712
 
4713
+ #: extensions/email-notifications/classes/Notifications.php:1972
4714
  msgid "This is the default template for SMS notifications. The maximum number of characters for a SMS is 160, so if you configure longer notifications you will be charged for multiple SMS notifications."
4715
  msgstr ""
4716
 
4717
+ #: extensions/email-notifications/classes/Notifications.php:2012
4718
  msgid "Subject"
4719
  msgstr ""
4720
 
4721
+ #: extensions/email-notifications/classes/Notifications.php:2017
4722
  msgid "Body"
4723
  msgstr ""
4724
 
4725
+ #: extensions/email-notifications/classes/Notifications.php:2042
4726
  msgid "HTML is accepted."
4727
  msgstr ""
4728
 
4729
+ #: extensions/email-notifications/classes/Notifications.php:2043
4730
  msgid "Available template tags:"
4731
  msgstr ""
4732
 
4733
+ #: extensions/email-notifications/classes/Notifications.php:2065
4734
  msgid "Shorten URLs"
4735
  msgstr ""
4736
 
4737
+ #: extensions/email-notifications/classes/Notifications.php:2070
4738
  msgid "Shorten URLs with Bit.ly"
4739
  msgstr ""
4740
 
4741
+ #: extensions/email-notifications/classes/Notifications.php:2073
4742
  msgid "Bit.ly Access Token"
4743
  msgstr ""
4744
 
4745
  #. translators: Bit.ly documentation hyperlink
4746
+ #: extensions/email-notifications/classes/Notifications.php:2078
4747
  msgid "The URL shortener works for URLs in the {message} variable and will not shorten the URL of the website in the variable {site}. Shorten all URLs in the message using the %s."
4748
  msgstr ""
4749
 
4750
+ #: extensions/email-notifications/classes/Notifications.php:2078
4751
  msgid "Bit.ly URL Shortener API"
4752
  msgstr ""
4753
 
4754
+ #: extensions/email-notifications/classes/Notifications.php:2120
4755
  msgid "Template successfully saved."
4756
  msgstr ""
4757
 
4758
+ #: extensions/email-notifications/classes/Notifications.php:2118
4759
  msgid "Template could not be saved."
4760
  msgstr ""
4761
 
4762
+ #: extensions/email-notifications/classes/Notifications.php:2238, extensions/email-notifications/classes/Notifications.php:2344
4763
  msgid "You do not have sufficient permissions to perform this test."
4764
  msgstr ""
4765
 
4766
+ #: extensions/email-notifications/classes/Notifications.php:2249, extensions/email-notifications/classes/Notifications.php:2350
4767
  msgid "Nonce verification failed. Please refresh and try again."
4768
  msgstr ""
4769
 
4770
+ #: extensions/email-notifications/classes/Notifications.php:2270
4771
  msgid "Email address is invalid."
4772
  msgstr ""
4773
 
4774
+ #: extensions/email-notifications/classes/Notifications.php:2266
4775
  msgid "Test email notification from the WP Activity Log plugin."
4776
  msgstr ""
4777
 
4778
+ #: extensions/email-notifications/classes/Notifications.php:2267
4779
  msgid "This is a test email notification sent with the WP Activity Log plugin."
4780
  msgstr ""
4781
 
4782
+ #: extensions/email-notifications/classes/Notifications.php:2280
4783
  msgid "Phone number is invalid."
4784
  msgstr ""
4785
 
4786
+ #: extensions/email-notifications/classes/Notifications.php:2277
4787
  msgid "This is a test SMS notification sent with the WP Activity Log plugin."
4788
  msgstr ""
4789
 
4790
  #. translators: Support email hyperlink
4791
+ #: extensions/email-notifications/classes/Notifications.php:2304
4792
  msgid "There are some problems sending the test email / SMS. Please contact us on %s to assist you with this problem."
4793
  msgstr ""
4794
 
4795
+ #: extensions/email-notifications/classes/Notifications.php:2301, extensions/email-notifications/classes/Notifications.php:2396
4796
  msgid "There was a problem sending the SMS. Below is the error we got back from the SMS provider. Please contact us on %s if you need assistance with this issue."
4797
  msgstr ""
4798
 
4799
+ #: extensions/email-notifications/classes/Notifications.php:2292
4800
  msgid "Email / SMS sent successfully."
4801
  msgstr ""
4802
 
4803
+ #: extensions/email-notifications/classes/Notifications.php:2289, extensions/email-notifications/classes/Notifications.php:2398
4804
  msgid "SMS sent successfully."
4805
  msgstr ""
4806
 
4807
+ #: extensions/email-notifications/classes/Notifications.php:2286, extensions/email-notifications/classes/Notifications.php:2377
4808
  msgid "Email sent successfully."
4809
  msgstr ""
4810
 
4811
+ #: extensions/email-notifications/classes/Notifications.php:2404
4812
  msgid "Unknown notification type."
4813
  msgstr ""
4814
 
4815
+ #: extensions/email-notifications/classes/Notifications.php:2401
4816
  msgid "There are some problems sending the test SMS. Please contact us on %s to assist you with this problem."
4817
  msgstr ""
4818
 
4819
+ #: extensions/email-notifications/classes/Notifications.php:2393
4820
  msgid "Mobile number is not set for this notification."
4821
  msgstr ""
4822
 
4823
+ #: extensions/email-notifications/classes/Notifications.php:2380
4824
  msgid "There are some problems sending the test email. Please contact us on %s to assist you with this problem."
4825
  msgstr ""
4826
 
4827
+ #: extensions/email-notifications/classes/Notifications.php:2360
4828
  msgid "Unknown notification."
4829
  msgstr ""
4830
 
4831
+ #: extensions/email-notifications/classes/Notifier.php:756, extensions/reports/classes/Common.php:502
4832
  msgid "View the Forum in editor"
4833
  msgstr ""
4834
 
4835
+ #: extensions/email-notifications/classes/Notifier.php:759, extensions/reports/classes/Common.php:505
4836
  msgid "View the Topic in editor"
4837
  msgstr ""
4838
 
4839
+ #: extensions/email-notifications/classes/Notifier.php:941
4840
  msgid "Contact us on support@wpsecurityauditlog.com for assistance"
4841
  msgstr ""
4842
 
5233
  msgid "Successfully connected to Papertrail App."
5234
  msgstr ""
5235
 
5236
+ #: extensions/external-db/classes/Connections.php:804, extensions/external-db/classes/Connections.php:1014, extensions/external-db/classes/Settings.php:1098, extensions/external-db/classes/Settings.php:1066
5237
  msgid "Successfully connected to database."
5238
  msgstr ""
5239
 
5261
  msgid "Frequency"
5262
  msgstr ""
5263
 
5264
+ #: extensions/external-db/classes/Mirroring.php:164, extensions/external-db/classes/Mirroring.php:401, extensions/external-db/classes/Settings.php:885
5265
  msgid "15 minutes"
5266
  msgstr ""
5267
 
5268
+ #: extensions/external-db/classes/Mirroring.php:167, extensions/external-db/classes/Mirroring.php:402, extensions/external-db/classes/Settings.php:888
5269
  msgid "1 hour"
5270
  msgstr ""
5271
 
5272
+ #: extensions/external-db/classes/Mirroring.php:170, extensions/external-db/classes/Mirroring.php:403, extensions/external-db/classes/Settings.php:891
5273
  msgid "6 hours"
5274
  msgstr ""
5275
 
5276
+ #: extensions/external-db/classes/Mirroring.php:173, extensions/external-db/classes/Mirroring.php:404, extensions/external-db/classes/Settings.php:894
5277
  msgid "12 hours"
5278
  msgstr ""
5279
 
5280
+ #: extensions/external-db/classes/Mirroring.php:176, extensions/external-db/classes/Mirroring.php:405, extensions/external-db/classes/Settings.php:897
5281
  msgid "24 hours"
5282
  msgstr ""
5283
 
5374
  msgid "Connection"
5375
  msgstr ""
5376
 
5377
+ #: extensions/external-db/classes/Mirroring.php:373, extensions/external-db/classes/Settings.php:1132
5378
  msgid "Select a connection"
5379
  msgstr ""
5380
 
5488
  msgid "Save & Test Changes"
5489
  msgstr ""
5490
 
5491
+ #: extensions/external-db/classes/Settings.php:545, extensions/external-db/classes/Settings.php:752
5492
  msgid "Test Connection"
5493
  msgstr ""
5494
 
5552
  msgid "Once you configure archiving these data retention settings will be used instead of the ones configured in the plugin's general settings."
5553
  msgstr ""
5554
 
5555
+ #: extensions/external-db/classes/Settings.php:753
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5556
  msgid "Execute Archiving Now"
5557
  msgstr ""
5558
 
5559
+ #: extensions/external-db/classes/Settings.php:756
5560
  msgid "Reset Archiving Settings"
5561
  msgstr ""
5562
 
5563
+ #: extensions/external-db/classes/Settings.php:757
5564
  msgid "Click the button below to disable archiving and reset the settings to no archiving. Note that the archived data will not be deleted."
5565
  msgstr ""
5566
 
5567
+ #: extensions/external-db/classes/Settings.php:758
5568
  msgid "Disable Archiving & Reset Settings"
5569
  msgstr ""
5570
 
5571
+ #: extensions/external-db/classes/Settings.php:874
5572
  msgid "Run the Archiving Process Every"
5573
  msgstr ""
5574
 
5575
+ #: extensions/external-db/classes/Settings.php:903
5576
  msgid "Stop Archiving"
5577
  msgstr ""
5578
 
5579
+ #: extensions/external-db/classes/Settings.php:1004
5580
  msgid "Attention!"
5581
  msgstr ""
5582
 
5583
  #. translators: %1$s: Alerts Pruning Period, %2$s: Alerts Archiving Period
5584
+ #: extensions/external-db/classes/Settings.php:1008
5585
  msgid "The activity log retention setting is configured to delete events older than %1$s. This period should be longer than the configured %2$s archiving period otherwise events will be deleted and not archived."
5586
  msgstr ""
5587
 
5588
+ #: extensions/external-db/classes/Settings.php:1252
5589
  msgid "Resetting..."
5590
  msgstr ""
5591
 
5592
+ #: extensions/external-db/classes/Settings.php:1253
5593
  msgid "Resetting Failed!"
5594
  msgstr ""
5595
 
5596
  #. translators: %d: Number of events.
5597
+ #: extensions/external-db/classes/Settings.php:1255
5598
  msgid " So far %d events have been migrated."
5599
  msgstr ""
5600
 
5601
+ #: extensions/external-db/classes/Settings.php:1256
5602
  msgid "WordPress security events successfully migrated to WordPress database."
5603
  msgstr ""
5604
 
5605
+ #: extensions/external-db/classes/Settings.php:1257
5606
  msgid "WordPress security events successfully migrated to the external database."
5607
  msgstr ""
5608
 
5609
+ #: extensions/external-db/classes/Settings.php:1258
5610
  msgid "No events to migrate."
5611
  msgstr ""
5612
 
5613
+ #: extensions/external-db/classes/Settings.php:1297
5614
  msgid "Mirror not found."
5615
  msgstr ""
5616
 
5617
+ #: extensions/reports/classes/Common.php:714, extensions/reports/classes/Common.php:718, extensions/reports/classes/Common.php:722, extensions/reports/classes/Common.php:726, extensions/reports/classes/Common.php:730, extensions/reports/classes/Common.php:734, extensions/reports/classes/Common.php:738, extensions/reports/classes/Common.php:742, extensions/reports/classes/Common.php:746, extensions/reports/classes/Common.php:750, extensions/reports/classes/Common.php:754
5618
  msgid "Internal error. <code>%s</code> key was not found."
5619
  msgstr ""
5620
 
5621
+ #: extensions/reports/classes/Common.php:778, extensions/reports/classes/Common.php:1603
5622
  msgid "Please specify at least one Alert Group or specify an Alert Code."
5623
  msgstr ""
5624
 
5625
+ #: extensions/reports/classes/Common.php:783
5626
  msgid "Internal Error: Could not detect the type of the report to generate."
5627
  msgstr ""
5628
 
5629
+ #: extensions/reports/classes/Common.php:893, extensions/reports/classes/Common.php:927, extensions/reports/classes/Common.php:972, extensions/reports/classes/Common.php:990, extensions/reports/classes/Common.php:1804
5630
  msgid "There are no alerts that match your filtering criteria. Please try a different set of rules."
5631
  msgstr ""
5632
 
5633
+ #: extensions/reports/classes/Common.php:975, extensions/reports/classes/Common.php:993, extensions/reports/classes/Common.php:1807
5634
  msgid "Error: The <strong>%s</strong> path is not accessible."
5635
  msgstr ""
5636
 
5637
+ #: extensions/reports/classes/Common.php:1257, extensions/reports/classes/Common.php:1705
5638
  msgid "%1$s - Website %2$s"
5639
  msgstr ""
5640
 
5641
+ #: extensions/reports/classes/Common.php:1260, extensions/reports/classes/Common.php:1708
5642
  msgid "Week number %1$s - Website %2$s"
5643
  msgstr ""
5644
 
5645
+ #: extensions/reports/classes/Common.php:1263, extensions/reports/classes/Common.php:1711
5646
  msgid "Month %1$s %2$s- Website %3$s"
5647
  msgstr ""
5648
 
5649
+ #: extensions/reports/classes/Common.php:1266, extensions/reports/classes/Common.php:1714
5650
  msgid "Quarter %1$s - Website %2$s"
5651
  msgstr ""
5652
 
5653
+ #: extensions/reports/classes/Common.php:1281, extensions/reports/classes/Common.php:1723
5654
  msgid " - %s Email Report"
5655
  msgstr ""
5656
 
5657
+ #: extensions/reports/classes/Common.php:1575
5658
  msgid "Internal Error. Could not retrieve the alerts from the main plugin."
5659
  msgstr ""
5660
 
5661
+ #: extensions/reports/classes/HtmlReportGenerator.php:108, extensions/reports/classes/HtmlReportGenerator.php:359
5662
  msgid "WP Activity Log Reporter"
5663
  msgstr ""
5664
 
5670
  msgid "website"
5671
  msgstr ""
5672
 
5673
+ #: extensions/reports/classes/HtmlReportGenerator.php:150, extensions/reports/classes/HtmlReportGenerator.php:368
5674
  msgid "Report Details:"
5675
  msgstr ""
5676
 
5677
+ #: extensions/reports/classes/HtmlReportGenerator.php:151, extensions/reports/classes/HtmlReportGenerator.php:369
5678
  msgid "Generated on:"
5679
  msgstr ""
5680
 
5681
+ #: extensions/reports/classes/HtmlReportGenerator.php:152, extensions/reports/classes/HtmlReportGenerator.php:370
5682
  msgid "Generated by:"
5683
  msgstr ""
5684
 
5702
  msgid "Alert Groups"
5703
  msgstr ""
5704
 
5705
+ #: extensions/reports/classes/HtmlReportGenerator.php:163, extensions/reports/classes/HtmlReportGenerator.php:374
5706
  msgid "Alert Code(s)"
5707
  msgstr ""
5708
 
5709
+ #: extensions/reports/classes/HtmlReportGenerator.php:164, extensions/reports/classes/HtmlReportGenerator.php:375
5710
  msgid "Start date"
5711
  msgstr ""
5712
 
5713
+ #: extensions/reports/classes/HtmlReportGenerator.php:165, extensions/reports/classes/HtmlReportGenerator.php:376
5714
  msgid "End date"
5715
  msgstr ""
5716
 
5722
  msgid "Post Status"
5723
  msgstr ""
5724
 
5725
+ #: extensions/reports/classes/HtmlReportGenerator.php:176, extensions/reports/classes/HtmlReportGenerator.php:345
5726
  msgid "From the beginning"
5727
  msgstr ""
5728
 
5729
+ #: extensions/reports/classes/HtmlReportGenerator.php:221, extensions/reports/classes/HtmlReportGenerator.php:371
5730
  msgid "Criteria"
5731
  msgstr ""
5732
 
5733
+ #: extensions/reports/classes/HtmlReportGenerator.php:387
5734
  msgid "Results"
5735
  msgstr ""
5736
 
6287
  msgid "Users sessions termination is in progress. Please wait..."
6288
  msgstr ""
6289
 
6290
+ #: extensions/user-sessions/classes/Views.php:429, extensions/reports/classes/Views/Main.php:744
6291
  msgid "You do not have sufficient permissions."
6292
  msgstr ""
6293
 
6295
  msgid "No sessions."
6296
  msgstr ""
6297
 
6298
+ #: extensions/user-sessions/classes/Views.php:479
6299
  msgid "Session destroyed."
6300
  msgstr ""
6301
 
6302
+ #: extensions/user-sessions/classes/Views.php:487
6303
  msgid "User session data is not set."
6304
  msgstr ""
6305
 
6306
+ #: extensions/user-sessions/classes/Views.php:503, extensions/user-sessions/classes/Views.php:583
6307
  msgid "User do not have sufficient permissions."
6308
  msgstr ""
6309
 
6310
+ #: extensions/user-sessions/classes/Views.php:561
6311
  msgid "Users offset is not set."
6312
  msgstr ""
6313
 
6314
+ #: extensions/user-sessions/classes/Views.php:554, extensions/user-sessions/classes/Views.php:545
6315
  msgid "Sessions destroyed!"
6316
  msgstr ""
6317
 
6318
+ #: extensions/user-sessions/classes/Views.php:593
6319
  msgid "Nonce check failed."
6320
  msgstr ""
6321
 
6327
  msgid "Reports"
6328
  msgstr ""
6329
 
6330
+ #: extensions/reports/classes/Views/Main.php:669
6331
  msgid " Generating reports. Please do not close this window"
6332
  msgstr ""
6333
 
6334
+ #: extensions/reports/classes/Views/Main.php:682
6335
  msgid "To generate a report or configure automated scheduled report please contact the administrator of this multisite network on "
6336
  msgstr ""
6337
 
6338
+ #: extensions/reports/classes/Views/Main.php:700
6339
  msgid "The %s directory which the Reports plugin uses to create reports in was either not found or is not accessible."
6340
  msgstr ""
6341
 
6342
+ #: extensions/reports/classes/Views/Main.php:704
6343
  msgid "In order for the plugin to function, the directory %1$s must be created and the plugin should have access to write to this directory, so please configure the following permissions: 0755. If you have any questions or need further assistance please %2$s"
6344
  msgstr ""
6345
 
6411
  msgid "Select a user role to filter"
6412
  msgstr ""
6413
 
6414
+ #: extensions/user-sessions/classes/Sensors/UserSessionsTracking.php:287, extensions/user-sessions/classes/View/Options/Policies.php:234
6415
  msgid "ERROR: Your session was blocked with the <a href=\"https://en-gb.wordpress.org/plugins/wp-security-audit-log\" target=\"_blank\">WP Activity Log plugin</a> because there is already another user logged in with the same username. Please contact the site administrator for more information."
6416
  msgstr ""
6417
 
readme.txt CHANGED
@@ -6,7 +6,7 @@ License URI: https://www.gnu.org/licenses/gpl.html
6
  Tags: activity log, wordpress activity logs, security audit log, audit log, user tracking, security event log, audit trail, wordpress security monitor, wordpress admin, wordpress admin monitoring, user activity, admin, multisite, SMS alerts, wordpress monitoring, email notification, wordpress email alerts, tracking, user tracking, user activity report, wordpress audit trail
7
  Requires at least: 3.6
8
  Tested up to: 5.5
9
- Stable tag: 4.1.4
10
  Requires PHP: 5.5
11
 
12
  The #1 user-rated activity log plugin. Keep a comprehensive log of the changes that happen on your site with this easy to use plugin.
@@ -196,7 +196,7 @@ Please refer to our [support pages](https://wpactivitylog.com/support/?utm_sourc
196
  1. The WordPress activity logs from where the site administrator can see all the user and site changes.
197
  2. See who is logged in to your WordPress and manage users sessions with [Users Sessions Management](https://www.wpsecurityauditlog.com/premium-features/wordpress-users-sessions-management-tools/?utm_source=wordpress.org&utm_medium=referral&utm_campaign=WSAL&utm_content=plugin+repos+description)
198
  3. The plugin settings from where site administrator can configure generic plugin settings such as [reverse proxy support](https://www.wpsecurityauditlog.com/support-documentation/support-reverse-proxies-web-application-firewalls/?utm_source=wordpress.org&utm_medium=referral&utm_campaign=WSAL&utm_content=plugin+repos+description), who can manage the plugin etc.
199
- 4. The WordPress audit trail settings from where you can configure automatic pruning of alerts, which timestamp should be used, how many 404 requests should be logged and more.
200
  5. Configuring WordPress email and SMS alerts with the [Email & SMS Notifications module](https://www.wpsecurityauditlog.com/premium-features/email-notifications-wordpress-activity-log/?utm_source=wordpress.org&utm_medium=referral&utm_campaign=WSAL&utm_content=plugin+repos+description)
201
  6. Search in the WordPress activity log with the use filters to fine tune the search results.
202
  7. The Enable/Disable events section from where Administrators can disable or enable activity log events.
@@ -206,67 +206,39 @@ Please refer to our [support pages](https://wpactivitylog.com/support/?utm_sourc
206
 
207
  == Changelog ==
208
 
209
- = 4.1.4 (2020-10-07) =
210
 
211
- Release notes: [WP Activity Log 4.1.4: New activity log for Yoast SEO extenion & improved coverage](https://wpactivitylog.com/wsal-4-1-4/)
212
 
213
  * **New features**
214
- * [Activity Log for Yoast SEO](https://wpactivitylog.com/extensions/yoast-seo-activity-log/) extension.
215
- * Plugin detects plugin updates done via a zip file (new feature in WordPress 5.5)
216
-
217
- * **New Yoast SEO activity log event IDs**
218
- * ID 8826: user has enabled / disabled the Redirect Attachment URLs in the Yoast SEO plugin.
219
- * ID 8827: Usage tracking has been enabled / dsabled.
220
- * ID 8828: The REST API: head endpoint setting was enabled / disabled.
221
- * ID 8829: The social profile URL was added / modified / deleted.
222
- * ID 8830: User changed the taxonomies settings to show in search results.
223
- * ID 8831: Chaged the SEO title template for a taxonomy type.
224
- * ID 8832: Changed the meta description template for a taxonomy type.
225
- * ID 8833: Enabled or disabled the display of Author or Date archives.
226
- * ID 8834: Configured the plugin to show the Author or Date archived in the search results.
227
- * ID 8835: Changed the SEO title template for the Author or Date archive pages.
228
- * ID 8836: Changed the Meta description template for the Author or Date archive pages.
229
- * ID 8837: Enabled / disabled the setting to show SEO settings for specific taxonomy types.
230
-
231
- Refer to the [complete list of activity log event IDs](https://wpactivitylog.com/support/kb/list-wordpress-activity-log-event-ids/) for more detailed information.
232
 
 
 
 
 
 
 
 
 
 
233
  * **Improvements**
234
- * Improved the overall coverage and how events of changes in Yoast SEO plugin and YoastSEO metabox are reported.
235
- * Implemented a single email class that is now used by all email features in the plugin.
236
- * Updated Freemius SDK to the latest version (2.4.0).
237
- * Improved the detection mechanism of installed third party plugins used for the activity log extensions notifications.
238
- * Consolidated all [activity log extensions code](https://github.com/WPWhiteSecurity/wsal-extension-example) - now all third party plugins extensions use the same code.
239
- * Improved the plugin's activation process on multisite network.
240
- * Plugin only shows file changes notifications if the [Website File Changes Monitor](https://www.wpwhitesecurity.com/wordpress-plugins/website-file-changes-monitor/) plugin is installed.
241
- * Plugin prompts user to save unsaved changes in settings page before switching pages.
242
- * Improved plugin & activity log permissions on multisite network.
243
- * System information file updated to retrieve settings from the wp_options table.
244
- * Removed all the obsolete event IDs from the Enable/Disable events section.
245
- * Updated a number of filters/hooks calls that were calling deprecated ones.
246
- * Removed all the obsolete code which was used for the old wp_wsal_options table.
247
- * The handling of disabled event IDs is now done more efficiently, via filters.
248
- * Improved the session db adaptor which was causing errors in specific edge cases.
249
- * Branded the notifications for third party plugins extensions and improved the text.
250
- * Improved the first-time install wizard CSS to correctly display the list of required extensions for third party plugins.
251
- * Removed event ID 2106 (plugin updated post) and ID 8823 (Yoast SEO date snippet) because they were made redundant.
252
- * Moved all remaining bbPress code to the [Activity Log for bbPress](https://wordpress.org/plugins/wp-security-audit-log-add-on-for-bbpress/) extension.
253
- * Added check to prevent identical search filters from being saved.
254
 
255
  * **Bug fixes**
256
- * Removed the old version check from the wp_wsal_options table.
257
- * Reset plugin settings was not deleting all the settings.
258
- * Reports UI was not loading in a mixed content environment.
259
- * Unkown object was reported in event ID 6034 (user purged activity log).
260
- * Custom login page message was not shown in specific edge cases.
261
- * Addressed a number of errors that were appearing during WooCommerce setup.
262
- * List of IP addresses in event ID 1005 (users has multiple logged in sessions) was incorrect.
263
- * Plugin was generating an error when changing the WooCommerce store address on a multisite network.
264
- * Event ID 1000 reported twice on websites using the OptimizeMember plugin.
265
- * Third party plugins detection was not detecting all plugins on multisite network.
266
- * Built-in email notifications couldn't be disabled after they were enabled.
267
- * Notifications to install third party plugin extensions were shown in sub sites on a multisite network.
268
- * Event ID 1000 (user login) was reported even when user was excluded from the logs.
269
- * Data picker obscured by autocomplete in notifications.
270
- * Fixed conflict with MyCred plugin (widget sensor was killing ongoing widget requests).
271
 
272
  Refer to the [complete plugin changelog](https://wpactivitylog.com/support/kb/plugin-changelog/?utm_source=wordpress.org&utm_medium=referral&utm_campaign=WSAL&utm_content=plugin+repos+description) for more detailed information about what was new, improved and fixed in previous versions of the WP Activity Log plugin.
6
  Tags: activity log, wordpress activity logs, security audit log, audit log, user tracking, security event log, audit trail, wordpress security monitor, wordpress admin, wordpress admin monitoring, user activity, admin, multisite, SMS alerts, wordpress monitoring, email notification, wordpress email alerts, tracking, user tracking, user activity report, wordpress audit trail
7
  Requires at least: 3.6
8
  Tested up to: 5.5
9
+ Stable tag: 4.1.5
10
  Requires PHP: 5.5
11
 
12
  The #1 user-rated activity log plugin. Keep a comprehensive log of the changes that happen on your site with this easy to use plugin.
196
  1. The WordPress activity logs from where the site administrator can see all the user and site changes.
197
  2. See who is logged in to your WordPress and manage users sessions with [Users Sessions Management](https://www.wpsecurityauditlog.com/premium-features/wordpress-users-sessions-management-tools/?utm_source=wordpress.org&utm_medium=referral&utm_campaign=WSAL&utm_content=plugin+repos+description)
198
  3. The plugin settings from where site administrator can configure generic plugin settings such as [reverse proxy support](https://www.wpsecurityauditlog.com/support-documentation/support-reverse-proxies-web-application-firewalls/?utm_source=wordpress.org&utm_medium=referral&utm_campaign=WSAL&utm_content=plugin+repos+description), who can manage the plugin etc.
199
+ 4. The WordPress audit trail settings from where you can configure automatic pruning of alerts, which timestamp should be used and more.
200
  5. Configuring WordPress email and SMS alerts with the [Email & SMS Notifications module](https://www.wpsecurityauditlog.com/premium-features/email-notifications-wordpress-activity-log/?utm_source=wordpress.org&utm_medium=referral&utm_campaign=WSAL&utm_content=plugin+repos+description)
201
  6. Search in the WordPress activity log with the use filters to fine tune the search results.
202
  7. The Enable/Disable events section from where Administrators can disable or enable activity log events.
206
 
207
  == Changelog ==
208
 
209
+ = 4.1.5 (2020-11-02) =
210
 
211
+ Release notes: [WP Activity Log 4.1.5: Support for new MainWP settings module & improved coverage](https://wpactivitylog.com/wsal-4-1-5/)
212
 
213
  * **New features**
214
+ * Support for the new settings module in the [Activity Log for MainWP extension](https://wpactivitylog.com/al4mwp-1-6/).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
215
 
216
+ * **New event ID**
217
+ * ID 7012: user changed the network's users and sites registration settings.
218
+
219
+ * **Security fix**
220
+ * SQL Injection in external database module reported by [WP deeply](https://wpdeeply.com/). Thank you for the responsible disclosure.
221
+
222
+ * **Breaking change**
223
+ * Removed detection and logging of requests to non-existing URLs (404s). Event ID 6007 and 6023 no longer used in the plugin. This breaking change resulted in a major performance improvement.
224
+
225
  * **Improvements**
226
+ * Added Event Type and Object in the activity log reports.
227
+ * Improved the coverage of the login / logout detection sensor.
228
+ * Improved format of "hover over pop-ups" used in the activity log viewer (such as the one to exclude a specific event ID).
229
+ * Moved almost all of the remaining WooCommerce sensor code to the [activity log for WooCommerce extension](https://wordpress.org/plugins/wp-activity-log-for-woocommerce/).
230
+ * Improved UX for the front-end sensors settings - options now are available underneath the relevant event ID.
231
+ * Removed redundant code that is now in the [WordPress activity log extensions](https://wpactivitylog.com/extensions/).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
232
 
233
  * **Bug fixes**
234
+ * Sorting of activity log events not retained in following pages when in pagination mode.
235
+ * Users sessions table was not being created when upgrading from the free to the premium editions of the plugin.
236
+ * Link to exclude custom field in event was broken / not adding the custom field to the exclusion list.
237
+ * Changing the category of a post was not being reported (Event ID 2016).
238
+ * Unkown object was reported in event ID 6034 (purged activity log).
239
+ * Changing password via the WooCommerce account page caused session to remain once user logs out.
240
+ * Users could add multiple identical search filters causing a crash.
241
+ * Users not redirected to the correct list of event IDs after installing the activity log for Yoast SEO extension.
242
+ * Install Extension button in events was broken and not triggering the extension installer.
 
 
 
 
 
 
243
 
244
  Refer to the [complete plugin changelog](https://wpactivitylog.com/support/kb/plugin-changelog/?utm_source=wordpress.org&utm_medium=referral&utm_campaign=WSAL&utm_content=plugin+repos+description) for more detailed information about what was new, improved and fixed in previous versions of the WP Activity Log plugin.
wp-security-audit-log.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: http://wpactivitylog.com/
5
  * Description: Identify WordPress security issues before they become a problem. Keep track of everything happening on your WordPress including WordPress users activity. Similar to Windows Event Log and Linux Syslog, WP Activity Log generates a security alert for everything that happens on your WordPress blogs and websites. Use the Activity log viewer included in the plugin to see all the security alerts.
6
  * Author: WP White Security
7
- * Version: 4.1.4
8
  * Text Domain: wp-security-audit-log
9
  * Author URI: http://www.wpwhitesecurity.com/
10
  * License: GPL2
@@ -47,7 +47,7 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
47
  *
48
  * @var string
49
  */
50
- public $version = '4.1.4';
51
 
52
  /**
53
  * Plugin constants.
@@ -140,13 +140,6 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
140
  */
141
  public $allowed_html_tags = array();
142
 
143
- /**
144
- * Load WSAL on Front-end?
145
- *
146
- * @var boolean
147
- */
148
- public $load_for_404s = null;
149
-
150
  /**
151
  * Standard singleton pattern.
152
  * WARNING! To ensure the system always works as expected, AVOID using this method.
@@ -168,14 +161,12 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
168
  public function __construct() {
169
  $bootstrap_hook = [ 'plugins_loaded', 9 ];
170
 
171
- // Frontend requests should only log for certain 404 requests.
172
- // For that to happen, we need to delay until template_redirect.
173
  if ( self::is_frontend() ) {
174
  // to track sessions on frontend logins we need to attach the
175
  // the tracker and all the interfaces and classes it depends on.
176
  add_action( $bootstrap_hook[0], array( $this, 'maybe_add_sessions_trackers_early' ), $bootstrap_hook[1] );
177
  $bootstrap_hook = [ 'wp_loaded', 0 ];
178
- add_action( 'wp', array( $this, 'setup_404' ) );
179
  }
180
 
181
  add_action( $bootstrap_hook[0], array( $this, 'setup' ), $bootstrap_hook[1] );
@@ -188,6 +179,7 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
188
 
189
  // Add custom schedules for WSAL early otherwise they won't work.
190
  add_filter( 'cron_schedules', array( $this, 'recurring_schedules' ) );
 
191
  // make the options helper class available.
192
  $this->include_options_helper();
193
  }
@@ -309,33 +301,6 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
309
  && ! self::is_admin_blocking_plugins_support_enabled();
310
  }
311
 
312
- /**
313
- * Decides if the plugin should run for 404 events on `wp` hook
314
- * IF not already loaded on `wp_loaded` hook for frontend request.
315
- */
316
- public function setup_404() {
317
- $admin_blocking_plugins_support_enabled = $this->is_admin_blocking_plugins_support_enabled();
318
- if (!$admin_blocking_plugins_support_enabled) {
319
- // If a user is logged in OR if the frontend sensors are allowed to load, then bail.
320
- if ( is_user_logged_in() || self::should_load_frontend() ) {
321
- return;
322
- }
323
-
324
- // If the current page is not 404 OR if the loading of 404 frontend sensor is not allowed, then bail.
325
- if ( ! is_404() || ! $this->load_for_404s() ) {
326
- return;
327
- }
328
- }
329
-
330
- if ($admin_blocking_plugins_support_enabled) {
331
- // setup freemius in stealth mode
332
- $this->init_freemius();
333
- }
334
-
335
- // Otherwise load WSAL on wp hook.
336
- $this->setup();
337
- }
338
-
339
  /**
340
  * Decides if the plugin should run, sets up constants, includes, inits hooks, etc.
341
  *
@@ -369,19 +334,14 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
369
  return true;
370
  }
371
 
372
- // If this is a frontend request, it's a 404, and 404 logging is disabled.
373
- if ( self::is_frontend() ) {
374
- if ( is_404() ) {
375
- if ( ! $this->load_for_404s() ) {
376
- // This is a frontend request, and it's a 404, but we are not logging 404s.
377
- return false;
378
- }
379
- } elseif ( ! is_user_logged_in() && ! self::should_load_frontend() ) {
380
- // This is not a 404, and the user isn't logged in, and we aren't logging visitor events.
381
- return false;
382
- }
383
  }
384
 
 
 
385
  // If this is a rest API request and the user is not logged in, bail.
386
  if ( self::is_rest_api() && ! is_user_logged_in() ) {
387
  return false;
@@ -395,10 +355,13 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
395
  *
396
  * @return bool
397
  */
398
- public static function should_load_frontend() {
399
- $frontend_events = WSAL_Settings::get_frontend_events();
400
- return ! empty( $frontend_events['register'] ) || ! empty( $frontend_events['login'] ) || ! empty( $frontend_events['woocommerce'] );
401
- }
 
 
 
402
 
403
  /**
404
  * Include Plugin Files.
@@ -463,6 +426,10 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
463
  require_once 'classes/Adapters/OccurrenceInterface.php';
464
  require_once 'classes/Adapters/QueryInterface.php';
465
 
 
 
 
 
466
  // Only include these if we are in multisite envirnoment.
467
  if ( $this->isMultisite() ) {
468
  require_once 'classes/Multisite/NetworkWide/TrackerInterface.php';
@@ -521,17 +488,23 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
521
 
522
  $this->init_freemius();
523
 
 
524
  if ( is_admin() ) {
525
  $plugin_installer_ajax = new WSAL_PluginInstallerAction();
526
  $plugin_installer_ajax->register();
527
 
528
  $yoast_seo_addon = new WSAL_YoastSeoExtension;
529
  $bbpress_addon = new WSAL_BBPressExtension;
530
- $woocommerce_addon = new WSAL_WooCommerceExtension;
531
  $wpforms_addon = new WSAL_WPFormsExtension;
532
  // Comment out till ready.
533
  //$gravityforms_addon = new WSAL_GravityFormsExtension;
534
  }
 
 
 
 
 
 
535
  }
536
 
537
  /**
@@ -562,10 +535,13 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
562
  require_once ABSPATH . 'wp-admin/includes/plugin.php';
563
  }
564
 
 
 
 
 
565
  // Additional checks for our 3rd party extensions.
566
  if ( class_exists( 'WSAL_PluginInstallAndActivate' ) ) {
567
  $our_plugins = array_column( WSAL_PluginInstallAndActivate::get_installable_plugins(), 'plugin_basename' );
568
-
569
  // Check if we are dealing with one of our extensions.
570
  if ( in_array( basename( $plugin ), $our_plugins, true ) ) {
571
  // This IS one of our extensions, so lets check a little deeper as folder
@@ -680,39 +656,11 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
680
  wsal_freemius()->add_filter( 'show_trial', '__return_false' );
681
  wsal_freemius()->add_filter( 'opt_in_error_message', array( $this, 'limited_license_activation_error' ), 10, 1 );
682
  wsal_freemius()->add_action( 'after_account_plan_sync', array( $this, 'sync_premium_freemius' ), 10, 1 );
 
683
  }
684
  }
685
  }
686
 
687
- /**
688
- * Check if WSAL should be loaded for logged-in 404s.
689
- *
690
- * @since 3.3
691
- *
692
- * @return boolean
693
- */
694
- public function load_for_404s() {
695
- if ( null === $this->load_for_404s ) {
696
- if ( ! is_user_logged_in() ) {
697
- // Get the frontend sensors setting.
698
- $frontend_events = WSAL_Settings::get_frontend_events();
699
-
700
- // This overrides the setting.
701
- $this->load_for_404s = ! empty( $frontend_events['system'] ) ? true : false;
702
- } else {
703
- // We are doing a raw lookup here because The WSAL options system might not be loaded.
704
- $this->load_for_404s = self::raw_alert_is_enabled( 6007 );
705
- }
706
-
707
- if ($this->is_admin_blocking_plugins_support_enabled()) {
708
- // also load if the support for admin blocking plugins is enabled
709
- $this->load_for_404s = true;
710
- }
711
- }
712
-
713
- return $this->load_for_404s;
714
- }
715
-
716
  /**
717
  * Whether visitor events should be logged.
718
  *
@@ -779,7 +727,52 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
779
  $info = false;
780
  }
781
  break;
782
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
783
  default:
784
  break;
785
  }
@@ -1176,13 +1169,14 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
1176
  die();
1177
  }
1178
 
1179
- $fields = $this->GetGlobalSetting( 'excluded-custom' );
1180
- if ( isset( $fields ) && '' != $fields ) {
1181
- $fields .= ',' . esc_html( $post_array['notice'] );
1182
- } else {
1183
- $fields = esc_html( $post_array['notice'] );
1184
  }
1185
- $this->SetGlobalSetting( 'excluded-custom', $fields );
 
 
1186
 
1187
  // Exclude object link.
1188
  $exclude_objects_link = add_query_arg(
@@ -1190,9 +1184,15 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
1190
  'page' => 'wsal-settings',
1191
  'tab' => 'exclude-objects',
1192
  ),
1193
- admin_url( 'admin.php' )
 
 
 
 
 
 
 
1194
  );
1195
- echo wp_sprintf( '<p>' . __( 'Custom Field %1$s is no longer being monitored.<br />Enable the monitoring of this custom field again from the', 'wp-security-audit-log' ) . ' <a href="%2$s">%3$s</a>%4$s</p>', $post_array['notice'], $exclude_objects_link, __( 'Excluded Objects', 'wp-security-audit-log' ), __( ' tab in the plugin settings', 'wp-security-audit-log' ) );
1196
  die;
1197
  }
1198
 
@@ -1227,6 +1227,7 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
1227
  $s_alerts = esc_html( $post_array['code'] );
1228
  }
1229
  $this->SetGlobalSetting( 'disabled-alerts', $s_alerts );
 
1230
  echo wp_sprintf( '<p>' . __( 'Alert %1$s is no longer being monitored.<br /> %2$s', 'wp-security-audit-log' ) . '</p>', esc_html( $post_array['code'] ), __( 'You can enable this alert again from the Enable/Disable Alerts node in the plugin menu.', 'wp-security-audit-log' ) );
1231
  die;
1232
  }
@@ -1292,18 +1293,6 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
1292
  $pruning_date = $this->settings()->GetPruningDate();
1293
  $this->settings()->SetPruningDate( $pruning_date );
1294
 
1295
- // If old setting is empty enable 404 logging by default.
1296
- $log_404 = $this->GetGlobalSetting( 'log-404' );
1297
- if ( false === $log_404 ) {
1298
- $this->SetGlobalBooleanSetting( 'log-404', true );
1299
- }
1300
-
1301
- // If old setting is empty enable 404 purge log by default.
1302
- $purge_log_404 = $this->GetGlobalSetting( 'purge-404-log' );
1303
- if ( false === $purge_log_404 ) {
1304
- $this->SetGlobalBooleanSetting( 'purge-404-log', true );
1305
- }
1306
-
1307
  // Load translations.
1308
  load_plugin_textdomain( 'wp-security-audit-log', false, basename( dirname( __FILE__ ) ) . '/languages/' );
1309
  }
@@ -1350,12 +1339,7 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
1350
 
1351
  // On first install this won't be loaded because not premium, add it
1352
  // now so it installs.
1353
- if ( file_exists( plugin_dir_path( __FILE__ ) . 'extensions/user-sessions/user-sessions.php' ) ) {
1354
- $this->maybe_add_sessions_trackers_early();
1355
- require_once plugin_dir_path( __FILE__ ) . 'extensions/user-sessions/user-sessions.php';
1356
- $sessions = new WSAL_UserSessions_Plugin();
1357
- $sessions->require_adapter_classes();
1358
- }
1359
 
1360
  // run any installs.
1361
  self::getConnector()->installAll();
@@ -1456,7 +1440,7 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
1456
 
1457
  // remove obsolete options from the database
1458
  if ( version_compare( $new_version, '4.1.4', '>=' ) ) {
1459
- $this->DeleteSettingByName( WpSecurityAuditLog::OPTIONS_PREFIX . '_addon_available_notice_dismissed' );
1460
 
1461
  // Remove old file scanning options.
1462
  global $wpdb;
@@ -1467,6 +1451,34 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
1467
  }
1468
  }
1469
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1470
  }
1471
  }
1472
 
@@ -1529,7 +1541,7 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
1529
  );
1530
  $s = get_option( 'wpph_plugin_settings' );
1531
  $this->settings()->SetViewPerPage( max( $s->showEventsViewList, 5 ) );
1532
- $this->settings()->SetWidgetsEnabled( ! ! $s->showDW );
1533
  }
1534
 
1535
  /**
@@ -1750,6 +1762,7 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
1750
  * Do we have an existing installation? This only applies for version 1.0 onwards.
1751
  *
1752
  * @return boolean
 
1753
  */
1754
  public function IsInstalled() {
1755
  return self::getConnector()->isInstalled();
@@ -1759,6 +1772,7 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
1759
  * Whether the old plugin was present or not.
1760
  *
1761
  * @return boolean
 
1762
  */
1763
  public function CanMigrate() {
1764
  return self::getConnector()->canMigrate();
@@ -2088,13 +2102,14 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
2088
  }
2089
 
2090
  /**
 
2091
  * @return bool
2092
  */
2093
  private static function is_admin_blocking_plugins_support_enabled() {
2094
 
2095
  // only meant for 404 pages, but may run before is_404 can be used
2096
- $is_404 = did_action('wp') ? is_404() : true;
2097
- if (!$is_404) {
2098
  return false;
2099
  }
2100
 
@@ -2106,6 +2121,8 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
2106
  * We assume settings have already been migrated (in version 4.1.3) to WordPress options table. We might
2107
  * miss some 404 events until the plugin upgrade runs, but that is a very rare edge case. The same applies
2108
  * to loading of 'admin-blocking-plugins-support' option further down.
 
 
2109
  */
2110
  $options_helper = new \WSAL\Helpers\Options( self::OPTIONS_PREFIX );
2111
  $is_stealth_mode = $options_helper->get_option_value('mwp-child-stealth-mode', 'no');
@@ -2118,6 +2135,46 @@ if ( ! function_exists( 'wsal_freemius' ) ) {
2118
  // allow if the admin blocking support settings is active
2119
  return ('yes' === $options_helper->get_option_value( 'admin-blocking-plugins-support', 'no' ) );
2120
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2121
  }
2122
 
2123
  // Begin load sequence.
4
  * Plugin URI: http://wpactivitylog.com/
5
  * Description: Identify WordPress security issues before they become a problem. Keep track of everything happening on your WordPress including WordPress users activity. Similar to Windows Event Log and Linux Syslog, WP Activity Log generates a security alert for everything that happens on your WordPress blogs and websites. Use the Activity log viewer included in the plugin to see all the security alerts.
6
  * Author: WP White Security
7
+ * Version: 4.1.5
8
  * Text Domain: wp-security-audit-log
9
  * Author URI: http://www.wpwhitesecurity.com/
10
  * License: GPL2
47
  *
48
  * @var string
49
  */
50
+ public $version = '4.1.5';
51
 
52
  /**
53
  * Plugin constants.
140
  */
141
  public $allowed_html_tags = array();
142
 
 
 
 
 
 
 
 
143
  /**
144
  * Standard singleton pattern.
145
  * WARNING! To ensure the system always works as expected, AVOID using this method.
161
  public function __construct() {
162
  $bootstrap_hook = [ 'plugins_loaded', 9 ];
163
 
164
+ // plugin should be initialised later in the WordPress bootstrap process to minimize overhead
 
165
  if ( self::is_frontend() ) {
166
  // to track sessions on frontend logins we need to attach the
167
  // the tracker and all the interfaces and classes it depends on.
168
  add_action( $bootstrap_hook[0], array( $this, 'maybe_add_sessions_trackers_early' ), $bootstrap_hook[1] );
169
  $bootstrap_hook = [ 'wp_loaded', 0 ];
 
170
  }
171
 
172
  add_action( $bootstrap_hook[0], array( $this, 'setup' ), $bootstrap_hook[1] );
179
 
180
  // Add custom schedules for WSAL early otherwise they won't work.
181
  add_filter( 'cron_schedules', array( $this, 'recurring_schedules' ) );
182
+
183
  // make the options helper class available.
184
  $this->include_options_helper();
185
  }
301
  && ! self::is_admin_blocking_plugins_support_enabled();
302
  }
303
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
304
  /**
305
  * Decides if the plugin should run, sets up constants, includes, inits hooks, etc.
306
  *
334
  return true;
335
  }
336
 
337
+ // check conditions for frontend
338
+ if ( self::is_frontend() && ! is_user_logged_in() && ! self::should_load_frontend() ) {
339
+ // user isn't logged in, and we aren't logging visitor events on front-end
340
+ return false;
 
 
 
 
 
 
 
341
  }
342
 
343
+ // other contexts/scenarios
344
+
345
  // If this is a rest API request and the user is not logged in, bail.
346
  if ( self::is_rest_api() && ! is_user_logged_in() ) {
347
  return false;
355
  *
356
  * @return bool
357
  */
358
+ public static function should_load_frontend() {
359
+ $frontend_events = WSAL_Settings::get_frontend_events();
360
+ $should_load = ! empty( $frontend_events['register'] ) || ! empty( $frontend_events['login'] ) || ! empty( $frontend_events['woocommerce'] );
361
+
362
+ // Allow extensions to manually allow a sensor to load.
363
+ return apply_filters( 'wsal_load_on_frontend', $should_load, $frontend_events );
364
+ }
365
 
366
  /**
367
  * Include Plugin Files.
426
  require_once 'classes/Adapters/OccurrenceInterface.php';
427
  require_once 'classes/Adapters/QueryInterface.php';
428
 
429
+ // Third party extensions with public sensors.
430
+ require_once 'classes/ThirdPartyExtensions/AbstractExtension.php';
431
+ require_once 'classes/ThirdPartyExtensions/WooCommerceExtension.php';
432
+
433
  // Only include these if we are in multisite envirnoment.
434
  if ( $this->isMultisite() ) {
435
  require_once 'classes/Multisite/NetworkWide/TrackerInterface.php';
488
 
489
  $this->init_freemius();
490
 
491
+ // Extensions which are only admin based.
492
  if ( is_admin() ) {
493
  $plugin_installer_ajax = new WSAL_PluginInstallerAction();
494
  $plugin_installer_ajax->register();
495
 
496
  $yoast_seo_addon = new WSAL_YoastSeoExtension;
497
  $bbpress_addon = new WSAL_BBPressExtension;
 
498
  $wpforms_addon = new WSAL_WPFormsExtension;
499
  // Comment out till ready.
500
  //$gravityforms_addon = new WSAL_GravityFormsExtension;
501
  }
502
+
503
+ // Extensions which are both admin and frontend based.
504
+ $woocommerce_addon = new WSAL_WooCommerceExtension;
505
+
506
+ // Dequeue conflicting scripts.
507
+ add_action( 'wp_print_scripts', array( $this, 'dequeue_conflicting_scripts' ) );
508
  }
509
 
510
  /**
535
  require_once ABSPATH . 'wp-admin/includes/plugin.php';
536
  }
537
 
538
+ if ( ! class_exists( 'WSAL_PluginInstallAndActivate' ) ) {
539
+ require_once 'classes/Utilities/PluginInstallAndActivate.php';
540
+ }
541
+
542
  // Additional checks for our 3rd party extensions.
543
  if ( class_exists( 'WSAL_PluginInstallAndActivate' ) ) {
544
  $our_plugins = array_column( WSAL_PluginInstallAndActivate::get_installable_plugins(), 'plugin_basename' );
 
545
  // Check if we are dealing with one of our extensions.
546
  if ( in_array( basename( $plugin ), $our_plugins, true ) ) {
547
  // This IS one of our extensions, so lets check a little deeper as folder
656
  wsal_freemius()->add_filter( 'show_trial', '__return_false' );
657
  wsal_freemius()->add_filter( 'opt_in_error_message', array( $this, 'limited_license_activation_error' ), 10, 1 );
658
  wsal_freemius()->add_action( 'after_account_plan_sync', array( $this, 'sync_premium_freemius' ), 10, 1 );
659
+ wsal_freemius()->add_action( 'after_premium_version_activation', array( $this, 'on_freemius_premium_version_activation') );
660
  }
661
  }
662
  }
663
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
664
  /**
665
  * Whether visitor events should be logged.
666
  *
727
  $info = false;
728
  }
729
  break;
730
+ case 'enforce_settings':
731
+ // check subaction
732
+ if ( ! array_key_exists( 'subaction', $post_data) || empty( $post_data['subaction'] ) ) {
733
+ $info = array(
734
+ 'success' => 'no',
735
+ 'message' => 'Missing subaction parameter.'
736
+ );
737
+ break;
738
+ }
739
+
740
+ $subaction = filter_var( $post_data['subaction'], FILTER_SANITIZE_STRING);
741
+ if ( ! in_array( $subaction, [ 'update', 'remove' ] ) ) {
742
+ $info = array(
743
+ 'success' => 'no',
744
+ 'message' => 'Unsupported subaction parameter value.'
745
+ );
746
+ break;
747
+ }
748
+
749
+ if ( 'update' === $subaction ) {
750
+ // store the enforced settings in local database (used for example to disable related parts
751
+ // of the settings UI
752
+ $settings_to_enforce = $post_data[ 'settings'];
753
+ $this->settings()->set_mainwp_enforced_settings( $settings_to_enforce );
754
+
755
+ // change the existing settings
756
+ if ( array_key_exists( 'pruning_enabled', $settings_to_enforce ) ) {
757
+ $this->settings()->SetPruningDateEnabled( $settings_to_enforce['pruning_enabled'] );
758
+ if ( array_key_exists( 'pruning_date', $settings_to_enforce ) && array_key_exists( 'pruning_unit', $settings_to_enforce) ) {
759
+ $this->settings()->SetPruningDate($settings_to_enforce[ 'pruning_date' ] . ' ' . $settings_to_enforce[ 'pruning_unit' ]);
760
+ $this->settings()->set_pruning_unit( $settings_to_enforce[ 'pruning_unit' ] );
761
+ }
762
+ }
763
+
764
+ if ( array_key_exists( 'disabled_events', $settings_to_enforce ) ) {
765
+ $disabled_event_ids = array_key_exists( 'disabled_events', $settings_to_enforce ) ? array_map( 'intval', explode( ',', $settings_to_enforce['disabled_events'] ) ) : [];
766
+ $this->alerts->SetDisabledAlerts( $disabled_event_ids );
767
+ }
768
+ } else if ( 'remove' === $subaction ) {
769
+ $this->settings()->delete_mainwp_enforced_settings();
770
+ }
771
+
772
+ $info = array(
773
+ 'success' => 'yes'
774
+ );
775
+ $this->alerts->Trigger( 6043 );
776
  default:
777
  break;
778
  }
1169
  die();
1170
  }
1171
 
1172
+ $excluded_meta_raw = $this->GetGlobalSetting( 'excluded-custom' );
1173
+ $excluded_meta = [];
1174
+ if ( isset( $excluded_meta_raw ) && '' != $excluded_meta_raw ) {
1175
+ $excluded_meta = explode(',', $excluded_meta_raw);
 
1176
  }
1177
+
1178
+ array_push( $excluded_meta, esc_html( $post_array['notice'] ) );
1179
+ $this->SetGlobalSetting( 'excluded-custom', implode(',', array_unique( $excluded_meta ) ) );
1180
 
1181
  // Exclude object link.
1182
  $exclude_objects_link = add_query_arg(
1184
  'page' => 'wsal-settings',
1185
  'tab' => 'exclude-objects',
1186
  ),
1187
+ network_admin_url( 'admin.php' )
1188
+ );
1189
+ echo wp_sprintf(
1190
+ '<p>' . __( 'Custom Field <strong>%1$s</strong> is no longer being monitored.<br />Enable the monitoring of this custom field again from the', 'wp-security-audit-log' ) . ' <a href="%2$s">%3$s</a>%4$s</p>',
1191
+ $post_array['notice'],
1192
+ $exclude_objects_link,
1193
+ __( 'Excluded Objects', 'wp-security-audit-log' ),
1194
+ __( ' tab in the plugin settings', 'wp-security-audit-log' )
1195
  );
 
1196
  die;
1197
  }
1198
 
1227
  $s_alerts = esc_html( $post_array['code'] );
1228
  }
1229
  $this->SetGlobalSetting( 'disabled-alerts', $s_alerts );
1230
+
1231
  echo wp_sprintf( '<p>' . __( 'Alert %1$s is no longer being monitored.<br /> %2$s', 'wp-security-audit-log' ) . '</p>', esc_html( $post_array['code'] ), __( 'You can enable this alert again from the Enable/Disable Alerts node in the plugin menu.', 'wp-security-audit-log' ) );
1232
  die;
1233
  }
1293
  $pruning_date = $this->settings()->GetPruningDate();
1294
  $this->settings()->SetPruningDate( $pruning_date );
1295
 
 
 
 
 
 
 
 
 
 
 
 
 
1296
  // Load translations.
1297
  load_plugin_textdomain( 'wp-security-audit-log', false, basename( dirname( __FILE__ ) ) . '/languages/' );
1298
  }
1339
 
1340
  // On first install this won't be loaded because not premium, add it
1341
  // now so it installs.
1342
+ $this->load_sessions_extension_db_adapter();
 
 
 
 
 
1343
 
1344
  // run any installs.
1345
  self::getConnector()->installAll();
1440
 
1441
  // remove obsolete options from the database
1442
  if ( version_compare( $new_version, '4.1.4', '>=' ) ) {
1443
+ $this->DeleteSettingByName( WpSecurityAuditLog::OPTIONS_PREFIX . 'addon_available_notice_dismissed' );
1444
 
1445
  // Remove old file scanning options.
1446
  global $wpdb;
1451
  }
1452
  }
1453
  }
1454
+
1455
+ if ( version_compare( $new_version, '4.1.5', '>=' ) ) {
1456
+ // remove 'system' entry from the front-end events array as it was removed along with 404 tracking
1457
+ $frontend_events = WSAL_Settings::get_frontend_events();
1458
+ if ( array_key_exists( 'system', $frontend_events ) ) {
1459
+ unset( $frontend_events['system'] );
1460
+ WSAL_Settings::set_frontend_events( $frontend_events );
1461
+ }
1462
+
1463
+ // remove all settings related to 404 tracking
1464
+ $not_found_page_related_settings = [
1465
+ 'log-404',
1466
+ 'purge-404-log',
1467
+ 'log-404-referrer',
1468
+ 'log-visitor-404',
1469
+ 'purge-visitor-404-log',
1470
+ 'log-visitor-404-referrer',
1471
+ 'excluded-urls'
1472
+ ];
1473
+ foreach ( $not_found_page_related_settings as $setting_name ) {
1474
+ $this->DeleteSettingByName( WpSecurityAuditLog::OPTIONS_PREFIX . $setting_name );
1475
+ }
1476
+
1477
+ // remove cron job for purging 404 logs
1478
+ if ( $schedule_time = wp_next_scheduled( 'wsal_log_files_pruning' ) ) {
1479
+ wp_unschedule_event($schedule_time, 'wsal_log_files_pruning', [] );
1480
+ }
1481
+ }
1482
  }
1483
  }
1484
 
1541
  );
1542
  $s = get_option( 'wpph_plugin_settings' );
1543
  $this->settings()->SetViewPerPage( max( $s->showEventsViewList, 5 ) );
1544
+ $this->settings()->SetWidgetsEnabled( $s->showDW );
1545
  }
1546
 
1547
  /**
1762
  * Do we have an existing installation? This only applies for version 1.0 onwards.
1763
  *
1764
  * @return boolean
1765
+ * @throws Freemius_Exception
1766
  */
1767
  public function IsInstalled() {
1768
  return self::getConnector()->isInstalled();
1772
  * Whether the old plugin was present or not.
1773
  *
1774
  * @return boolean
1775
+ * @throws Freemius_Exception
1776
  */
1777
  public function CanMigrate() {
1778
  return self::getConnector()->canMigrate();
2102
  }
2103
 
2104
  /**
2105
+ * @see @see https://trello.com/c/1OCd5iKc/589-wieserdk-al4mwp-cannot-retrieve-events-when-admin-url-is-changed
2106
  * @return bool
2107
  */
2108
  private static function is_admin_blocking_plugins_support_enabled() {
2109
 
2110
  // only meant for 404 pages, but may run before is_404 can be used
2111
+ $is_404 = did_action( 'wp' ) ? is_404() : true;
2112
+ if ( ! $is_404 ) {
2113
  return false;
2114
  }
2115
 
2121
  * We assume settings have already been migrated (in version 4.1.3) to WordPress options table. We might
2122
  * miss some 404 events until the plugin upgrade runs, but that is a very rare edge case. The same applies
2123
  * to loading of 'admin-blocking-plugins-support' option further down.
2124
+ *
2125
+ * We do not need to worry about the missed 404s after version 4.1.5 as they were completely removed.
2126
  */
2127
  $options_helper = new \WSAL\Helpers\Options( self::OPTIONS_PREFIX );
2128
  $is_stealth_mode = $options_helper->get_option_value('mwp-child-stealth-mode', 'no');
2135
  // allow if the admin blocking support settings is active
2136
  return ('yes' === $options_helper->get_option_value( 'admin-blocking-plugins-support', 'no' ) );
2137
  }
2138
+
2139
+ /**
2140
+ * Loads everything necessary to use DB adapter from the sessions extension.
2141
+ *
2142
+ * @since 4.1.4.1
2143
+ */
2144
+ public function load_sessions_extension_db_adapter() {
2145
+ if ( file_exists( plugin_dir_path( __FILE__ ) . 'extensions/user-sessions/user-sessions.php' ) ) {
2146
+ $this->maybe_add_sessions_trackers_early();
2147
+ require_once plugin_dir_path( __FILE__ ) . 'extensions/user-sessions/user-sessions.php';
2148
+ $sessions = new WSAL_UserSessions_Plugin();
2149
+ $sessions->require_adapter_classes();
2150
+ }
2151
+ }
2152
+
2153
+ /**
2154
+ * Runs on premium version activation and installs database tables of the premium extensions (sessions table at
2155
+ * the time of introducing this function).
2156
+ *
2157
+ * @since 4.1.4.1
2158
+ */
2159
+ public function on_freemius_premium_version_activation() {
2160
+ $this->load_sessions_extension_db_adapter();
2161
+ self::getConnector()->installSingle( 'WSAL_Adapters_MySQL_Session' );
2162
+ }
2163
+
2164
+ /**
2165
+ * Dequeue JS files which have been added by other plugin to all admin pages and cause conflicts.
2166
+ * See https://github.com/WPWhiteSecurity/wp-security-audit-log-premium/issues/1246 and
2167
+ * https://trello.com/c/pWrQn1Be/742-koenhavelaertsflintgrpcom-reports-ui-does-not-load-with-plugin-installed
2168
+ *
2169
+ * @since 4.1.5
2170
+ */
2171
+ public function dequeue_conflicting_scripts() {
2172
+ global $current_screen;
2173
+ // Only dequeue on our admin pages.
2174
+ if ( isset( $current_screen->base ) && strpos( $current_screen->base, 'wp-activity-log' ) === 0 ) {
2175
+ wp_deregister_script( 'dateformat' );
2176
+ }
2177
+ }
2178
  }
2179
 
2180
  // Begin load sequence.