User meta information in Members Directory

This commit is contained in:
ultimatemember
2014-12-31 22:14:55 +02:00
parent 1f2e7b54dd
commit 2bb281b1cb
6 changed files with 99 additions and 23 deletions
+1
View File
@@ -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_')){
+48
View File
@@ -104,6 +104,54 @@
</span>
</p><div class="um-admin-clear"></div>
<p class="reveal-options">
<label class=""><?php _e('Choose field(s) to display in reveal section','ultimatemember'); ?></label>
<?php
$meta_test = get_post_meta( get_the_ID(), '_um_reveal_fields', true );
$i = 0;
if ( is_array( $meta_test ) ) {
foreach( $meta_test as $val ) { $i++;
?>
<span class="um-admin-field">
<select name="_um_reveal_fields[]" id="_um_reveal_fields" class="umaf-selectjs" style="width: 300px" data-placeholder="Choose a field">
<?php foreach($ultimatemember->builtin->all_user_fields() as $key => $arr) { ?>
<option value="<?php echo $key; ?>" <?php selected($key, $val ); ?>><?php echo isset( $arr['title'] ) ? $arr['title'] : ''; ?></option>
<?php } ?>
</select>
<?php if ( $i == 1 ) { ?>
<a href="#" class="um-admin-clone button um-admin-tipsy-n" title="New Field"><i class="um-icon-plus-add" style="margin-right:0!important"></i></a>
<?php } else { ?>
<a href="#" class="um-admin-clone-remove button um-admin-tipsy-n" title="Remove Field"><i class="um-icon-remove" style="margin-right:0!important"></i></a>
<?php } ?>
</span>
<?php }
} else {
?>
<span class="um-admin-field">
<select name="_um_reveal_fields[]" id="_um_reveal_fields" class="umaf-selectjs" style="width: 300px" data-placeholder="Choose a field">
<?php foreach($ultimatemember->builtin->all_user_fields() as $key => $arr) { ?>
<option value="<?php echo $key; ?>" <?php selected($key, $ultimatemember->query->get_meta_value('_um_reveal_fields', $key) ); ?>><?php echo isset( $arr['title'] ) ? $arr['title'] : ''; ?></option>
<?php } ?>
</select>
<a href="#" class="um-admin-clone button um-admin-tipsy-n" title="New Field"><i class="um-icon-plus-add" style="margin-right:0!important"></i></a>
</span>
<?php } ?>
</p><div class="um-admin-clear"></div>
<p>
<label class="um-admin-half"><?php _e('Show social connect icons','ultimatemember'); ?></label>
<span class="um-admin-half">