PluginProbe
HubSpot All-In-One Marketing – Forms, Popups, Live Chat / 11.0.7
HubSpot All-In-One Marketing – Forms, Popups, Live Chat v11.0.7
11.3.75 11.3.73 11.3.71 11.3.70 11.3.69 11.3.64 11.3.65 11.3.62 11.3.61 11.3.56 11.3.58 11.0.31 11.0.52 11.0.54 11.0.56 11.0.58 11.0.7 11.1.10 11.1.11 11.1.13 11.1.14 11.1.15 11.1.2 11.1.20 11.1.21 All 73 releases
leadin / public / data / class-user-metadata.php

class-user-metadata.php in HubSpot All-In-One Marketing – Forms, Popups, Live Chat 11.0.7, at public/data/class-user-metadata.php

99 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Leadin\data;
4
5 use Leadin\data\User;
6
7 /**
8 * Handles metadata for users in the admin area.
9 */
10 class User_Metadata {
11
12 const SKIP_REVIEW = 'leadin_skip_review';
13 const REVIEW_BANNER_LAST_CALL = 'leadin_review_banner_last_call';
14 const HAS_MIN_CONTACTS = 'leadin_has_min_contacts';
15 const TRACK_CONSENT = 'leadin_track_consent';
16 const FIRST_NAME = 'first_name';
17 const NICKNAME = 'nickname';
18
19
20 /**
21 * Get FIRST_NAME meta data for a user.
22 */
23 public static function get_first_name() {
24 return User::get_metadata( self::FIRST_NAME );
25 }
26
27 /**
28 * Get NICKNAME meta data for a user.
29 */
30 public static function get_nickname() {
31 return User::get_metadata( self::NICKNAME );
32 }
33
34 /**
35 * Set SKIP_REVIEW meta data for a user.
36 *
37 * @param int $skip_epoch Epoch time of when the review was skipped.
38 */
39 public static function set_skip_review( $skip_epoch ) {
40 return User::set_metadata( self::SKIP_REVIEW, $skip_epoch );
41 }
42
43 /**
44 * Get SKIP_REVIEW meta data for a user.
45 */
46 public static function get_skip_review() {
47 return User::get_metadata( self::SKIP_REVIEW );
48 }
49
50 /**
51 * Set REVIEW_BANNER_LAST_CALL meta data for a user.
52 *
53 * @param int $skip_epoch Epoch time of when the review was skipped.
54 */
55 public static function set_review_banner_last_call( $skip_epoch ) {
56 return User::set_metadata( self::REVIEW_BANNER_LAST_CALL, $skip_epoch );
57 }
58
59 /**
60 * Get REVIEW_BANNER_LAST_CALL meta data for a user.
61 */
62 public static function get_review_banner_last_call() {
63 return User::get_metadata( self::REVIEW_BANNER_LAST_CALL );
64 }
65
66 /**
67 * Set HAS_MIN_CONTACTS meta data for a user.
68 *
69 * @param bool $value Boolean to see if contacts already been fetched and fulfill threshold.
70 */
71 public static function set_has_min_contacts( $value ) {
72 return User::set_metadata( self::HAS_MIN_CONTACTS, $value );
73 }
74
75 /**
76 * Get HAS_MIN_CONTACTS meta data for a user.
77 */
78 public static function get_has_min_contacts() {
79 return User::get_metadata( self::HAS_MIN_CONTACTS );
80 }
81
82 /**
83 * Set TRACK_CONSENT meta data for a user.
84 *
85 * @param bool $consent User consent to anonymous tracking.
86 */
87 public static function set_track_consent( $consent ) {
88 return User::set_metadata( self::TRACK_CONSENT, $consent );
89 }
90
91 /**
92 * Get TRACK_CONSENT meta data for a user.
93 */
94 public static function get_track_consent() {
95 return User::get_metadata( self::TRACK_CONSENT );
96 }
97
98 }
99