MainWP Child Reports - Version 2.0.6

Version Description

  • 10-29-2020 =
  • Added: PHP Docs blocks
  • Updated: MainWP Child 4.1 compatibility
Download this release

Release Info

Developer mainwp
Plugin Icon 128x128 MainWP Child Reports
Version 2.0.6
Comparing to
See all releases

Code changes from version 2.0.5 to 2.0.6

Files changed (63) hide show
  1. alerts/class-alert-trigger-action.php +2 -0
  2. alerts/class-alert-trigger-author.php +4 -0
  3. alerts/class-alert-trigger-context.php +2 -0
  4. alerts/class-alert-type-die.php +2 -0
  5. alerts/class-alert-type-email.php +10 -1
  6. alerts/class-alert-type-highlight.php +20 -1
  7. alerts/class-alert-type-ifttt.php +10 -1
  8. alerts/class-alert-type-menu-alert.php +10 -1
  9. alerts/class-alert-type-none.php +2 -0
  10. alerts/class-alert-type-slack.php +10 -1
  11. classes/class-admin.php +13 -2
  12. classes/class-alert-trigger.php +3 -1
  13. classes/class-alert-type.php +3 -1
  14. classes/class-alert.php +14 -1
  15. classes/class-alerts-list.php +16 -1
  16. classes/class-alerts.php +17 -1
  17. classes/class-author.php +3 -1
  18. classes/class-connectors.php +5 -1
  19. classes/class-date-interval.php +3 -1
  20. classes/class-db-driver-wpdb.php +11 -1
  21. classes/class-db.php +3 -1
  22. classes/class-export.php +9 -1
  23. classes/class-install.php +2 -0
  24. classes/class-list-table.php +14 -1
  25. classes/class-live-update.php +5 -1
  26. classes/class-log.php +22 -16
  27. classes/class-mainwp-child-report-helper.php +6 -1
  28. classes/class-network.php +4 -0
  29. classes/class-plugin.php +22 -2
  30. classes/class-preview-list-table.php +7 -1
  31. classes/class-record.php +2 -0
  32. classes/class-settings.php +8 -1
  33. classes/class-uninstall.php +3 -0
  34. connectors/class-connector-acf.php +8 -0
  35. connectors/class-connector-bbpress.php +4 -0
  36. connectors/class-connector-blogs.php +2 -0
  37. connectors/class-connector-buddypress.php +4 -0
  38. connectors/class-connector-comments.php +2 -0
  39. connectors/class-connector-edd.php +6 -0
  40. connectors/class-connector-editor.php +4 -0
  41. connectors/class-connector-gravityforms.php +4 -0
  42. connectors/class-connector-installer.php +2 -0
  43. connectors/class-connector-jetpack.php +4 -0
  44. connectors/class-connector-mainwp-backups.php +4 -0
  45. connectors/class-connector-mainwp-maintenance.php +4 -0
  46. connectors/class-connector-mainwp-sucuri.php +4 -0
  47. connectors/class-connector-mainwp-wordfence.php +7 -1
  48. connectors/class-connector-media.php +2 -0
  49. connectors/class-connector-menus.php +4 -0
  50. connectors/class-connector-posts.php +5 -1
  51. connectors/class-connector-settings.php +3 -1
  52. connectors/class-connector-taxonomies.php +2 -0
  53. connectors/class-connector-user-switching.php +7 -0
  54. connectors/class-connector-users.php +2 -0
  55. connectors/class-connector-widgets.php +2 -0
  56. connectors/class-connector-woocommerce.php +8 -0
  57. connectors/class-connector-wordpress-seo.php +6 -0
  58. exporters/class-exporter-csv.php +2 -0
  59. exporters/class-exporter-json.php +2 -0
  60. includes/db-updates.php +7 -2
  61. includes/functions.php +4 -0
  62. mainwp-child-reports.php +1 -1
  63. readme.txt +6 -2
alerts/class-alert-trigger-action.php CHANGED
@@ -11,6 +11,8 @@ namespace WP_MainWP_Stream;
11
  * Class Alert_Trigger_Action
12
  *
13
  * @package WP_MainWP_Stream
 
 
14
  */
