{"id":78620,"date":"2011-08-08T08:00:00","date_gmt":"2011-08-08T08:00:00","guid":{"rendered":"https:\/\/www.weixiaoduo.com\/plugins\/2024\/02\/22\/get-user-custom-field-values\/"},"modified":"2021-11-21T15:59:00","modified_gmt":"2021-11-21T15:59:00","slug":"get-user-custom-field-values","status":"publish","type":"post","link":"https:\/\/www.weixiaoduo.com\/plugins\/get-user-custom-field-values\/","title":{"rendered":"Get User Custom Field Values"},"content":{"rendered":"<p>This plugin provides a powerful widget, shortcode (with shortcode builder tool), and template tags for easily retrieving and displaying custom field values for the currently logged in user or any specified user.<\/p>\n<p>This plugin provides functionality similar to the <a href=\"https:\/\/wordpress.org\/plugins\/get-custom-field-values\/\" rel=\"ugc\">Get Custom Field Values<\/a> plugin, but for user custom fields (which WordPress manages in a separate database table).<\/p>\n<p>This plugin does NOT help you in setting user custom field values, nor does it provide an interface to list or otherwise manage user custom fields.<\/p>\n<p>The list of useful user custom field values that are provided by default in WordPress are:<\/p>\n<ul>\n<li>first_name<\/li>\n<li>last_name<\/li>\n<li>nickname<\/li>\n<li>description<\/li>\n<li>aim<\/li>\n<li>yim<\/li>\n<li>jabber<\/li>\n<\/ul>\n<p>It is up to other plugins or custom code to add additional user custom fields that you may then be able to retrieve with this plugin.<\/p>\n<p>Links: <a href=\"https:\/\/coffee2code.com\/wp-plugins\/get-user-custom-field-values\/\" rel=\"nofollow ugc\">Plugin Homepage<\/a> | <a href=\"https:\/\/wordpress.org\/plugins\/get-user-custom-field-values\/\" rel=\"ugc\">Plugin Directory Page<\/a> | <a href=\"https:\/\/github.com\/coffee2code\/get-custom-field-values\/\" rel=\"nofollow ugc\">GitHub<\/a> | <a href=\"https:\/\/coffee2code.com\" rel=\"nofollow ugc\">Author Homepage<\/a><\/p>\n<h3>Developer Documentation<\/h3>\n<p>Developer documentation can be found in <a href=\"https:\/\/github.com\/coffee2code\/get-custom-field-values\/blob\/master\/DEVELOPER-DOCS.md\" rel=\"nofollow ugc\">DEVELOPER-DOCS.md<\/a>. That documentation covers the numerous template tags, hooks, and shortcode provided by the plugin.<\/p>\n<p>As an overview, these are the template tags provided the plugin:<\/p>\n<ul>\n<li><code>c2c_get_current_user_custom()<\/code> : Template tag to get custom fields for the currently logged in user.<\/li>\n<li><code>c2c_get_author_custom()<\/code>       : Template tag to get custom fields for the current author (when on the permalink page for a post, page, or in a loop).<\/li>\n<li><code>c2c_get_user_custom()<\/code>         : Template tag to get custom fields for a specified user.<\/li>\n<\/ul>\n<p>These are the hooks provided by the plugin:<\/p>\n<ul>\n<li><code>c2c_get_current_user_custom<\/code>                : An alternative approach to safely invoke <code>c2c_get_current_user_custom()<\/code> in such a way that if the plugin were deactivated or deleted, then your calls to the function won\u2019t cause errors in your site.<\/li>\n<li><code>c2c_get_author_custom<\/code>                      : An alternative approach to safely invoke <code>c2c_get_author_custom()<\/code> in such a way that if the plugin were deactivated or deleted, then your calls to the function won\u2019t cause errors in your site.<\/li>\n<li><code>c2c_get_user_custom<\/code>                        : An alternative approach to safely invoke <code>c2c_get_user_custom()<\/code> in such a way that if the plugin were deactivated or deleted, then your calls to the function won\u2019t cause errors in your site.<\/li>\n<li><code>c2c_get_user_custom_field_values_shortcode<\/code> : Filter to customize the name of the plugin\u2019s shortcode.<\/li>\n<li><code>c2c_get_user_custom-user_field_proxy<\/code>       : Filter to prevent proxying to user object fields if no value for the custom field was found for the user.<\/li>\n<li><code>get_user_custom_field_values\/can_author_use_shortcodes<\/code> : Filter to customize if post author can make use of the \u2018user_custom_field\u2019 shortcode.<\/li>\n<li><code>get_user_custom_field_values\/show_metabox<\/code>  : Filter to customize if the shortcode builder metabox is shown.<\/li>\n<\/ul>\n<p>The shortcode provided is <code>[user_custom_field]<\/code>, which has a number of attributes to customize its behavior and output.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Use widgets, shortcodes, and\/or template tags to easily retrieve and display custom field values for users.<\/p>\n","protected":false},"author":65,"featured_media":284046,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"Get User Custom Field Values - \u8587\u6653\u6735\u63d2\u4ef6\u76ee\u5f55","description":"Use widgets, shortcodes, and\/or template tags to easily retrieve and display custom field values for users."},"footnotes":""},"categories":[1],"tags":[1350,345,731,10160,120],"class_list":["post-78620","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-custom-field","tag-shortcode","tag-user","tag-user-meta","tag-widget"],"_links":{"self":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/78620","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/comments?post=78620"}],"version-history":[{"count":0,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/78620\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media\/284046"}],"wp:attachment":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media?parent=78620"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/categories?post=78620"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/tags?post=78620"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}