class-wpml-user.php
988 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
class WPML_User extends WP_User {
/**
* @see \get_user_meta
*
* @param string $key
* @param bool $single
*
* @return mixed
*/
public function get_meta( $key = '', $single = false ) {
return get_user_meta( $this->ID, $key, $single );
}
/**
* @see \update_meta
*
* @param string $key
* @param mixed $value
* @param mixed $prev_value
*/
public function update_meta( $key, $value, $prev_value = '' ) {
update_user_meta( $this->ID, $key, $value, $prev_value );
}
/**
* @see \get_user_option
*
* @param string $option
* @return mixed
*/
public function get_option( $option ) {
return get_user_option( $option, $this->ID );
}
/**
* @see \update_user_option
*
* @param string $option_name
* @param mixed $new_value
* @param bool $global
* @return int|bool
*/
function update_option( $option_name, $new_value, $global = false ) {
return update_user_option( $this->ID, $option_name, $new_value, $global );
}
}