[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-templates/bp-nouveau/buddypress/members/single/parts/ -> profile-visibility.php (source)

   1  <?php
   2  /**
   3   * BuddyPress - Members Single Profile Edit Field visibility
   4   *
   5   * @since 3.0.0
   6   * @version 3.1.0
   7   */
   8  
   9  if ( empty( $GLOBALS['profile_template'] ) ) {
  10      return;
  11  }
  12  ?>
  13  
  14  <?php if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?>
  15  
  16      <p class="field-visibility-settings-toggle field-visibility-settings-header" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id(); ?>">
  17  
  18          <?php
  19          printf(
  20              /* translators: field visibility level, e.g. "...seen by: everyone". */
  21              __( 'This field may be seen by: %s', 'buddypress' ),
  22              '<span class="current-visibility-level">' . bp_get_the_profile_field_visibility_level_label() . '</span>'
  23          );
  24          ?>
  25          <button class="visibility-toggle-link text-button" type="button"><?php echo esc_html_x( 'Change', 'button', 'buddypress' ); ?></button>
  26  
  27      </p>
  28  
  29      <div class="field-visibility-settings" id="field-visibility-settings-<?php bp_the_profile_field_id(); ?>">
  30          <fieldset>
  31              <legend><?php esc_html_e( 'Who is allowed to see this field?', 'buddypress' ); ?></legend>
  32  
  33              <?php bp_profile_visibility_radio_buttons(); ?>
  34  
  35          </fieldset>
  36          <button class="field-visibility-settings-close button" type="button"><?php echo esc_html_x( 'Close', 'button', 'buddypress' ); ?></button>
  37      </div>
  38  
  39  <?php else : ?>
  40  
  41      <p class="field-visibility-settings-notoggle field-visibility-settings-header" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id(); ?>">
  42          <?php
  43          printf(
  44              esc_html__( 'This field may be seen by: %s', 'buddypress' ),
  45              '<span class="current-visibility-level">' . bp_get_the_profile_field_visibility_level_label() . '</span>'
  46          );
  47          ?>
  48      </p>
  49  
  50  <?php endif;


Generated: Mon Oct 7 01:00:53 2024 Cross-referenced by PHPXref 0.7.1