PluginProbe
Stream – Activity Log & Audit Trail / 3.1.1
Stream – Activity Log & Audit Trail v3.1.1
4.4.0 4.3.0 4.2.2 4.2.1 trunk 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.1 3.1.1 3.10.0 3.2.0 3.2.1 3.2.2 3.2.3 All 50 releases
stream / classes / class-alert-type.php

class-alert-type.php in Stream – Activity Log & Audit Trail 3.1.1, at classes/class-alert-type.php

79 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Alert Type abstract class.
4 *
5 * Used to register new Alert types.
6 *
7 * @package WP_Stream
8 */
9
10 namespace WP_Stream;
11
12 /**
13 * Class Alert_Type
14 *
15 * @package WP_Stream
16 */
17 abstract class Alert_Type {
18
19 /**
20 * Hold the Plugin class
21 *
22 * @var Plugin
23 */
24 public $plugin;
25
26 /**
27 * Unique identifier.
28 *
29 * @var string
30 */
31 public $slug;
32
33 /**
34 * Class constructor.
35 *
36 * @param Plugin $plugin Plugin object.
37 * @return void
38 */
39 public function __construct( $plugin ) {
40 $this->plugin = $plugin;
41 }
42
43 /**
44 * Alert recipients about the new record
45 *
46 * @param int $record_id Record ID.
47 * @param array $recordarr Record details.
48 * @param array $options Alert options.
49 */
50 abstract public function alert( $record_id, $recordarr, $options );
51
52 /**
53 * Display settings form for configuration of individual alerts
54 *
55 * @param Alert $alert Alert currently being worked on.
56 */
57 public function display_fields( $alert ) {
58 return;
59 }
60
61 /**
62 * Process settings form for configuration of individual alerts
63 *
64 * @param Alert $alert Alert currently being worked on.
65 */
66 public function save_fields( $alert ) {
67 return;
68 }
69
70 /**
71 * Allow connectors to determine if their dependencies are satisfied or not
72 *
73 * @return bool
74 */
75 public function is_dependency_satisfied() {
76 return true;
77 }
78 }
79