PluginProbe
Stream – Activity Log & Audit Trail / 3.4.2
Stream – Activity Log & Audit Trail v3.4.2
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
← All changes | classes/class-record.php +15 -15 3.13.4.2 View file →
@@ -17,22 +17,22 @@
17 17 public $ip;
18 18 public $meta;
19 19
20 20 public function __construct( $item ) {
21 - $this->ID = isset( $item->ID ) ? $item->ID : null;
22 - $this->created = isset( $item->created ) ? $item->created : null;
23 - $this->site_id = isset( $item->site_id ) ? $item->site_id : null;
24 - $this->blog_id = isset( $item->blog_id ) ? $item->blog_id : null;
21 + $this->ID = isset( $item->ID ) ? $item->ID : null;
22 + $this->created = isset( $item->created ) ? $item->created : null;
23 + $this->site_id = isset( $item->site_id ) ? $item->site_id : null;
24 + $this->blog_id = isset( $item->blog_id ) ? $item->blog_id : null;
25 25 $this->object_id = isset( $item->object_id ) ? $item->object_id : null;
26 - $this->user_id = isset( $item->user_id ) ? $item->user_id : null;
26 + $this->user_id = isset( $item->user_id ) ? $item->user_id : null;
27 27 $this->user_role = isset( $item->user_role ) ? $item->user_role : null;
28 28 $this->user_meta = isset( $item->meta['user_meta'] ) ? $item->meta['user_meta'] : null;
29 - $this->summary = isset( $item->summary ) ? $item->summary : null;
29 + $this->summary = isset( $item->summary ) ? $item->summary : null;
30 30 $this->connector = isset( $item->connector ) ? $item->connector : null;
31 - $this->context = isset( $item->context ) ? $item->context : null;
32 - $this->action = isset( $item->action ) ? $item->action : null;
33 - $this->ip = isset( $item->ip ) ? $item->ip : null;
34 - $this->meta = isset( $item->meta ) ? $item->meta : null;
31 + $this->context = isset( $item->context ) ? $item->context : null;
32 + $this->action = isset( $item->action ) ? $item->action : null;
33 + $this->ip = isset( $item->ip ) ? $item->ip : null;
34 + $this->meta = isset( $item->meta ) ? $item->meta : null;
35 35
36 36 if ( isset( $this->meta['user_meta'] ) ) {
37 37 unset( $this->meta['user_meta'] );
38 38 }
@@ -66,9 +66,9 @@
66 66 *
67 67 * @return array
68 68 */
69 69 public function get_meta( $meta_key = '', $single = false ) {
70 - return maybe_unserialize( get_metadata( 'record', $this->ID, $meta_key, $single ) );
70 + return get_metadata( 'record', $this->ID, $meta_key, $single );
71 71 }
72 72
73 73 /**
74 74 * Update record meta
@@ -73,12 +73,12 @@
73 73 /**
74 74 * Update record meta
75 75 *
76 76 * @param string $meta_key
77 - * @param string $meta_value
78 - * @param string $prev_value (optional)
77 + * @param mixed $meta_value
78 + * @param mixed $prev_value (optional)
79 79 *
80 - * @return array
80 + * @return bool
81 81 */
82 82 public function update_meta( $meta_key, $meta_value, $prev_value = '' ) {
83 83 return update_metadata( 'record', $this->ID, $meta_key, $meta_value, $prev_value );
84 84 }
@@ -88,9 +88,9 @@
88 88 *
89 89 * @param object Record object
90 90 * @return mixed The title of the object as a string, otherwise false
91 91 */
92 - function get_object_title() {
92 + public function get_object_title() {
93 93 if ( ! isset( $this->object_id ) || empty( $this->object_id ) ) {
94 94 return false;
95 95 }
96 96