From 2bb281b1cb460ba0cc612adbe4378e75e9e4d94f Mon Sep 17 00:00:00 2001
From: ultimatemember
Date: Wed, 31 Dec 2014 22:14:55 +0200
Subject: [PATCH] User meta information in Members Directory
---
admin/core/um-admin-metabox.php | 1 +
admin/templates/directory/profile.php | 48 +++++++++++++++++++++++++++
assets/css/um-responsive.css | 24 +++++---------
core/um-actions-members.php | 26 ++++++++++++---
core/um-fields.php | 11 ++++++
core/um-profile.php | 12 ++++---
6 files changed, 99 insertions(+), 23 deletions(-)
diff --git a/admin/core/um-admin-metabox.php b/admin/core/um-admin-metabox.php
index 6fac8fcb..d24ce508 100644
--- a/admin/core/um-admin-metabox.php
+++ b/admin/core/um-admin-metabox.php
@@ -273,6 +273,7 @@ class UM_Admin_Metabox {
// save
delete_post_meta( $post_id, '_um_roles' );
delete_post_meta( $post_id, '_um_tagline_fields' );
+ delete_post_meta( $post_id, '_um_reveal_fields' );
delete_post_meta( $post_id, '_um_search_fields' );
foreach( $_POST as $k => $v ) {
if (strstr($k, '_um_')){
diff --git a/admin/templates/directory/profile.php b/admin/templates/directory/profile.php
index 8b784e65..f2eec362 100644
--- a/admin/templates/directory/profile.php
+++ b/admin/templates/directory/profile.php
@@ -104,6 +104,54 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/css/um-responsive.css b/assets/css/um-responsive.css
index 5b18d8c1..8d9fcc56 100644
--- a/assets/css/um-responsive.css
+++ b/assets/css/um-responsive.css
@@ -169,11 +169,8 @@ div.uimob340 .um-search .um-search-submit .um-button {
margin: 0 0 15px 0 !important;
}
-div.uimob340 .um-member {
- width: 100%;
-}
-
-div.uimob340 .um-gutter-sizer { width: 0px }
+div.uimob340 .um-member {width: 100%}
+div.uimob340 .um-gutter-sizer {width: 0px}
div.uimob340 .um-account-main {
float: none;
@@ -352,11 +349,8 @@ div.uimob500 .um-search .um-search-submit .um-button {
margin: 0 0 15px 0 !important;
}
-div.uimob500 .um-member {
- width: 100%;
-}
-
-div.uimob500 .um-gutter-sizer { width: 0px }
+div.uimob500 .um-member {width: 100%}
+div.uimob500 .um-gutter-sizer {width: 0px}
div.uimob500 .um-account-main {
float: none;
@@ -470,6 +464,9 @@ div.uimob800 .um-profile-photo-overlay
padding: 0;
}
+div.uimob800 .um-member {width: 48%}
+div.uimob800 .um-gutter-sizer {width: 4%}
+
/********************************************/
/**
@@ -512,11 +509,8 @@ div.uimob960 .um-search .um-search-submit .um-button {
div.uimob960 .um-search .um-search-submit .um-button.um-alt {float: right}
-div.uimob960 .um-member {
- width: 48%;
-}
-
-div.uimob960 .um-gutter-sizer { width: 4% }
+div.uimob960 .um-member {width: 48%}
+div.uimob960 .um-gutter-sizer {width: 4%}
/************************************************/
diff --git a/core/um-actions-members.php b/core/um-actions-members.php
index 1ae59a5c..720cc9ea 100644
--- a/core/um-actions-members.php
+++ b/core/um-actions-members.php
@@ -233,7 +233,7 @@
}
?>
-
+
@@ -242,9 +242,27 @@
diff --git a/core/um-fields.php b/core/um-fields.php
index 4d418339..13185961 100644
--- a/core/um-fields.php
+++ b/core/um-fields.php
@@ -465,6 +465,17 @@ class UM_Fields {
return array('');
}
+ /***
+ *** @Get Field Icon
+ ***/
+ function get_field_icon( $key ) {
+ global $ultimatemember;
+ $fields = $ultimatemember->builtin->all_user_fields;
+ if ( isset( $fields[$key]['icon'] ) )
+ return $fields[$key]['icon'];
+ return 'um-icon-user';
+ }
+
/***
*** @Get form fields
***/
diff --git a/core/um-profile.php b/core/um-profile.php
index 6b5958b5..d7979914 100644
--- a/core/um-profile.php
+++ b/core/um-profile.php
@@ -10,13 +10,17 @@ class UM_Profile {
global $ultimatemember;
$output = '';
- foreach( $array as $k ) {
+ foreach( $array as $key ) {
$data = '';
- if ( $k && um_user( $k ) ) {
+ if ( $key && um_user( $key ) ) {
+
+ $value = um_user( $key );
+ $data = $ultimatemember->builtin->get_specific_field( $key );
+ $type = (isset($data['type']))?$data['type']:'';
- $value = um_user( $k );
- $data = $ultimatemember->builtin->get_specific_field( $k );
$value = apply_filters("um_profile_field_filter_hook__", $value, $data );
+ $value = apply_filters("um_profile_field_filter_hook__{$key}", $value, $data );
+ $value = apply_filters("um_profile_field_filter_hook__{$type}", $value, $data );
$items[] = '
' . $value . '';
$items[] = '
•';