PluginProbe
UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP / 1.0.11
UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP v1.0.11
1.2.72 1.2.71 1.2.70 1.2.69 1.2.68 1.2.67 1.2.66 1.2.65 1.2.64 1.2.63 trunk 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.20 1.0.21 1.0.22 1.0.23 All 172 releases
userswp / includes / helpers / meta.php

meta.php in UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP 1.0.11, at includes/helpers/meta.php

97 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Gets UsersWP setting value using key.
4 *
5 * @since 1.0.0
6 * @package userswp
7 *
8 * @param string $key Setting Key.
9 * @param bool|string $default Default value.
10 * @param bool $cache Use cache to retrieve the value?.
11 *
12 * @return string Setting Value.
13 */
14 function uwp_get_option( $key = '', $default = false, $cache = true ) {
15 $meta = new UsersWP_Meta();
16 return $meta->get_option($key, $default, $cache);
17 }
18
19 /**
20 * Updates UsersWP setting value using key.
21 *
22 * @since 1.0.0
23 * @package userswp
24 *
25 * @param string|bool $key Setting Key.
26 * @param string $value Setting Value.
27 *
28 * @return bool Update success or not?.
29 */
30 function uwp_update_option( $key = false, $value = '') {
31 $meta = new UsersWP_Meta();
32 return $meta->update_option($key, $value);
33 }
34
35 /**
36 * Gets UsersWP user meta value using key.
37 *
38 * @since 1.0.0
39 * @package userswp
40 *
41 * @param int|bool $user_id User ID.
42 * @param string $key User meta Key.
43 * @param bool|string $default Default value.
44 *
45 * @return string User meta Value.
46 */
47 function uwp_get_usermeta( $user_id = false, $key = '', $default = false ) {
48 $meta = new UsersWP_Meta();
49 return $meta->get_usermeta($user_id, $key, $default);
50 }
51
52 /**
53 * Updates UsersWP user meta value using key.
54 *
55 * @since 1.0.0
56 * @package userswp
57 *
58 * @param int|bool $user_id User ID.
59 * @param string|bool $key User meta Key.
60 * @param string $value User meta Value.
61 *
62 * @return bool Update success or not?.
63 */
64 function uwp_update_usermeta( $user_id = false, $key, $value ) {
65 $meta = new UsersWP_Meta();
66 return $meta->update_usermeta($user_id, $key, $value);
67 }
68
69 /**
70 * Gets UsersWP user meta row using user ID.
71 *
72 * @since 1.0.0
73 * @package userswp
74 *
75 * @param int|bool $user_id User ID.
76 *
77 * @return object|bool User meta row object.
78 */
79 function uwp_get_usermeta_row($user_id = false) {
80 $meta = new UsersWP_Meta();
81 return $meta->get_usermeta_row($user_id);
82 }
83
84 /**
85 * Deletes a UsersWP meta row using the user ID.
86 *
87 * @since 1.0.5
88 * @package UsersWP
89 *
90 * @param int|bool $user_id User ID.
91 *
92 * @return void
93 */
94 function uwp_delete_usermeta_row($user_id = false) {
95 $meta = new UsersWP_Meta();
96 $meta->delete_usermeta_row($user_id);
97 }