15
  class Alert_Trigger_Action extends Alert_Trigger {
16
 
11
  * Class Alert_Trigger_Action
12
  *
13
  * @package WP_MainWP_Stream
14
+ *
15
+ * @uses \WP_MainWP_Stream\Alert_Trigger
16
  */
17
  class Alert_Trigger_Action extends Alert_Trigger {
18
 
alerts/class-alert-trigger-author.php CHANGED
@@ -11,6 +11,8 @@ namespace WP_MainWP_Stream;
11
  * Class Alert_Trigger_Author
12
  *
13
  * @package WP_MainWP_Stream
 
 
14
  */
15
  class Alert_Trigger_Author extends Alert_Trigger {
16
 
@@ -80,6 +82,8 @@ class Alert_Trigger_Author extends Alert_Trigger {
80
  * Generate array of possible action values
81
  *
82
  * @return array
 
 
83
  */
84
  public function get_values() {
85
  $all_records = array();
11
  * Class Alert_Trigger_Author
12
  *
13
  * @package WP_MainWP_Stream
14
+ *
15
+ * @uses \WP_MainWP_Stream\Alert_Trigger
16
  */
17
  class Alert_Trigger_Author extends Alert_Trigger {
18
 
82
  * Generate array of possible action values
83
  *
84
  * @return array
85
+ *
86
+ * @uses \WP_MainWP_Stream\Author
87
  */
88
  public function get_values() {
89
  $all_records = array();
alerts/class-alert-trigger-context.php CHANGED
@@ -11,6 +11,8 @@ namespace WP_MainWP_Stream;
11
  * Class Alert_Trigger_Context
12
  *
13
  * @package WP_MainWP_Stream
 
 
14
  */
15
  class Alert_Trigger_Context extends Alert_Trigger {
16
 
11
  * Class Alert_Trigger_Context
12
  *
13
  * @package WP_MainWP_Stream
14
+ *
15
+ * @uses \WP_MainWP_Stream\Alert_Trigger
16
  */
17
  class Alert_Trigger_Context extends Alert_Trigger {
18
 
alerts/class-alert-type-die.php CHANGED
@@ -11,6 +11,8 @@ namespace WP_MainWP_Stream;
11
  * Class Alert_Type_Die
12
  *
13
  * @package WP_MainWP_Stream
 
 
14
  */
15
  class Alert_Type_Die extends Alert_Type {
16
 
11
  * Class Alert_Type_Die
12
  *
13
  * @package WP_MainWP_Stream
14
+ *
15
+ * @uses \WP_MainWP_Stream\Alert_Type
16
  */
17
  class Alert_Type_Die extends Alert_Type {
18
 
alerts/class-alert-type-email.php CHANGED
@@ -13,6 +13,8 @@ namespace WP_MainWP_Stream;
13
  * Class Alert_Type_Email
14
  *
15
  * @package WP_MainWP_Stream
 
 
16
  */
17
  class Alert_Type_Email extends Alert_Type {
18
 
@@ -31,10 +33,15 @@ class Alert_Type_Email extends Alert_Type {
31
  public $slug = 'email';
32
 
33
  /**
34
- * Class Constructor
 
 
35
  *
36
  * @param Plugin $plugin Plugin object.
37
  * @return void
 
 
 
38
  */
39
  public function __construct( $plugin ) {
40
  parent::__construct( $plugin );
@@ -124,6 +131,8 @@ class Alert_Type_Email extends Alert_Type {
124
  *
125
  * @param Alert $alert Alert object for the currently displayed alert.
126
  * @return void
 
 
127
  */
128
  public function display_fields( $alert ) {
129
  $alert_meta = array();
13
  * Class Alert_Type_Email
14
  *
15
  * @package WP_MainWP_Stream
16
+ *
17
+ * @uses \WP_MainWP_Stream\Alert_Type
18
  */
19
  class Alert_Type_Email extends Alert_Type {
20
 
33
  public $slug = 'email';
34
 
35
  /**
36
+ * Alert_Type_Email constructor.
37
+ *
38
+ * Run each time the class is called.
39
  *
40
  * @param Plugin $plugin Plugin object.
41
  * @return void
42
+ *
43
+ * @uses \WP_MainWP_Stream\Alert_Type
44
+ * @uses \WP_MainWP_Stream\Alert_Type_Email
45
  */
46
  public function __construct( $plugin ) {
47
  parent::__construct( $plugin );
131
  *
132
  * @param Alert $alert Alert object for the currently displayed alert.
133
  * @return void
134
+ *
135
+ * @uses \WP_MainWP_Stream\Form_Generator
136
  */
137
  public function display_fields( $alert ) {
138
  $alert_meta = array();
alerts/class-alert-type-highlight.php CHANGED
@@ -11,6 +11,8 @@ namespace WP_MainWP_Stream;
11
  * Class Alert_Type_Highlight
12
  *
13
  * @package WP_MainWP_Stream
 
 
14
  */
15
  class Alert_Type_Highlight extends Alert_Type {
16
 
@@ -58,10 +60,15 @@ class Alert_Type_Highlight extends Alert_Type {
58
  public $plugin;
59
 
60
  /**
61
- * Class Constructor
 
 
62
  *
63
  * @param Plugin $plugin Plugin object.
64
  * @return void
 
 
 
65
  */
66
  public function __construct( $plugin ) {
67
  parent::__construct( $plugin );
@@ -116,7 +123,11 @@ class Alert_Type_Highlight extends Alert_Type {
116
  * @param int|string $record_id Record that triggered alert.
117
  * @param array $recordarr Record details.
118
  * @param object $alert Alert options.
 
119
  * @return void
 
 
 
120
  */
121
  public function alert( $record_id, $recordarr, $alert ) {
122
  $recordarr['ID'] = $record_id;
@@ -134,6 +145,8 @@ class Alert_Type_Highlight extends Alert_Type {
134
  *
135
  * @param Alert $alert Alert object for the currently displayed alert.
136
  * @return void
 
 
137
  */
138
  public function display_fields( $alert ) {
139
  $alert_meta = array();
@@ -231,6 +244,9 @@ class Alert_Type_Highlight extends Alert_Type {
231
  * @param object $record A record object.
232
  *
233
  * @return mixed
 
 
 
234
  */
235
  public function action_link_remove_highlight( $actions, $record ) {
236
  $record = new Record( $record );
@@ -261,6 +277,9 @@ class Alert_Type_Highlight extends Alert_Type {
261
  * those triggered on specific Alert (post) IDs.
262
  *
263
  * @action wp_ajax_stream_remove_highlight
 
 
 
264
  */
265
  public function ajax_remove_highlight() {
266
  check_ajax_referer( self::REMOVE_ACTION_NONCE, 'security' );
11
  * Class Alert_Type_Highlight
12
  *
13
  * @package WP_MainWP_Stream
14
+ *
15
+ * @uses \WP_MainWP_Stream\Alert_Type
16
  */
17
  class Alert_Type_Highlight extends Alert_Type {
18
 
60
  public $plugin;
61
 
62
  /**
63
+ * Alert_Type_Highlight constructor.
64
+ *
65
+ * Run each time the class is called.
66
  *
67
  * @param Plugin $plugin Plugin object.
68
  * @return void
69
+ *
70
+ * @uses \WP_MainWP_Stream\Alert_Type
71
+ * @uses \WP_MainWP_Stream\Alert_Type_Highlight
72
  */
73
  public function __construct( $plugin ) {
74
  parent::__construct( $plugin );
123
  * @param int|string $record_id Record that triggered alert.
124
  * @param array $recordarr Record details.
125
  * @param object $alert Alert options.
126
+ *
127
  * @return void
128
+ *
129
+ * @uses \WP_MainWP_Stream\Alert::update_record_triggered_alerts()
130
+ *
131
  */
132
  public function alert( $record_id, $recordarr, $alert ) {
133
  $recordarr['ID'] = $record_id;
145
  *
146
  * @param Alert $alert Alert object for the currently displayed alert.
147
  * @return void
148
+ *
149
+ * @uses \WP_MainWP_Stream\Form_Generator
150
  */
151
  public function display_fields( $alert ) {
152
  $alert_meta = array();
244
  * @param object $record A record object.
245
  *
246
  * @return mixed
247
+ *
248
+ * @uses \WP_MainWP_Stream\Alerts::ALERTS_TRIGGERED_META_KEY
249
+ * @uses \WP_MainWP_Stream\Record
250
  */
251
  public function action_link_remove_highlight( $actions, $record ) {
252
  $record = new Record( $record );
277
  * those triggered on specific Alert (post) IDs.
278
  *
279
  * @action wp_ajax_stream_remove_highlight
280
+ *
281
+ * @uses \WP_MainWP_Stream\Alerts::ALERTS_TRIGGERED_META_KEY
282
+ * @uses \WP_MainWP_Stream\Record
283
  */
284
  public function ajax_remove_highlight() {
285
  check_ajax_referer( self::REMOVE_ACTION_NONCE, 'security' );
alerts/class-alert-type-ifttt.php CHANGED
@@ -47,6 +47,8 @@ namespace WP_MainWP_Stream;
47
  * Class Alert_Type_IFTTT
48
  *
49
  * @package WP_MainWP_Stream
 
 
50
  */
51
  class Alert_Type_IFTTT extends Alert_Type {
52
 
@@ -65,9 +67,14 @@ class Alert_Type_IFTTT extends Alert_Type {
65
  public $slug = 'ifttt';
66
 
67
  /**
68
- * Class Constructor
 
 
69
  *
70
  * @param Plugin $plugin Plugin object.
 
 
 
71
  */
72
  public function __construct( $plugin ) {
73
  parent::__construct( $plugin );
@@ -104,6 +111,8 @@ class Alert_Type_IFTTT extends Alert_Type {
104
  *
105
  * @param Alert $alert Alert object for the currently displayed alert.
106
  * @return void
 
 
107
  */
108
  public function display_fields( $alert ) {
109
  $alert_meta = array();
47
  * Class Alert_Type_IFTTT
48
  *
49
  * @package WP_MainWP_Stream
50
+ *
51
+ * @uses \WP_MainWP_Stream\Alert_Type
52
  */
53
  class Alert_Type_IFTTT extends Alert_Type {
54
 
67
  public $slug = 'ifttt';
68
 
69
  /**
70
+ * Alert_Type_IFTTT constructor.
71
+ *
72
+ * Run each time the class is called.
73
  *
74
  * @param Plugin $plugin Plugin object.
75
+ *
76
+ * @uses \WP_MainWP_Stream\Alert_Type
77
+ * @uses \WP_MainWP_Stream\Alert_Type_IFTTT
78
  */
79
  public function __construct( $plugin ) {
80
  parent::__construct( $plugin );
111
  *
112
  * @param Alert $alert Alert object for the currently displayed alert.
113
  * @return void
114
+ *
115
+ * @uses \WP_MainWP_Stream\Form_Generator
116
  */
117
  public function display_fields( $alert ) {
118
  $alert_meta = array();
alerts/class-alert-type-menu-alert.php CHANGED
@@ -11,6 +11,8 @@ namespace WP_MainWP_Stream;
11
  * Class Alert_Type_Menu_Alert
12
  *
13
  * @package WP_MainWP_Stream
 
 
14
  */
15
  class Alert_Type_Menu_Alert extends Alert_Type {
16
 
@@ -29,10 +31,15 @@ class Alert_Type_Menu_Alert extends Alert_Type {
29
  public $slug = 'menu-alert';
30
 
31
  /**
32
- * Class Constructor
 
 
33
  *
34
  * @param Plugin $plugin Plugin object.
35
  * @return void
 
 
 
36
  */
37
  public function __construct( $plugin ) {
38
  parent::__construct( $plugin );
@@ -56,6 +63,8 @@ class Alert_Type_Menu_Alert extends Alert_Type {
56
  *
57
  * @param Alert $alert Alert object for the currently displayed alert.
58
  * @return void
 
 
59
  */
60
  public function display_fields( $alert ) {
61
  $alert_meta = array();
11
  * Class Alert_Type_Menu_Alert
12
  *
13
  * @package WP_MainWP_Stream
14
+ *
15
+ * @uses \WP_MainWP_Stream\Alert_Type
16
  */
17
  class Alert_Type_Menu_Alert extends Alert_Type {
18
 
31
  public $slug = 'menu-alert';
32
 
33
  /**
34
+ * Alert_Type_Menu_Alert constructor.
35
+ *
36
+ * Run each time the class is called.
37
  *
38
  * @param Plugin $plugin Plugin object.
39
  * @return void
40
+ *
41
+ * @uses \WP_MainWP_Stream\Alert_Type
42
+ * @uses \WP_MainWP_Stream\Alert_Type_Menu_Alert
43
  */
44
  public function __construct( $plugin ) {
45
  parent::__construct( $plugin );
63
  *
64
  * @param Alert $alert Alert object for the currently displayed alert.
65
  * @return void
66
+ *
67
+ * @uses \WP_MainWP_Stream\Form_Generator
68
  */
69
  public function display_fields( $alert ) {
70
  $alert_meta = array();
alerts/class-alert-type-none.php CHANGED
@@ -11,6 +11,8 @@ namespace WP_MainWP_Stream;
11
  * Class Alert_Type_None
12
  *
13
  * @package WP_MainWP_Stream
 
 
14
  */
15
  class Alert_Type_None extends Alert_Type {
16
  /**
11
  * Class Alert_Type_None
12
  *
13
  * @package WP_MainWP_Stream
14
+ *
15
+ * @uses \WP_MainWP_Stream\Alert_Type
16
  */
17
  class Alert_Type_None extends Alert_Type {
18
  /**
alerts/class-alert-type-slack.php CHANGED
@@ -11,6 +11,8 @@ namespace WP_MainWP_Stream;
11
  * Class Alert_Type_Slack
12
  *
13
  * @package WP_MainWP_Stream
 
 
14
  */
15
  class Alert_Type_Slack extends Alert_Type {
16
 
@@ -29,9 +31,14 @@ class Alert_Type_Slack extends Alert_Type {
29
  public $slug = 'slack';
30
 
31
  /**
32
- * Class Constructor
 
 
33
  *
34
  * @param Plugin $plugin Plugin object.
 
 
 
35
  */
36
  public function __construct( $plugin ) {
37
  parent::__construct( $plugin );
@@ -177,6 +184,8 @@ class Alert_Type_Slack extends Alert_Type {
177
  *
178
  * @param Alert $alert Alert object for the currently displayed alert.
179
  * @return void
 
 
180
  */
181
  public function display_fields( $alert ) {
182
  $alert_meta = array();
11
  * Class Alert_Type_Slack
12
  *
13
  * @package WP_MainWP_Stream
14
+ *
15
+ * @uses \WP_MainWP_Stream\Alert_Type
16
  */
17
  class Alert_Type_Slack extends Alert_Type {
18
 
31
  public $slug = 'slack';
32
 
33
  /**
34
+ * Alert_Type_Slack constructor.
35
+ *
36
+ * Run each time the class is called.
37
  *
38
  * @param Plugin $plugin Plugin object.
39
+ *
40
+ * @uses \WP_MainWP_Stream\Alert_Type
41
+ * @uses \WP_MainWP_Stream\Alert_Type_Slack
42
  */
43
  public function __construct( $plugin ) {
44
  parent::__construct( $plugin );
184
  *
185
  * @param Alert $alert Alert object for the currently displayed alert.
186
  * @return void
187
+ *
188
+ * @uses \WP_MainWP_Stream\Form_Generator
189
  */
190
  public function display_fields( $alert ) {
191
  $alert_meta = array();
classes/class-admin.php CHANGED
@@ -61,7 +61,9 @@ class Admin {
61
  public $notices = array();
62
 
63
  /**
64
- * Class constructor.
 
 
65
  *
66
  * @param Plugin $plugin The main Plugin class.
67
  */
@@ -164,6 +166,10 @@ class Admin {
164
  * Load admin classes.
165
  *
166
  * @action init
 
 
 
 
167
  */
168
  public function init() {
169
  $this->network = new Network( $this->plugin );
@@ -461,6 +467,8 @@ class Admin {
461
  * Check whether or not the current admin screen belongs to Stream.
462
  *
463
  * @return bool TRUE|FALSE.
 
 
464
  */
465
  public function is_stream_screen() {
466
  if ( is_admin() && false !== strpos( wp_mainwp_stream_filter_input( INPUT_GET, 'page' ), $this->records_page_slug ) ) {
@@ -963,7 +971,7 @@ class Admin {
963
  /**
964
  * Instantiate the list table.
965
  *
966
- * @deprecated Disabled.
967
  */
968
  public function register_list_table() {
969
  $this->list_table = new List_Table(
@@ -1118,7 +1126,10 @@ class Admin {
1118
  * Get users record meta.
1119
  *
1120
  * @param array $authors Authors array.
 
1121
  * @return array Return author records.
 
 
1122
  */
1123
  public function get_users_record_meta($authors ) {
1124
  $authors_records = array();
61
  public $notices = array();
62
 
63
  /**
64
+ * Admin constructor.
65
+ *
66
+ * Run each time the class is called.
67
  *
68
  * @param Plugin $plugin The main Plugin class.
69
  */
166
  * Load admin classes.
167
  *
168
  * @action init
169
+ *
170
+ * @uses \WP_MainWP_Stream\Export
171
+ * @uses \WP_MainWP_Stream\Live_Update
172
+ * @uses \WP_MainWP_Stream\Network
173
  */
174
  public function init() {
175
  $this->network = new Network( $this->plugin );
467
  * Check whether or not the current admin screen belongs to Stream.
468
  *
469
  * @return bool TRUE|FALSE.
470
+ *
471
+ * @uses \WP_MainWP_Stream\Alerts::POST_TYPE
472
  */
473
  public function is_stream_screen() {
474
  if ( is_admin() && false !== strpos( wp_mainwp_stream_filter_input( INPUT_GET, 'page' ), $this->records_page_slug ) ) {
971
  /**
972
  * Instantiate the list table.
973
  *
974
+ * @uses \WP_MainWP_Stream\List_Table
975
  */
976
  public function register_list_table() {
977
  $this->list_table = new List_Table(
1126
  * Get users record meta.
1127
  *
1128
  * @param array $authors Authors array.
1129
+ *
1130
  * @return array Return author records.
1131
+ *
1132
+ * @uses \WP_MainWP_Stream\Author
1133
  */
1134
  public function get_users_record_meta($authors ) {
1135
  $authors_records = array();
classes/class-alert-trigger.php CHANGED
@@ -29,7 +29,9 @@ abstract class Alert_Trigger {
29
  public $slug;
30
 
31
  /**
32
- * Class constructor
 
 
33
  *
34
  * @param Plugin $plugin Plugin class.
35
  */
29
  public $slug;
30
 
31
  /**
32
+ * Alert_Trigger constructor.
33
+ *
34
+ * Run each time the class is called.
35
  *
36
  * @param Plugin $plugin Plugin class.
37
  */
classes/class-alert-type.php CHANGED
@@ -31,7 +31,9 @@ abstract class Alert_Type {
31
  public $slug;
32
 
33
  /**
34
- * Class constructor.
 
 
35
  *
36
  * @param Plugin $plugin Plugin object.
37
  */
31
  public $slug;
32
 
33
  /**
34
+ * Alert_Type constructor.
35
+ *
36
+ * Run each time the class is called.
37
  *
38
  * @param Plugin $plugin Plugin object.
39
  */
classes/class-alert.php CHANGED
@@ -64,7 +64,9 @@ class Alert {
64
  public $plugin;
65
 
66
  /**
67
- * Class constructor
 
 
68
  *
69
  * @param object $item Alert data.
70
  * @param Plugin $plugin Plugin class.
@@ -86,6 +88,8 @@ class Alert {
86
  * Save state of the Alert to database
87
  *
88
  * @return int The Post ID of the alert.
 
 
89
  */
90
  public function save() {
91
 
@@ -124,7 +128,10 @@ class Alert {
124
  * Process settings form data
125
  *
126
  * @param array $data Processed post object data.
 
127
  * @return array New post object data.
 
 
128
  */
129
  public function process_settings_form( $data ) {
130
 
@@ -255,6 +262,9 @@ class Alert {
255
  * @param array $alert_meta Alert meta.
256
  *
257
  * @return bool If the meta was updated successfully.
 
 
 
258
  */
259
  public static function update_record_triggered_alerts( $record, $alert_slug, $alert_meta ) {
260
  if ( ! is_string( $alert_slug ) ) {
@@ -301,6 +311,9 @@ class Alert {
301
  * @param mixed $default The default value if no value is found.
302
  *
303
  * @return mixed
 
 
 
304
  */
305
  public function get_single_alert_setting_from_record( $record, $alert_slug, $setting, $default = false ) {
306
  if ( ! is_object( $record ) || ! is_string( $alert_slug ) || ! is_string( $setting ) ) {
64
  public $plugin;
65
 
66
  /**
67
+ * Alert constructor.
68
+ *
69
+ * Run each time the class is called.
70
  *
71
  * @param object $item Alert data.
72
  * @param Plugin $plugin Plugin class.
88
  * Save state of the Alert to database
89
  *
90
  * @return int The Post ID of the alert.
91
+ *
92
+ * @uses \WP_MainWP_Stream\Alerts::POST_TYPE
93
  */
94
  public function save() {
95
 
128
  * Process settings form data
129
  *
130
  * @param array $data Processed post object data.
131
+ *
132
  * @return array New post object data.
133
+ *
134
+ * @uses \WP_MainWP_Stream\Alerts::POST_TYPE
135
  */
136
  public function process_settings_form( $data ) {
137
 
262
  * @param array $alert_meta Alert meta.
263
  *
264
  * @return bool If the meta was updated successfully.
265
+ *
266
+ * @uses \WP_MainWP_Stream\Alerts::ALERTS_TRIGGERED_META_KEY
267
+ * @uses \WP_MainWP_Stream\Record
268
  */
269
  public static function update_record_triggered_alerts( $record, $alert_slug, $alert_meta ) {
270
  if ( ! is_string( $alert_slug ) ) {
311
  * @param mixed $default The default value if no value is found.
312
  *
313
  * @return mixed
314
+ *
315
+ * @uses \WP_MainWP_Stream\Alerts::ALERTS_TRIGGERED_META_KEY
316
+ * @uses \WP_MainWP_Stream\Record
317
  */
318
  public function get_single_alert_setting_from_record( $record, $alert_slug, $setting, $default = false ) {
319
  if ( ! is_object( $record ) || ! is_string( $alert_slug ) || ! is_string( $setting ) ) {
classes/class-alerts-list.php CHANGED
@@ -21,7 +21,9 @@ class Alerts_List {
21
  public $plugin;
22
 
23
  /**
24
- * Class constructor.
 
 
25
  *
26
  * @param Plugin $plugin The main Plugin class.
27
  */
@@ -53,7 +55,10 @@ class Alerts_List {
53
  * @filter request
54
  *
55
  * @param array $query_vars Arguments for query to populate table.
 
56
  * @return array
 
 
57
  */
58
  public function parse_request( $query_vars ) {
59
  $screen = get_current_screen();
@@ -240,7 +245,10 @@ class Alerts_List {
240
  * @filter post_row_actions
241
  *
242
  * @param array $actions List of inline edit actions available.
 
243
  * @return array
 
 
244
  */
245
  public function suppress_quick_edit( $actions ) {
246
  if ( Alerts::POST_TYPE !== get_post_type() ) {
@@ -260,7 +268,10 @@ class Alerts_List {
260
  *
261
  * @param bool $status Status of months dropdown enabling.
262
  * @param string $post_type Post type status is related to.
 
263
  * @return bool
 
 
264
  */
265
  public function suppress_months_dropdown( $status, $post_type ) {
266
  if ( Alerts::POST_TYPE === $post_type ) {
@@ -296,6 +307,8 @@ class Alerts_List {
296
 
297
  /**
298
  * Display a custom quick edit form.
 
 
299
  */
300
  public function display_custom_quick_edit() {
301
  static $fired = false;
@@ -354,6 +367,8 @@ class Alerts_List {
354
  * @param array $postarr Raw post data.
355
  *
356
  * @return array
 
 
357
  */
358
  public function save_alert_inline_edit( $data, $postarr ) {
359
  if ( did_action( 'customize_preview_init' ) || empty( $postarr['ID'] ) ) {
21
  public $plugin;
22
 
23
  /**
24
+ * Alerts_List constructor.
25
+ *
26
+ * Run each time the class is called.
27
  *
28
  * @param Plugin $plugin The main Plugin class.
29
  */
55
  * @filter request
56
  *
57
  * @param array $query_vars Arguments for query to populate table.
58
+ *
59
  * @return array
60
+ *
61
+ * @uses \WP_MainWP_Stream\Alerts::POST_TYPE
62
  */
63
  public function parse_request( $query_vars ) {
64
  $screen = get_current_screen();
245
  * @filter post_row_actions
246
  *
247
  * @param array $actions List of inline edit actions available.
248
+ *
249
  * @return array
250
+ *
251
+ * @uses \WP_MainWP_Stream\Alerts::POST_TYPE
252
  */
253
  public function suppress_quick_edit( $actions ) {
254
  if ( Alerts::POST_TYPE !== get_post_type() ) {
268
  *
269
  * @param bool $status Status of months dropdown enabling.
270
  * @param string $post_type Post type status is related to.
271
+ *
272
  * @return bool
273
+ *
274
+ * @uses \WP_MainWP_Stream\Alerts::POST_TYPE
275
  */
276
  public function suppress_months_dropdown( $status, $post_type ) {
277
  if ( Alerts::POST_TYPE === $post_type ) {
307
 
308
  /**
309
  * Display a custom quick edit form.
310
+ *
311
+ * @uses \WP_MainWP_Stream\Alerts::POST_TYPE
312
  */
313
  public function display_custom_quick_edit() {
314
  static $fired = false;
367
  * @param array $postarr Raw post data.
368
  *
369
  * @return array
370
+ *
371
+ * @uses \WP_MainWP_Stream\Alerts::POST_TYPE
372
  */
373
  public function save_alert_inline_edit( $data, $postarr ) {
374
  if ( did_action( 'customize_preview_init' ) || empty( $postarr['ID'] ) ) {
classes/class-alerts.php CHANGED
@@ -50,7 +50,9 @@ class Alerts {
50
  public $alert_triggers = array();
51
 
52
  /**
53
- * Class constructor.
 
 
54
  *
55
  * @param Plugin $plugin The main Plugin class.
56
  */
@@ -201,6 +203,8 @@ class Alerts {
201
  * @param Alert_Type $alert_type The class to check.
202
  *
203
  * @return bool
 
 
204
  */
205
  public function is_valid_alert_type( $alert_type ) {
206
  if ( ! is_a( $alert_type, 'WP_MainWP_Stream\Alert_Type' ) ) {
@@ -220,6 +224,8 @@ class Alerts {
220
  * @param Alert_Trigger $alert_trigger The class to check.
221
  *
222
  * @return bool
 
 
223
  */
224
  public function is_valid_alert_trigger( $alert_trigger ) {
225
  if ( ! is_a( $alert_trigger, 'WP_MainWP_Stream\Alert_Trigger' ) ) {
@@ -371,6 +377,8 @@ class Alerts {
371
  * @param string $post_id Post ID for the alert.
372
  *
373
  * @return Alert
 
 
374
  */
375
  public function get_alert( $post_id = '' ) {
376
  if ( ! $post_id ) {
@@ -476,6 +484,8 @@ class Alerts {
476
  * @param \WP_Post|array $post Post object for current alert.
477
  *
478
  * @return void
 
 
479
  */
480
  public function display_notification_box( $post = array() ) {
481
  $alert_type = 'none';
@@ -559,6 +569,8 @@ class Alerts {
559
  * @param \WP_Post|array $post Post object for current alert.
560
  *
561
  * @return void
 
 
562
  */
563
  public function display_triggers_box( $post = array() ) {
564
  if ( is_object( $post ) ) {
@@ -697,6 +709,8 @@ class Alerts {
697
 
698
  /**
699
  * Save a new alert.
 
 
700
  */
701
  public function save_new_alert() {
702
  check_ajax_referer( 'save_alert', 'wp_mainwp_alerts_nonce' );
@@ -798,6 +812,8 @@ class Alerts {
798
  * @param Record $record Stream record
799
  *
800
  * @return array Action links
 
 
801
  */
802
  public function change_alert_action_links( $links, $record ) {
803
  $post = get_post( $record->object_id );
50
  public $alert_triggers = array();
51
 
52
  /**
53
+ * Alerts constructor.
54
+ *
55
+ * Run each time the class is called.
56
  *
57
  * @param Plugin $plugin The main Plugin class.
58
  */
203
  * @param Alert_Type $alert_type The class to check.
204
  *
205
  * @return bool
206
+ *
207
+ * @uses \WP_MainWP_Stream\Alert_Type
208
  */
209
  public function is_valid_alert_type( $alert_type ) {
210
  if ( ! is_a( $alert_type, 'WP_MainWP_Stream\Alert_Type' ) ) {
224
  * @param Alert_Trigger $alert_trigger The class to check.
225
  *
226
  * @return bool
227
+ *
228
+ * @uses \WP_MainWP_Stream\Alert_Trigger
229
  */
230
  public function is_valid_alert_trigger( $alert_trigger ) {
231
  if ( ! is_a( $alert_trigger, 'WP_MainWP_Stream\Alert_Trigger' ) ) {
377
  * @param string $post_id Post ID for the alert.
378
  *
379
  * @return Alert
380
+ *
381
+ * @uses \WP_MainWP_Stream\Alert
382
  */
383
  public function get_alert( $post_id = '' ) {
384
  if ( ! $post_id ) {
484
  * @param \WP_Post|array $post Post object for current alert.
485
  *
486
  * @return void
487
+ *
488
+ * @uses \WP_MainWP_Stream\Form_Generator
489
  */
490
  public function display_notification_box( $post = array() ) {
491
  $alert_type = 'none';
569
  * @param \WP_Post|array $post Post object for current alert.
570
  *
571
  * @return void
572
+ *
573
+ * @uses \WP_MainWP_Stream\Form_Generator
574
  */
575
  public function display_triggers_box( $post = array() ) {
576
  if ( is_object( $post ) ) {
709
 
710
  /**
711
  * Save a new alert.
712
+ *
713
+ * @uses \WP_MainWP_Stream\Alert
714
  */
715
  public function save_new_alert() {
716
  check_ajax_referer( 'save_alert', 'wp_mainwp_alerts_nonce' );
812
  * @param Record $record Stream record
813
  *
814
  * @return array Action links
815
+ *
816
+ * @uses \WP_MainWP_Stream\Connector_Posts
817
  */
818
  public function change_alert_action_links( $links, $record ) {
819
  $post = get_post( $record->object_id );
classes/class-author.php CHANGED
@@ -19,7 +19,9 @@ class Author {
19
  protected $user;
20
 
21
  /**
22
- * Class constructor.
 
 
23
  *
24
  * @param int $user_id The user ID.
25
  * @param array $user_meta The user meta array.
19
  protected $user;
20
 
21
  /**
22
+ * Author constructor.
23
+ *
24
+ * Run each time the class is called.
25
  *
26
  * @param int $user_id The user ID.
27
  * @param array $user_meta The user meta array.
classes/class-connectors.php CHANGED
@@ -48,7 +48,9 @@ class Connectors {
48
  protected $admin_notices = array();
49
 
50
  /**
51
- * Class constructor.
 
 
52
  *
53
  * @param Plugin $plugin The main Plugin class.
54
  */
@@ -59,6 +61,8 @@ class Connectors {
59
 
60
  /**
61
  * Load built-in connectors
 
 
62
  */
63
  public function load_connectors() {
64
  $connectors = array(
48
  protected $admin_notices = array();
49
 
50
  /**
51
+ * Connectors constructor.
52
+ *
53
+ * Run each time the class is called.
54
  *
55
  * @param Plugin $plugin The main Plugin class.
56
  */
61
 
62
  /**
63
  * Load built-in connectors
64
+ *
65
+ * @uses \WP_MainWP_Stream\Connector
66
  */
67
  public function load_connectors() {
68
  $connectors = array(
classes/class-date-interval.php CHANGED
@@ -23,7 +23,9 @@ class Date_Interval {
23
  public $intervals;
24
 
25
  /**
26
- * Class constructor
 
 
27
  */
28
  public function __construct() {
29
  // Get all default intervals
23
  public $intervals;
24
 
25
  /**
26
+ * Date_Interval constructor.
27
+ *
28
+ * Run each time the class is called.
29
  */
30
  public function __construct() {
31
  // Get all default intervals
classes/class-db-driver-wpdb.php CHANGED
@@ -6,6 +6,8 @@ namespace WP_MainWP_Stream;
6
  /**
7
  * Class DB_Driver_WPDB.
8
  * @package WP_MainWP_Stream
 
 
9
  */
10
  class DB_Driver_WPDB implements DB_Driver {
11
  /**
@@ -30,7 +32,11 @@ class DB_Driver_WPDB implements DB_Driver {
30
  public $table_meta;
31
 
32
  /**
33
- * Class constructor.
 
 
 
 
34
  */
35
  public function __construct() {
36
  $this->query = new Query( $this );
@@ -162,6 +168,8 @@ class DB_Driver_WPDB implements DB_Driver {
162
  *
163
  * @param \WP_MainWP_Stream\Plugin $plugin Instance of the plugin.
164
  * @return \WP_MainWP_Stream\Install
 
 
165
  */
166
  public function setup_storage( $plugin ) {
167
  return new Install( $plugin );
@@ -172,6 +180,8 @@ class DB_Driver_WPDB implements DB_Driver {
172
  *
173
  * @param \WP_MainWP_Stream\Plugin $plugin Instance of the plugin.
174
  * @return \WP_MainWP_Stream\Uninstall
 
 
175
  */
176
  public function purge_storage( $plugin ) {
177
  $uninstall = new Uninstall( $plugin );
6
  /**
7
  * Class DB_Driver_WPDB.
8
  * @package WP_MainWP_Stream
9
+ *
10
+ * @uses \WP_MainWP_Stream\DB_Driver
11
  */
12
  class DB_Driver_WPDB implements DB_Driver {
13
  /**
32
  public $table_meta;
33
 
34
  /**
35
+ * DB_Driver_WPDB constructor.
36
+ *
37
+ * Run each time the class is called.
38
+ *
39
+ * @uses \WP_MainWP_Stream\Query
40
  */
41
  public function __construct() {
42
  $this->query = new Query( $this );
168
  *
169
  * @param \WP_MainWP_Stream\Plugin $plugin Instance of the plugin.
170
  * @return \WP_MainWP_Stream\Install
171
+ *
172
+ * @uses \WP_MainWP_Stream\Install
173
  */
174
  public function setup_storage( $plugin ) {
175
  return new Install( $plugin );
180
  *
181
  * @param \WP_MainWP_Stream\Plugin $plugin Instance of the plugin.
182
  * @return \WP_MainWP_Stream\Uninstall
183
+ *
184
+ * @uses \WP_MainWP_Stream\Uninstall
185
  */
186
  public function purge_storage( $plugin ) {
187
  $uninstall = new Uninstall( $plugin );
classes/class-db.php CHANGED
@@ -26,7 +26,9 @@ class DB {
26
  private $wpdb;
27
 
28
  /**
29
- * Class constructor.
 
 
30
  *
31
  * @param DB_Driver $driver Driver we want to use.
32
  */
26
  private $wpdb;
27
 
28
  /**
29
+ * DB constructor.
30
+ *
31
+ * Run each time the class is called.
32
  *
33
  * @param DB_Driver $driver Driver we want to use.
34
  */
classes/class-export.php CHANGED
@@ -22,7 +22,9 @@ class Export {
22
  protected $exporters = array();
23
 
24
  /**
25
- * Class constructor
 
 
26
  *
27
  * @param Plugin $plugin The plugin object.
28
  */
@@ -99,7 +101,11 @@ class Export {
99
  *
100
  * @param array $item Post to extract data from.
101
  * @param array $columns Columns being extracted.
 
102
  * @return array Numerically-indexed array with extracted data.
 
 
 
103
  */
104
  public function build_record( $item, $columns ) {
105
  $record = new Record( $item );
@@ -225,6 +231,8 @@ class Export {
225
  *
226
  * @param Exporter $exporter The class to check.
227
  * @return bool
 
 
228
  */
229
  public function is_valid_exporter( $exporter ) {
230
  if ( ! is_a( $exporter, 'WP_MainWP_Stream\Exporter' ) ) {
22
  protected $exporters = array();
23
 
24
  /**
25
+ * Export constructor
26
+ *
27
+ * Run each time the class is called.
28
  *
29
  * @param Plugin $plugin The plugin object.
30
  */
101
  *
102
  * @param array $item Post to extract data from.
103
  * @param array $columns Columns being extracted.
104
+ *
105
  * @return array Numerically-indexed array with extracted data.
106
+ *
107
+ * @uses \WP_MainWP_Stream\Author
108
+ * @uses \WP_MainWP_Stream\Record
109
  */
110
  public function build_record( $item, $columns ) {
111
  $record = new Record( $item );
231
  *
232
  * @param Exporter $exporter The class to check.
233
  * @return bool
234
+ *
235
+ * @uses \WP_MainWP_Stream\Exporter
236
  */
237
  public function is_valid_exporter( $exporter ) {
238
  if ( ! is_a( $exporter, 'WP_MainWP_Stream\Exporter' ) ) {
classes/class-install.php CHANGED
@@ -33,6 +33,8 @@ class Install {
33
  /**
34
  * Install constructor.
35
  *
 
 
36
  * @param object $plugin Plugin class.
37
  *
38
  * @uses \WP_MainWP_Stream\Install::get_db_version()
33
  /**
34
  * Install constructor.
35
  *
36
+ * Run each time the class is called.
37
+ *
38
  * @param object $plugin Plugin class.
39
  *
40
  * @uses \WP_MainWP_Stream\Install::get_db_version()
classes/class-list-table.php CHANGED
@@ -15,7 +15,9 @@ class List_Table extends \WP_List_Table {
15
  public $plugin;
16
 
17
  /**
18
- * Class constructor.
 
 
19
  *
20
  * @param Plugin $plugin The main Plugin class.
21
  * @param array $args Constructor arguments.
@@ -271,7 +273,11 @@ class List_Table extends \WP_List_Table {
271
  *
272
  * @param array $item Row item.
273
  * @param atring $column_name Column name.
 
274
  * @throws \Exception Error message.
 
 
 
275
  */
276
  public function column_default( $item, $column_name ) {
277
  $out = '';
@@ -525,6 +531,9 @@ class List_Table extends \WP_List_Table {
525
  * @param string $column List table column name.
526
  *
527
  * @return array Options to be displayed in search filters.
 
 
 
528
  * @todo eliminate special condition for authors, especially using a WP_User object as the value; should use string or stringifiable object.
529
  */
530
  public function assemble_records( $column ) {
@@ -632,6 +641,8 @@ class List_Table extends \WP_List_Table {
632
  * Get filters.
633
  *
634
  * @return array Return filters array.
 
 
635
  */
636
  public function get_filters() {
637
  $filters = array();
@@ -1187,6 +1198,8 @@ class List_Table extends \WP_List_Table {
1187
  * @param array $users Users array.
1188
  *
1189
  * @return array Dropdown array.
 
 
1190
  */
1191
  public function get_users_dropdown_items( $users ) {
1192
  $record_meta = array();
15
  public $plugin;
16
 
17
  /**
18
+ * List_Table constructor.
19
+ *
20
+ * Run each time the class is called.
21
  *
22
  * @param Plugin $plugin The main Plugin class.
23
  * @param array $args Constructor arguments.
273
  *
274
  * @param array $item Row item.
275
  * @param atring $column_name Column name.
276
+ *
277
  * @throws \Exception Error message.
278
+ *
279
+ * @uses \WP_MainWP_Stream\Author
280
+ * @uses \WP_MainWP_Stream\Record
281
  */
282
  public function column_default( $item, $column_name ) {
283
  $out = '';
531
  * @param string $column List table column name.
532
  *
533
  * @return array Options to be displayed in search filters.
534
+ *
535
+ * @uses \WP_MainWP_Stream\Author
536
+ *
537
  * @todo eliminate special condition for authors, especially using a WP_User object as the value; should use string or stringifiable object.
538
  */
539
  public function assemble_records( $column ) {
641
  * Get filters.
642
  *
643
  * @return array Return filters array.
644
+ *
645
+ * @uses \WP_MainWP_Stream\Date_Interval
646
  */
647
  public function get_filters() {
648
  $filters = array();
1198
  * @param array $users Users array.
1199
  *
1200
  * @return array Dropdown array.
1201
+ *
1202
+ * @uses \WP_MainWP_Stream\Author
1203
  */
1204
  public function get_users_dropdown_items( $users ) {
1205
  $record_meta = array();
classes/class-live-update.php CHANGED
@@ -29,7 +29,9 @@ class Live_Update {
29
  public $list_table = null;
30
 
31
  /**
32
- * Class constructor.
 
 
33
  *
34
  * @param Plugin $plugin The main Plugin class.
35
  */
@@ -172,6 +174,8 @@ class Live_Update {
172
  * @param array $data Data from heartbeat send
173
  *
174
  * @return array Data sent to heartbeat tick
 
 
175
  */
176
  public function heartbeat_received( $response, $data ) {
177
  // Only fire when Stream is requesting a live update
29
  public $list_table = null;
30
 
31
  /**
32
+ * Live_Update constructor.
33
+ *
34
+ * Run each time the class is called.
35
  *
36
  * @param Plugin $plugin The main Plugin class.
37
  */
174
  * @param array $data Data from heartbeat send
175
  *
176
  * @return array Data sent to heartbeat tick
177
+ *
178
+ * @uses \WP_MainWP_Stream\List_Table
179
  */
180
  public function heartbeat_received( $response, $data ) {
181
  // Only fire when Stream is requesting a live update
classes/class-log.php CHANGED
@@ -19,7 +19,9 @@ class Log {
19
  private $prev_record;
20
 
21
  /**
22
- * Class constructor.
 
 
23
  *
24
  * @param Plugin $plugin The main Plugin class.
25
  */
@@ -41,23 +43,27 @@ class Log {
41
  /**
42
  * Log handler.
43
  *
44
- * @param Connector $connector Connector responsible for logging the event.
45
- * @param string $message sprintf-ready error message string.
46
- * @param array $args sprintf (and extra) arguments to use.
47
- * @param int $object_id Target object id.
48
- * @param string $context Context of the event.
49
- * @param string $action Action of the event.
50
- * @param int $user_id User responsible for the event.
51
- * @param int $created_timestamp 1|0 Whether or not the timestamp was created.
52
  *
53
  * @return bool|WP_Error True if updated, otherwise false|WP_Error
54
- *
55
- * @uses \WP_MainWP_Stream\Author::get_current_agent()
56
- * @uses \WP_MainWP_Stream\Author::get_display_name()
57
- * @uses \WP_MainWP_Stream\Author::get_role()
58
- * @uses \WP_MainWP_Stream\Log::is_record_excluded()
59
- * @uses $wp_roles::is_role()
60
- * @uses \WP_MainWP_Stream\Log::$plugin::db::insert()
 
 
 
 
61
  */
62
  public function log( $connector, $message, $args, $object_id, $context, $action, $user_id = null, $created_timestamp = 0 ) {
63
 
19
  private $prev_record;
20
 
21
  /**
22
+ * Log constructor.
23
+ *
24
+ * Run each time the class is called.
25
  *
26
  * @param Plugin $plugin The main Plugin class.
27
  */
43
  /**
44
  * Log handler.
45
  *
46
+ * @param Connector $connector Connector responsible for logging the event.
47
+ * @param string $message sprintf-ready error message string.
48
+ * @param array $args sprintf (and extra) arguments to use.
49
+ * @param int $object_id Target object id.
50
+ * @param string $context Context of the event.
51
+ * @param string $action Action of the event.
52
+ * @param int $user_id User responsible for the event.
53
+ * @param int $created_timestamp 1|0 Whether or not the timestamp was created.
54
  *
55
  * @return bool|WP_Error True if updated, otherwise false|WP_Error
56
+ * @throws \Exception
57
+ *
58
+ * @uses \WP_MainWP_Stream\Author
59
+ * @uses \WP_MainWP_Stream\Author::get_current_agent()
60
+ * @uses \WP_MainWP_Stream\Author::get_display_name()
61
+ * @uses \WP_MainWP_Stream\Author::get_role()
62
+ * @uses \WP_MainWP_Stream\Log::is_record_excluded()
63
+ * @uses \WP_MainWP_Stream\Log::$plugin::db::insert()
64
+ *
65
+ * @uses $wp_roles::is_role()
66
+ * @see https://developer.wordpress.org/reference/classes/wp_roles/is_role/
67
  */
68
  public function log( $connector, $message, $args, $object_id, $context, $action, $user_id = null, $created_timestamp = 0 ) {
69
 
classes/class-mainwp-child-report-helper.php CHANGED
@@ -35,6 +35,9 @@ class MainWP_Child_Report_Helper {
35
 
36
  /**
37
  * MainWP_Child_Report_Helper constructor.
 
 
 
38
  * @param null $plugin
39
  */
40
  function __construct( $plugin = null ) {
@@ -76,7 +79,7 @@ class MainWP_Child_Report_Helper {
76
  $hide = is_array($opts) && isset( $opts['hide_child_reports']) && ($opts['hide_child_reports'] == 'hide');
77
  if ( ! $hide ) {
78
  // Register settings page
79
- add_filter( 'mainwp-child-init-subpages', array( $this, 'init_subpages' ) );
80
  }
81
  }
82
 
@@ -379,6 +382,8 @@ class MainWP_Child_Report_Helper {
379
 
380
  /**
381
  * Register list table.
 
 
382
  */
383
  public function register_list_table() {
384
  $this->list_table = new List_Table(
35
 
36
  /**
37
  * MainWP_Child_Report_Helper constructor.
38
+ *
39
+ * Run each time the class is called.
40
+ *
41
  * @param null $plugin
42
  */
43
  function __construct( $plugin = null ) {
79
  $hide = is_array($opts) && isset( $opts['hide_child_reports']) && ($opts['hide_child_reports'] == 'hide');
80
  if ( ! $hide ) {
81
  // Register settings page
82
+ add_filter( 'mainwp_child_init_subpages', array( $this, 'init_subpages' ) );
83
  }
84
  }
85
 
382
 
383
  /**
384
  * Register list table.
385
+ *
386
+ * @uses \WP_MainWP_Stream\List_Table
387
  */
388
  public function register_list_table() {
389
  $this->list_table = new List_Table(
classes/class-network.php CHANGED
@@ -21,6 +21,8 @@ class Network {
21
  /**
22
  * Network constructor.
23
  *
 
 
24
  * @param Plugin $plugin Plugin class.
25
  *
26
  * @uses \WP_MainWP_Stream\Network::is_network_activated()
@@ -126,6 +128,8 @@ class Network {
126
  * Check if Stream is a must-use plugin.
127
  *
128
  * @return bool Returns true if Stream is a must-use plugin, otherwise false
 
 
129
  */
130
  public function is_mustuse() {
131
 
21
  /**
22
  * Network constructor.
23
  *
24
+ * Run each time the class is called.
25
+ *
26
  * @param Plugin $plugin Plugin class.
27
  *
28
  * @uses \WP_MainWP_Stream\Network::is_network_activated()
128
  * Check if Stream is a must-use plugin.
129
  *
130
  * @return bool Returns true if Stream is a must-use plugin, otherwise false
131
+ *
132
+ * @uses \WP_MainWP_Stream\Plugin
133
  */
134
  public function is_mustuse() {
135
 
classes/class-plugin.php CHANGED
@@ -45,9 +45,21 @@ class Plugin {
45
 
46
  /** @var \WP_MainWP_Stream\Child_Helper Child_Helper class. */
47
  public $child_helper;
48
-
49
  /**
50
- * Class constructor.
 
 
 
 
 
 
 
 
 
 
 
 
51
  */
52
  public function __construct() {
53
  $locate = $this->locate_plugin();
@@ -158,6 +170,11 @@ class Plugin {
158
  * Load Settings, Notifications, and Connectors.
159
  *
160
  * @action init
 
 
 
 
 
161
  */
162
  public function init() {
163
  $this->settings = new Settings( $this );
@@ -195,6 +212,9 @@ class Plugin {
195
 
196
  /**
197
  * Change plugin database driver in case driver plugin loaded after stream.
 
 
 
198
  */
199
  public function plugins_loaded() {
200
  // Load DB helper interface/class
45
 
46
  /** @var \WP_MainWP_Stream\Child_Helper Child_Helper class. */
47
  public $child_helper;
48
+
49
  /**
50
+ * Plugin constructor.
51
+ *
52
+ * Run each time the class is called.
53
+ *
54
+ * @throws \Exception
55
+ *
56
+ * @uses \WP_MainWP_Stream\Admin
57
+ * @uses \WP_MainWP_Stream\CLI
58
+ * @uses \WP_MainWP_Stream\DB
59
+ * @uses \WP_MainWP_Stream\DB_Driver
60
+ * @uses \WP_MainWP_Stream\DB_Driver_WPDB
61
+ * @uses \WP_MainWP_Stream\Log
62
+ * @uses \WP_MainWP_Stream\MainWP_Child_Report_Helper
63
  */
64
  public function __construct() {
65
  $locate = $this->locate_plugin();
170
  * Load Settings, Notifications, and Connectors.
171
  *
172
  * @action init
173
+ *
174
+ * @uses \WP_MainWP_Stream\Alerts
175
+ * @uses \WP_MainWP_Stream\Alerts_List
176
+ * @uses \WP_MainWP_Stream\Connectors
177
+ * @uses \WP_MainWP_Stream\Settings
178
  */
179
  public function init() {
180
  $this->settings = new Settings( $this );
212
 
213
  /**
214
  * Change plugin database driver in case driver plugin loaded after stream.
215
+ *
216
+ * @uses \WP_MainWP_Stream\DB
217
+ * @uses \WP_MainWP_Stream\DB_Driver_WPDB
218
  */
219
  public function plugins_loaded() {
220
  // Load DB helper interface/class
classes/class-preview-list-table.php CHANGED
@@ -6,15 +6,21 @@ namespace WP_MainWP_Stream;
6
  /**
7
  * Class Preview_List_Table.
8
  * @package WP_MainWP_Stream
 
 
9
  */
10
  class Preview_List_Table extends List_Table {
11
 
12
  /**
13
- * Class constructor.
 
 
14
  *
15
  * @param Plugin $plugin Plugin object.
16
  *
17
  * @return void
 
 
18
  */
19
  public function __construct( $plugin ) {
20
  $this->plugin = $plugin;
6
  /**
7
  * Class Preview_List_Table.
8
  * @package WP_MainWP_Stream
9
+ *
10
+ * @uses \WP_MainWP_Stream\List_Table
11
  */
12
  class Preview_List_Table extends List_Table {
13
 
14
  /**
15
+ * Preview_List_Table constructor.
16
+ *
17
+ * Run each time the class is called.
18
  *
19
  * @param Plugin $plugin Plugin object.
20
  *
21
  * @return void
22
+ *
23
+ * @uses \WP_MainWP_Stream\List_Table
24
  */
25
  public function __construct( $plugin ) {
26
  $this->plugin = $plugin;
classes/class-record.php CHANGED
@@ -54,6 +54,8 @@ class Record {
54
  /**
55
  * Record constructor.
56
  *
 
 
57
  * @param array $item Record.
58
  */
59
  public function __construct( $item ) {
54
  /**
55
  * Record constructor.
56
  *
57
+ * Run each time the class is called.
58
+ *
59
  * @param array $item Record.
60
  */
61
  public function __construct( $item ) {
classes/class-settings.php CHANGED
@@ -48,7 +48,9 @@ class Settings {
48
  public $fields = array();
49
 
50
  /**
51
- * Class constructor.
 
 
52
  *
53
  * @param Plugin $plugin The main Plugin class.
54
  */
@@ -88,6 +90,9 @@ class Settings {
88
  * Ajax callback function to search users, used on exclude setting page
89
  *
90
  * @uses \WP_User_Query
 
 
 
91
  */
92
  public function get_users() {
93
  if ( ! defined( 'DOING_AJAX' ) || ! current_user_can( $this->plugin->admin->settings_cap ) ) {
@@ -606,6 +611,8 @@ class Settings {
606
  * @param array $field Field settings
607
  *
608
  * @return string HTML to be displayed
 
 
609
  */
610
  public function render_field( $field ) {
611
  $output = null;
48
  public $fields = array();
49
 
50
  /**
51
+ * Settings constructor.
52
+ *
53
+ * Run each time the class is called.
54
  *
55
  * @param Plugin $plugin The main Plugin class.
56
  */
90
  * Ajax callback function to search users, used on exclude setting page
91
  *
92
  * @uses \WP_User_Query
93
+ * @see https://developer.wordpress.org/reference/classes/wp_user_query/
94
+ *
95
+ * @uses \WP_MainWP_Stream\Author
96
  */
97
  public function get_users() {
98
  if ( ! defined( 'DOING_AJAX' ) || ! current_user_can( $this->plugin->admin->settings_cap ) ) {
611
  * @param array $field Field settings
612
  *
613
  * @return string HTML to be displayed
614
+ *
615
+ * @uses \WP_MainWP_Stream\Form_Generator
616
  */
617
  public function render_field( $field ) {
618
  $output = null;
classes/class-uninstall.php CHANGED
@@ -30,6 +30,9 @@ class Uninstall {
30
 
31
  /**
32
  * Uninstall constructor.
 
 
 
33
  * @param object $plugin Plugin class.
34
  */
35
  public function __construct( $plugin ) {
30
 
31
  /**
32
  * Uninstall constructor.
33
+ *
34
+ * Run each time the class is called.
35
+ *
36
  * @param object $plugin Plugin class.
37
  */
38
  public function __construct( $plugin ) {
connectors/class-connector-acf.php CHANGED
@@ -7,6 +7,8 @@ namespace WP_MainWP_Stream;
7
  /**
8
  * Class Connector_ACF
9
  * @package WP_MainWP_Stream
 
 
10
  */
11
  class Connector_ACF extends Connector {
12
 
@@ -113,6 +115,8 @@ class Connector_ACF extends Connector {
113
 
114
  /**
115
  * Register the connector.
 
 
116
  */
117
  public function register() {
118
  add_filter( 'wp_mainwp_stream_log_data', array( $this, 'log_override' ) );
@@ -138,6 +142,8 @@ class Connector_ACF extends Connector {
138
  * @param object $record Stream record
139
  *
140
  * @return array Action links
 
 
141
  */
142
  public function action_links( $links, $record ) {
143
  $posts_connector = new Connector_Posts();
@@ -355,6 +361,8 @@ class Connector_ACF extends Connector {
355
  * @param mixed|null $value
356
  *
357
  * @return bool
 
 
358
  */
359
  public function check_meta_values( $type, $action, $meta_id, $object_id, $key, $value = null ) {
360
  unset( $action );
7
  /**
8
  * Class Connector_ACF
9
  * @package WP_MainWP_Stream
10
+ *
11
+ * @uses \WP_MainWP_Stream\Connector
12
  */
13
  class Connector_ACF extends Connector {
14
 
115
 
116
  /**
117
  * Register the connector.
118
+ *
119
+ * @uses \WP_MainWP_Stream\Connector::register()
120
  */
121
  public function register() {
122
  add_filter( 'wp_mainwp_stream_log_data', array( $this, 'log_override' ) );
142
  * @param object $record Stream record
143
  *
144
  * @return array Action links
145
+ *
146
+ * @uses \WP_MainWP_Stream\Connector_Posts
147
  */
148
  public function action_links( $links, $record ) {
149
  $posts_connector = new Connector_Posts();
361
  * @param mixed|null $value
362
  *
363
  * @return bool
364
+ *
365
+ * @uses \WP_MainWP_Stream\Connector_Posts
366
  */
367
  public function check_meta_values( $type, $action, $meta_id, $object_id, $key, $value = null ) {
368
  unset( $action );
connectors/class-connector-bbpress.php CHANGED
@@ -6,6 +6,8 @@ namespace WP_MainWP_Stream;
6
  /**
7
  * Class Connector_BbPress.
8
  * @package WP_MainWP_Stream
 
 
9
  */
10
  class Connector_BbPress extends Connector {
11
 
@@ -155,6 +157,8 @@ class Connector_BbPress extends Connector {
155
 
156
  /**
157
  * Register log data.
 
 
158
  */
159
  public function register() {
160
  parent::register();
6
  /**
7
  * Class Connector_BbPress.
8
  * @package WP_MainWP_Stream
9
+ *
10
+ * @uses \WP_MainWP_Stream\Connector
11
  */
12
  class Connector_BbPress extends Connector {
13
 
157
 
158
  /**
159
  * Register log data.
160
+ *
161
+ * @uses \WP_MainWP_Stream\Connector::register()
162
  */
163
  public function register() {
164
  parent::register();
connectors/class-connector-blogs.php CHANGED
@@ -6,6 +6,8 @@ namespace WP_MainWP_Stream;
6
  /**
7
  * Class Connector_Blogs.
8
  * @package WP_MainWP_Stream
 
 
9
  */
10
  class Connector_Blogs extends Connector {
11
  /**
6
  /**
7
  * Class Connector_Blogs.
8
  * @package WP_MainWP_Stream
9
+ *
10
+ * @uses \WP_MainWP_Stream\Connector
11
  */
12
  class Connector_Blogs extends Connector {
13
  /**
connectors/class-connector-buddypress.php CHANGED
@@ -6,6 +6,8 @@ namespace WP_MainWP_Stream;
6
  /**
7
  * Class Connector_BuddyPress
8
  * @package WP_MainWP_Stream
 
 
9
  */
10
  class Connector_BuddyPress extends Connector {
11
 
@@ -270,6 +272,8 @@ class Connector_BuddyPress extends Connector {
270
 
271
  /**
272
  * Register with parent class.
 
 
273
  */
274
  public function register() {
275
  parent::register();
6
  /**
7
  * Class Connector_BuddyPress
8
  * @package WP_MainWP_Stream
9
+ *
10
+ * @uses \WP_MainWP_Stream\Connector
11
  */
12
  class Connector_BuddyPress extends Connector {
13
 
272
 
273
  /**
274
  * Register with parent class.
275
+ *
276
+ * @uses \WP_MainWP_Stream\Connector::register()
277
  */
278
  public function register() {
279
  parent::register();
connectors/class-connector-comments.php CHANGED
@@ -6,6 +6,8 @@ namespace WP_MainWP_Stream;
6
  /**
7
  * Class Connector_Comments.
8
  * @package WP_MainWP_Stream
 
 
9
  */
10
  class Connector_Comments extends Connector {
11
  /**
6
  /**
7
  * Class Connector_Comments.
8
  * @package WP_MainWP_Stream
9
+ *
10
+ * @uses \WP_MainWP_Stream\Connector
11
  */
12
  class Connector_Comments extends Connector {
13
  /**
connectors/class-connector-edd.php CHANGED
@@ -6,6 +6,8 @@ namespace WP_MainWP_Stream;
6
  /**
7
  * Class Connector_EDD
8
  * @package WP_MainWP_Stream
 
 
9
  */
10
  class Connector_EDD extends Connector {
11
 
@@ -125,6 +127,8 @@ class Connector_EDD extends Connector {
125
  * @param object $record Stream record.
126
  *
127
  * @return array Action links.
 
 
128
  */
129
  public function action_links( $links, $record ) {
130
  if ( in_array( $record->context, array( 'downloads' ), true ) ) {
@@ -207,6 +211,8 @@ class Connector_EDD extends Connector {
207
 
208
  /**
209
  * Register with parent class.
 
 
210
  */
211
  public function register() {
212
  parent::register();
6
  /**
7
  * Class Connector_EDD
8
  * @package WP_MainWP_Stream
9
+ *
10
+ * @uses \WP_MainWP_Stream\Connector
11
  */
12
  class Connector_EDD extends Connector {
13
 
127
  * @param object $record Stream record.
128
  *
129
  * @return array Action links.
130
+ *
131
+ * @uses \WP_MainWP_Stream\Connector_Posts
132
  */
133
  public function action_links( $links, $record ) {
134
  if ( in_array( $record->context, array( 'downloads' ), true ) ) {
211
 
212
  /**
213
  * Register with parent class.
214
+ *
215
+ * @uses \WP_MainWP_Stream\Connector::register()
216
  */
217
  public function register() {
218
  parent::register();
connectors/class-connector-editor.php CHANGED
@@ -6,6 +6,8 @@ namespace WP_MainWP_Stream;
6
  /**
7
  * Class Connector_Editor
8
  * @package WP_MainWP_Stream
 
 
9
  */
10
  class Connector_Editor extends Connector {
11
  /**
@@ -40,6 +42,8 @@ class Connector_Editor extends Connector {
40
  * Register all context hooks
41
  *
42
  * @return void
 
 
43
  */
44
  public function register() {
45
  parent::register();
6
  /**
7
  * Class Connector_Editor
8
  * @package WP_MainWP_Stream
9
+ *
10
+ * @uses \WP_MainWP_Stream\Connector
11
  */
12
  class Connector_Editor extends Connector {
13
  /**
42
  * Register all context hooks
43
  *
44
  * @return void
45
+ *
46
+ * @uses \WP_MainWP_Stream\Connector::register()
47
  */
48
  public function register() {
49
  parent::register();
connectors/class-connector-gravityforms.php CHANGED
@@ -6,6 +6,8 @@ namespace WP_MainWP_Stream;
6
  /**
7
  * Class Connector_GravityForms
8
  * @package WP_MainWP_Stream
 
 
9
  */
10
  class Connector_GravityForms extends Connector {
11
 
@@ -165,6 +167,8 @@ class Connector_GravityForms extends Connector {
165
 
166
  /**
167
  * Register with parent class.
 
 
168
  */
169
  public function register() {
170
  parent::register();
6
  /**
7
  * Class Connector_GravityForms
8
  * @package WP_MainWP_Stream
9
+ *
10
+ * @uses \WP_MainWP_Stream\Connector
11
  */
12
  class Connector_GravityForms extends Connector {
13
 
167
 
168
  /**
169
  * Register with parent class.
170
+ *
171
+ * @uses \WP_MainWP_Stream\Connector::register()
172
  */
173
  public function register() {
174
  parent::register();
connectors/class-connector-installer.php CHANGED
@@ -6,6 +6,8 @@ namespace WP_MainWP_Stream;
6
  /**
7
  * Class Connector_Installer
8
  * @package WP_MainWP_Stream
 
 
9
  */
10
  class Connector_Installer extends Connector {
11
 
6
  /**
7
  * Class Connector_Installer
8
  * @package WP_MainWP_Stream
9
+ *
10
+ * @uses \WP_MainWP_Stream\Connector
11
  */
12
  class Connector_Installer extends Connector {
13
 
connectors/class-connector-jetpack.php CHANGED
@@ -5,6 +5,8 @@ namespace WP_MainWP_Stream;
5
  /**
6
  * Class Connector_Jetpack
7
  * @package WP_MainWP_Stream
 
 
8
  */
9
  class Connector_Jetpack extends Connector {
10
 
@@ -171,6 +173,8 @@ class Connector_Jetpack extends Connector {
171
 
172
  /**
173
  * Register with parent class.
 
 
174
  */
175
  public function register() {
176
  parent::register();
5
  /**
6
  * Class Connector_Jetpack
7
  * @package WP_MainWP_Stream
8
+ *
9
+ * @uses \WP_MainWP_Stream\Connector
10
  */
11
  class Connector_Jetpack extends Connector {
12
 
173
 
174
  /**
175
  * Register with parent class.
176
+ *
177
+ * @uses \WP_MainWP_Stream\Connector::register()
178
  */
179
  public function register() {
180
  parent::register();
connectors/class-connector-mainwp-backups.php CHANGED
@@ -6,6 +6,8 @@ namespace WP_MainWP_Stream;
6
  /**
7
  * Class Connector_MainWP_Backups
8
  * @package WP_MainWP_Stream
 
 
9
  */
10
  class Connector_MainWP_Backups extends Connector {
11
 
@@ -62,6 +64,8 @@ class Connector_MainWP_Backups extends Connector {
62
 
63
  /**
64
  * Register with parent class.
 
 
65
  */
66
  public function register() {
67
  parent::register();
6
  /**
7
  * Class Connector_MainWP_Backups
8
  * @package WP_MainWP_Stream
9
+ *
10
+ * @uses \WP_MainWP_Stream\Connector
11
  */
12
  class Connector_MainWP_Backups extends Connector {
13
 
64
 
65
  /**
66
  * Register with parent class.
67
+ *
68
+ * @uses \WP_MainWP_Stream\Connector::register()
69
  */
70
  public function register() {
71
  parent::register();
connectors/class-connector-mainwp-maintenance.php CHANGED
@@ -7,6 +7,8 @@ namespace WP_MainWP_Stream;
7
  * Class Connector_MainWP_Maintenance
8
  *
9
  * @package WP_MainWP_Stream
 
 
10
  */
11
  class Connector_MainWP_Maintenance extends Connector {
12
 
@@ -51,6 +53,8 @@ class Connector_MainWP_Maintenance extends Connector {
51
 
52
  /**
53
  * Register with parent class.
 
 
54
  */
55
  public function register() {
56
  parent::register();
7
  * Class Connector_MainWP_Maintenance
8
  *
9
  * @package WP_MainWP_Stream
10
+ *
11
+ * @uses \WP_MainWP_Stream\Connector
12
  */
13
  class Connector_MainWP_Maintenance extends Connector {
14
 
53
 
54
  /**
55
  * Register with parent class.
56
+ *
57
+ * @uses \WP_MainWP_Stream\Connector::register()
58
  */
59
  public function register() {
60
  parent::register();
connectors/class-connector-mainwp-sucuri.php CHANGED
@@ -6,6 +6,8 @@ namespace WP_MainWP_Stream;
6
  /**
7
  * Class Connector_MainWP_Sucuri
8
  * @package WP_MainWP_Stream
 
 
9
  */
10
  class Connector_MainWP_Sucuri extends Connector {
11
 
@@ -58,6 +60,8 @@ class Connector_MainWP_Sucuri extends Connector {
58
 
59
  /**
60
  * Register connector with parent class.
 
 
61
  */
62
  public function register() {
63
  parent::register();
6
  /**
7
  * Class Connector_MainWP_Sucuri
8
  * @package WP_MainWP_Stream
9
+ *
10
+ * @uses \WP_MainWP_Stream\Connector
11
  */
12
  class Connector_MainWP_Sucuri extends Connector {
13
 
60
 
61
  /**
62
  * Register connector with parent class.
63
+ *
64
+ * @uses \WP_MainWP_Stream\Connector::register()
65
  */
66
  public function register() {
67
  parent::register();
connectors/class-connector-mainwp-wordfence.php CHANGED
@@ -6,6 +6,8 @@ namespace WP_MainWP_Stream;
6
  /**
7
  * Class Connector_MainWP_Wordfence.
8
  * @package WP_MainWP_Stream
 
 
9
  */
10
  class Connector_MainWP_Wordfence extends Connector {
11
 
@@ -48,7 +50,11 @@ class Connector_MainWP_Wordfence extends Connector {
48
  );
49
  }
50
 
51
- /** Register with parent class. */
 
 
 
 
52
  public function register() {
53
  parent::register();
54
  }
6
  /**
7
  * Class Connector_MainWP_Wordfence.
8
  * @package WP_MainWP_Stream
9
+ *
10
+ * @uses \WP_MainWP_Stream\Connector
11
  */
12
  class Connector_MainWP_Wordfence extends Connector {
13
 
50
  );
51
  }
52
 
53
+ /**
54
+ * Register with parent class.
55
+ *
56
+ * @uses \WP_MainWP_Stream\Connector::register()
57
+ */
58
  public function register() {
59
  parent::register();
60
  }
connectors/class-connector-media.php CHANGED
@@ -6,6 +6,8 @@ namespace WP_MainWP_Stream;
6
  /**
7
  * Class Connector_Media.
8
  * @package WP_MainWP_Stream
 
 
9
  */
10
  class Connector_Media extends Connector {
11
  /**
6
  /**
7
  * Class Connector_Media.
8
  * @package WP_MainWP_Stream
9
+ *
10
+ * @uses \WP_MainWP_Stream\Connector
11
  */
12
  class Connector_Media extends Connector {
13
  /**
connectors/class-connector-menus.php CHANGED
@@ -6,6 +6,8 @@ namespace WP_MainWP_Stream;
6
  /**
7
  * Class Connector_Menus.
8
  * @package WP_MainWP_Stream
 
 
9
  */
10
  class Connector_Menus extends Connector {
11
  /**
@@ -80,6 +82,8 @@ class Connector_Menus extends Connector {
80
 
81
  /**
82
  * Register MainWP Child Reports stylesheet.
 
 
83
  */
84
  public function register() {
85
  parent::register();
6
  /**
7
  * Class Connector_Menus.
8
  * @package WP_MainWP_Stream
9
+ *
10
+ * @uses \WP_MainWP_Stream\Connector
11
  */
12
  class Connector_Menus extends Connector {
13
  /**
82
 
83
  /**
84
  * Register MainWP Child Reports stylesheet.
85
+ *
86
+ * @uses \WP_MainWP_Stream\Connector::register()
87
  */
88
  public function register() {
89
  parent::register();
connectors/class-connector-posts.php CHANGED
@@ -4,7 +4,11 @@
4
  namespace WP_MainWP_Stream;
5
 
6
  /**
7
- * Class . @package WP_MainWP_Stream
 
 
 
 
8
  */
9
  class Connector_Posts extends Connector {
10
  /**
4
  namespace WP_MainWP_Stream;
5
 
6
  /**
7
+ * Class Connector_Posts
8
+ *
9
+ * @package WP_MainWP_Stream
10
+ *
11
+ * @uses \WP_MainWP_Stream\Connector
12
  */
13
  class Connector_Posts extends Connector {
14
  /**
connectors/class-connector-settings.php CHANGED
@@ -7,7 +7,7 @@ namespace WP_MainWP_Stream;
7
  * Class Connector_Settings.
8
  * @package WP_MainWP_Stream
9
  *
10
- *
11
  */
12
  class Connector_Settings extends Connector {
13
 
@@ -101,6 +101,8 @@ class Connector_Settings extends Connector {
101
  * Register all context hooks.
102
  *
103
  * @return void
 
 
104
  */
105
  public function register() {
106
  parent::register();
7
  * Class Connector_Settings.
8
  * @package WP_MainWP_Stream
9
  *
10
+ * @uses \WP_MainWP_Stream\Connector
11
  */
12
  class Connector_Settings extends Connector {
13
 
101
  * Register all context hooks.
102
  *
103
  * @return void
104
+ *
105
+ * @uses \WP_MainWP_Stream\Connector::register()
106
  */
107
  public function register() {
108
  parent::register();
connectors/class-connector-taxonomies.php CHANGED
@@ -6,6 +6,8 @@ namespace WP_MainWP_Stream;
6
  /**
7
  * Class Connector_Taxonomies.
8
  * @package WP_MainWP_Stream
 
 
9
  */
10
  class Connector_Taxonomies extends Connector {
11
  /**
6
  /**
7
  * Class Connector_Taxonomies.
8
  * @package WP_MainWP_Stream
9
+ *
10
+ * @uses \WP_MainWP_Stream\Connector
11
  */
12
  class Connector_Taxonomies extends Connector {
13
  /**
connectors/class-connector-user-switching.php CHANGED
@@ -6,6 +6,8 @@ namespace WP_MainWP_Stream;
6
  /**
7
  * Class Connector_User_Switching.
8
  * @package WP_MainWP_Stream
 
 
9
  */
10
  class Connector_User_Switching extends Connector {
11
 
@@ -73,6 +75,7 @@ class Connector_User_Switching extends Connector {
73
  *
74
  * Overrides the default `Connector::register()` method.
75
  *
 
76
  */
77
  public function register() {
78
  parent::register();
@@ -109,6 +112,8 @@ class Connector_User_Switching extends Connector {
109
  *
110
  * @param array $labels All registered connector labels
111
  * @param Connectors $connectors The Connectors object instance
 
 
112
  */
113
  public function callback_wp_mainwp_stream_after_connectors_registration( array $labels, Connectors $connectors ) {
114
  $action = wp_mainwp_stream_filter_input( INPUT_GET, 'action' ) ?: wp_mainwp_stream_filter_input( INPUT_POST, 'action' );
@@ -234,6 +239,8 @@ class Connector_User_Switching extends Connector {
234
  *
235
  * @param Connectors $connectors The Connectors instance
236
  * @param string $action The name of the action to unhook
 
 
237
  */
238
  protected function unhook_user_action( Connectors $connectors, $action ) {
239
  foreach ( $connectors->connectors as $connector ) {
6
  /**
7
  * Class Connector_User_Switching.
8
  * @package WP_MainWP_Stream
9
+ *
10
+ * @uses \WP_MainWP_Stream\Connector
11
  */
12
  class Connector_User_Switching extends Connector {
13
 
75
  *
76
  * Overrides the default `Connector::register()` method.
77
  *
78
+ * @uses \WP_MainWP_Stream\Connector::register()
79
  */
80
  public function register() {
81
  parent::register();
112
  *
113
  * @param array $labels All registered connector labels
114
  * @param Connectors $connectors The Connectors object instance
115
+ *
116
+ * @uses \WP_MainWP_Stream\Connectors
117
  */
118
  public function callback_wp_mainwp_stream_after_connectors_registration( array $labels, Connectors $connectors ) {
119
  $action = wp_mainwp_stream_filter_input( INPUT_GET, 'action' ) ?: wp_mainwp_stream_filter_input( INPUT_POST, 'action' );
239
  *
240
  * @param Connectors $connectors The Connectors instance
241
  * @param string $action The name of the action to unhook
242
+ *
243
+ * @uses \WP_MainWP_Stream\Connectors
244
  */
245
  protected function unhook_user_action( Connectors $connectors, $action ) {
246
  foreach ( $connectors->connectors as $connector ) {
connectors/class-connector-users.php CHANGED
@@ -6,6 +6,8 @@ namespace WP_MainWP_Stream;
6
  /**
7
  * Class Connector_Users.
8
  * @package WP_MainWP_Stream
 
 
9
  */
10
  class Connector_Users extends Connector {
11
 
6
  /**
7
  * Class Connector_Users.
8
  * @package WP_MainWP_Stream
9
+ *
10
+ * @uses \WP_MainWP_Stream\Connector
11
  */
12
  class Connector_Users extends Connector {
13
 
connectors/class-connector-widgets.php CHANGED
@@ -6,6 +6,8 @@ namespace WP_MainWP_Stream;
6
  /**
7
  * Class Connector_Widgets.
8
  * @package WP_MainWP_Stream
 
 
9
  */
10
  class Connector_Widgets extends Connector {
11
 
6
  /**
7
  * Class Connector_Widgets.
8
  * @package WP_MainWP_Stream
9
+ *
10
+ * @uses \WP_MainWP_Stream\Connector
11
  */
12
  class Connector_Widgets extends Connector {
13
 
connectors/class-connector-woocommerce.php CHANGED
@@ -5,6 +5,8 @@ namespace WP_MainWP_Stream;
5
  /**
6
  * Class Connector_Woocommerce
7
  * @package WP_MainWP_Stream
 
 
8
  */
9
  class Connector_Woocommerce extends Connector {
10
 
@@ -60,6 +62,8 @@ class Connector_Woocommerce extends Connector {
60
 
61
  /**
62
  * Register WooCommerce Connector with parent class.
 
 
63
  */
64
  public function register() {
65
  parent::register();
@@ -115,6 +119,8 @@ class Connector_Woocommerce extends Connector {
115
  * Return translated context labels.
116
  *
117
  * @return array Context label translations.
 
 
118
  */
119
  public function get_context_labels() {
120
  $context_labels = array();
@@ -217,6 +223,8 @@ class Connector_Woocommerce extends Connector {
217
  * @param Record $record Stream record.
218
  *
219
  * @return array Action links.
 
 
220
  */
221
  public function action_links( $links, $record ) {
222
  if ( in_array( $record->context, $this->post_types, true ) && get_post( $record->object_id ) ) {
5
  /**
6
  * Class Connector_Woocommerce
7
  * @package WP_MainWP_Stream
8
+ *
9
+ * @uses \WP_MainWP_Stream\Connector
10
  */
11
  class Connector_Woocommerce extends Connector {
12
 
62
 
63
  /**
64
  * Register WooCommerce Connector with parent class.
65
+ *
66
+ * @uses \WP_MainWP_Stream\Connector::register()
67
  */
68
  public function register() {
69
  parent::register();
119
  * Return translated context labels.
120
  *
121
  * @return array Context label translations.
122
+ *
123
+ * @uses \WP_MainWP_Stream\Connector_Posts
124
  */
125
  public function get_context_labels() {
126
  $context_labels = array();
223
  * @param Record $record Stream record.
224
  *
225
  * @return array Action links.
226
+ *
227
+ * @uses \WP_MainWP_Stream\Connector_Posts
228
  */
229
  public function action_links( $links, $record ) {
230
  if ( in_array( $record->context, $this->post_types, true ) && get_post( $record->object_id ) ) {
connectors/class-connector-wordpress-seo.php CHANGED
@@ -5,6 +5,8 @@ namespace WP_MainWP_Stream;
5
  /**
6
  * Class Connector_WordPress_SEO
7
  * @package WP_MainWP_Stream
 
 
8
  */
9
  class Connector_WordPress_SEO extends Connector {
10
 
@@ -97,6 +99,8 @@ class Connector_WordPress_SEO extends Connector {
97
  * @param Record $record Stream record.
98
  *
99
  * @return array Action links.
 
 
100
  */
101
  public function action_links( $links, $record ) {
102
  // Options
@@ -173,6 +177,8 @@ class Connector_WordPress_SEO extends Connector {
173
 
174
  /**
175
  * Register with parent class.
 
 
176
  */
177
  public function register() {
178
  if ( is_network_admin() && ! is_plugin_active_for_network( 'wordpress-seo/wordpress-seo-main.php' ) ) {
5
  /**
6
  * Class Connector_WordPress_SEO
7
  * @package WP_MainWP_Stream
8
+ *
9
+ * @uses \WP_MainWP_Stream\Connector
10
  */
11
  class Connector_WordPress_SEO extends Connector {
12
 
99
  * @param Record $record Stream record.
100
  *
101
  * @return array Action links.
102
+ *
103
+ * @uses \WP_MainWP_Stream\Connector_Posts
104
  */
105
  public function action_links( $links, $record ) {
106
  // Options
177
 
178
  /**
179
  * Register with parent class.
180
+ *
181
+ * @uses \WP_MainWP_Stream\Connector::register()
182
  */
183
  public function register() {
184
  if ( is_network_admin() && ! is_plugin_active_for_network( 'wordpress-seo/wordpress-seo-main.php' ) ) {
exporters/class-exporter-csv.php CHANGED
@@ -6,6 +6,8 @@ namespace WP_MainWP_Stream;
6
  /**
7
  * Class Exporter_CSV
8
  * @package WP_MainWP_Stream
 
 
9
  */
10
  class Exporter_CSV extends Exporter {
11
 
6
  /**
7
  * Class Exporter_CSV
8
  * @package WP_MainWP_Stream
9
+ *
10
+ * @uses \WP_MainWP_Stream\Exporter
11
  */
12
  class Exporter_CSV extends Exporter {
13
 
exporters/class-exporter-json.php CHANGED
@@ -6,6 +6,8 @@ namespace WP_MainWP_Stream;
6
  /**
7
  * Class Exporter_JSON.
8
  * @package WP_MainWP_Stream
 
 
9
  */
10
  class Exporter_JSON extends Exporter {
11
  /**
6
  /**
7
  * Class Exporter_JSON.
8
  * @package WP_MainWP_Stream
9
+ *
10
+ * @uses \WP_MainWP_Stream\Exporter
11
  */
12
  class Exporter_JSON extends Exporter {
13
  /**
includes/db-updates.php CHANGED
@@ -255,7 +255,8 @@ function wp_mainwp_stream_update_auto_352( $db_version, $current_version ) {
255
  * @return string
256
  */
257
  function wp_mainwp_stream_update_auto_350($db_version, $current_version ) {
258
-
 
259
  global $wpdb;
260
 
261
  $stream_entries = $wpdb->get_results( "SELECT * FROM {$wpdb->base_prefix}mainwp_stream" );
@@ -332,6 +333,8 @@ function wp_mainwp_stream_update_auto_308( $db_version, $current_version ) {
332
  * @return string
333
  */
334
  function wp_mainwp_stream_update_302( $db_version, $current_version ) {
 
 
335
  global $wpdb;
336
 
337
  $stream_entries = $wpdb->get_results( "SELECT * FROM {$wpdb->base_prefix}mainwp_stream" );
@@ -370,7 +373,9 @@ function wp_mainwp_stream_update_302( $db_version, $current_version ) {
370
  *
371
  * @return string
372
  */
373
- function wp_mainwp_stream_update_auto_300( $db_version, $current_version ) {
 
 
374
  global $wpdb;
375
 
376
  // Get only the author_meta values that are double-serialized
255
  * @return string
256
  */
257
  function wp_mainwp_stream_update_auto_350($db_version, $current_version ) {
258
+
259
+ /** @global object $wpdb WordPress Database objcet. */
260
  global $wpdb;
261
 
262
  $stream_entries = $wpdb->get_results( "SELECT * FROM {$wpdb->base_prefix}mainwp_stream" );
333
  * @return string
334
  */
335
  function wp_mainwp_stream_update_302( $db_version, $current_version ) {
336
+
337
+ /** @global object $wpdb WordPress Database objcet. */
338
  global $wpdb;
339
 
340
  $stream_entries = $wpdb->get_results( "SELECT * FROM {$wpdb->base_prefix}mainwp_stream" );
373
  *
374
  * @return string
375
  */
376
+ function wp_mainwp_stream_update_auto_300( $db_version, $current_version ) {
377
+
378
+ /** @global object $wpdb WordPress Database objcet. */
379
  global $wpdb;
380
 
381
  // Get only the author_meta values that are double-serialized
includes/functions.php CHANGED
@@ -12,6 +12,8 @@
12
  * @param mixed $options Associative array of options or bitwise disjunction of flags. If filter accepts options, flags can be provided in "flags" field of array.
13
  *
14
  * @return Value of the requested variable on success, FALSE if the filter fails, or NULL if the $variable_name is not set.
 
 
15
  */
16
  function wp_mainwp_stream_filter_input( $type, $variable_name, $filter = null, $options = array() ) {
17
  return call_user_func_array( array( '\WP_MainWP_Stream\Filter_Input', 'super' ), func_get_args() );
@@ -28,6 +30,8 @@ function wp_mainwp_stream_filter_input( $type, $variable_name, $filter = null, $
28
  * @param mixed $options Associative array of options or bitwise disjunction of flags. If filter accepts options, flags can be provided in "flags" field of array. For the "callback" filter, callable type should be passed. The callback must accept one argument, the value to be filtered, and return the value after filtering/sanitizing it.
29
  *
30
  * @return Returns the filtered data, or FALSE if the filter fails.
 
 
31
  */
32
  function wp_mainwp_stream_filter_var( $var, $filter = null, $options = array() ) {
33
  return call_user_func_array( array( '\WP_MainWP_Stream\Filter_Input', 'filter' ), func_get_args() );
12
  * @param mixed $options Associative array of options or bitwise disjunction of flags. If filter accepts options, flags can be provided in "flags" field of array.
13
  *
14
  * @return Value of the requested variable on success, FALSE if the filter fails, or NULL if the $variable_name is not set.
15
+ *
16
+ * @uses \WP_MainWP_Stream\Filter_Input
17
  */
18
  function wp_mainwp_stream_filter_input( $type, $variable_name, $filter = null, $options = array() ) {
19
  return call_user_func_array( array( '\WP_MainWP_Stream\Filter_Input', 'super' ), func_get_args() );
30
  * @param mixed $options Associative array of options or bitwise disjunction of flags. If filter accepts options, flags can be provided in "flags" field of array. For the "callback" filter, callable type should be passed. The callback must accept one argument, the value to be filtered, and return the value after filtering/sanitizing it.
31
  *
32
  * @return Returns the filtered data, or FALSE if the filter fails.
33
+ *
34
+ * @uses \WP_MainWP_Stream\Filter_Input
35
  */
36
  function wp_mainwp_stream_filter_var( $var, $filter = null, $options = array() ) {
37
  return call_user_func_array( array( '\WP_MainWP_Stream\Filter_Input', 'filter' ), func_get_args() );
mainwp-child-reports.php CHANGED
@@ -7,7 +7,7 @@
7
  * Description: The MainWP Child Report plugin tracks Child sites for the MainWP Client Reports Extension. The plugin is only useful if you are using MainWP and the Client Reports Extension.
8
  * Author: MainWP
9
  * Author URI: https://mainwp.com
10
- * Version: 2.0.5
11
  * Requires at least: 3.6
12
  * Text Domain: mainwp-child-reports
13
  * License: GPLv3 or later
7
  * Description: The MainWP Child Report plugin tracks Child sites for the MainWP Client Reports Extension. The plugin is only useful if you are using MainWP and the Client Reports Extension.
8
  * Author: MainWP
9
  * Author URI: https://mainwp.com
10
+ * Version: 2.0.6
11
  * Requires at least: 3.6
12
  * Text Domain: mainwp-child-reports
13
  * License: GPLv3 or later
readme.txt CHANGED
@@ -5,9 +5,9 @@ Author: mainwp
5
  Author URI: https://mainwp.com
6
  Plugin URI: https://mainwp.com
7
  Requires at least: 3.6
8
- Tested up to: 5.5
9
  Requires PHP: 5.6
10
- Stable tag: 2.0.5
11
  License: GPLv3 or later
12
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
13
 
@@ -36,6 +36,10 @@ Credit to the [Stream Plugin](https://wordpress.org/plugins/stream/) which the M
36
 
37
  == Changelog ==
38
 
 
 
 
 
39
  = 2.0.5 - 8-31-2020 =
40
  * Fixed: jQuery warning
41
  * Fixed: Compatibility issues with MySQL 8
5
  Author URI: https://mainwp.com
6
  Plugin URI: https://mainwp.com
7
  Requires at least: 3.6
8
+ Tested up to: 5.5.1
9
  Requires PHP: 5.6
10
+ Stable tag: 2.0.6
11
  License: GPLv3 or later
12
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
13
 
36
 
37
  == Changelog ==
38
 
39
+ = 2.0.6 - 10-29-2020 =
40
+ * Added: PHP Docs blocks
41
+ * Updated: MainWP Child 4.1 compatibility
42
+
43
  = 2.0.5 - 8-31-2020 =
44
  * Fixed: jQuery warning
45
  * Fixed: Compatibility issues with MySQL 8