bp_get_user_social_networks_urls (user_id美元=零)
添加社交网络按钮到成员头部区域。
描述
返回
(字符串)
源
文件:bp-xprofile / bp-xprofile-functions.php
函数bp_get_user_social_networks_urls(){全局$wpdb;$wpdb->get_var("SELECT a.id FROM {$wpdb->prefix}bp_xprofile_fields a WHERE parent_id = 0 AND type = 'socialnetworks' "); / /用户名html = "美元;数组$ original_option_values = ();If ($social_networks_id > 0) {$providers = social_network_provider();$original_option_values = maybe_unserialize(BP_XProfile_ProfileData::get_value_byid($social_networks_id, bp_displayed_user_id()));如果收取(original_option_values美元)& & !空(original_option_values美元)){foreach ($ original_option_values关键= > original_option_value美元){如果 ( '' !== $ original_option_value){$关键= bp_social_network_search_key(关键供应商美元);$html .= 'name . '" href="' . esc_url( $original_option_value ) . '">' . $providers[ $key ]->svg . ''; } } } } else { $html = ''; } if ( '' !== $html ) { $level = xprofile_get_field_visibility_level( $social_networks_id, bp_displayed_user_id() ); if ( bp_displayed_user_id() === bp_loggedin_user_id() ) { $html = ' '; } elseif ( 'public' === $level ) { $html = ' '; } elseif ( 'loggedin' === $level && is_user_logged_in() ) { $html = ' '; } elseif ( 'friends' === $level && is_user_logged_in() ) { $member_friend_status = friends_check_friendship_status( bp_loggedin_user_id(), bp_displayed_user_id() ); if ( 'is_friend' === $member_friend_status ) { $html = ' '; } else { $html = ''; } } } return apply_filters( 'bp_get_user_social_networks_urls', $html, $original_option_values, $social_networks_id ); }
更新日志
版本 | 描述 |
---|---|
BuddyBoss 1.0.0 | 介绍了。 |