Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/15/2012 08:33:09 PM (12 years ago)
Author:
boonebgorges
Message:

First pass at per-field visibility/privacy for XProfile:

  • Allows admins to set default levels for specific fields
  • Allows users to set visibility/privacy on a field-by-field basis
  • Modifies the profile templates to show markup for editing visibility status

See #3695

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-themes/bp-default/members/single/profile/edit.php

    r5737 r5789  
    113113
    114114                <?php endif; ?>
     115               
     116                <?php /* The fullname field is always public */ ?>
     117                <?php if ( 1 != bp_get_the_profile_field_id() ) : ?>
     118                    <div class="field-privacy-settings-toggle" id="field-privacy-settings-toggle-<?php bp_the_profile_field_id() ?>">
     119                        <?php printf( __( 'This field can be seen by: <span class="current-privacy-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_privacy_level_label() ) ?> <a href="#" class="privacy-toggle-link">Change</a>
     120                    </div>
     121                   
     122                    <div class="field-privacy-settings" id="field-privacy-settings-<?php bp_the_profile_field_id() ?>">
     123                        <label for="field-privacy"><?php _e( 'Who can see this field?', 'buddypress' ) ?></label>
     124                       
     125                        <?php bp_profile_privacy_radio_buttons() ?>
     126                       
     127                        <a class="field-privacy-settings-close" href="#"><?php _e( 'Close', 'buddypress' ) ?></a>
     128                    </div>
     129                <?php endif ?>
    115130
    116131                <?php do_action( 'bp_custom_profile_edit_fields' ); ?>
Note: See TracChangeset for help on using the changeset viewer.