[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-templates/bp-legacy/buddypress/members/single/settings/ -> data.php (source)

   1  <?php
   2  /**
   3   * BuddyPress - Members Settings Data
   4   *
   5   * @package BuddyPress
   6   * @subpackage bp-legacy
   7   * @version 4.0.0
   8   */
   9  
  10  /** This action is documented in bp-templates/bp-legacy/buddypress/members/single/settings/profile.php */
  11  do_action( 'bp_before_member_settings_template' ); ?>
  12  
  13  <h2><?php _e( 'Data Export', 'buddypress' );?></h2>
  14  
  15  <?php $request = bp_settings_get_personal_data_request(); ?>
  16  
  17  <?php if ( $request ) : ?>
  18  
  19      <?php if ( 'request-completed' === $request->status ) : ?>
  20  
  21          <?php if ( bp_settings_personal_data_export_exists( $request ) ) : ?>
  22  
  23              <p><?php esc_html_e( 'Your request for an export of personal data has been completed.', 'buddypress' ); ?></p>
  24              <p>
  25                  <?php
  26                  /* translators: %s: expiration date */
  27                  printf( esc_html__( 'You may download your personal data by clicking on the link below. For privacy and security, we will automatically delete the file on %s, so please download it before then.', 'buddypress' ), bp_settings_get_personal_data_expiration_date( $request ) );
  28                  ?>
  29              </p>
  30  
  31              <p><strong><?php printf( '<a href="%1$s">%2$s</a>', bp_settings_get_personal_data_export_url( $request ), esc_html__( 'Download personal data', 'buddypress' ) ); ?></strong></p>
  32  
  33          <?php else : ?>
  34  
  35              <p><?php esc_html_e( 'Your previous request for an export of personal data has expired.', 'buddypress' ); ?></p>
  36              <p><?php esc_html_e( 'Please click on the button below to make a new request.', 'buddypress' ); ?></p>
  37  
  38              <form id="bp-data-export" method="post">
  39                  <input type="hidden" name="bp-data-export-delete-request-nonce" value="<?php echo wp_create_nonce( 'bp-data-export-delete-request' ); ?>" />
  40                  <button type="submit" name="bp-data-export-nonce" value="<?php echo wp_create_nonce( 'bp-data-export' ); ?>"><?php esc_html_e( 'Request new data export', 'buddypress' ); ?></button>
  41              </form>
  42  
  43          <?php endif; ?>
  44  
  45      <?php elseif ( 'request-confirmed' === $request->status ) : ?>
  46  
  47          <p>
  48              <?php
  49              /* translators: %s: confirmation date */
  50              printf( esc_html__( 'You previously requested an export of your personal data on %s.', 'buddypress' ), bp_settings_get_personal_data_confirmation_date( $request ) );
  51              ?>
  52          </p>
  53          <p><?php esc_html_e( 'You will receive a link to download your export via email once we are able to fulfill your request.', 'buddypress' ); ?></p>
  54  
  55      <?php endif; ?>
  56  
  57  <?php else : ?>
  58  
  59      <p><?php esc_html_e( 'You can request an export of your personal data, containing the following items if applicable:', 'buddypress' ); ?></p>
  60  
  61      <?php bp_settings_data_exporter_items(); ?>
  62  
  63      <p><?php esc_html_e( 'If you want to make a request, please click on the button below:', 'buddypress' ); ?></p>
  64  
  65      <form id="bp-data-export" method="post">
  66          <button type="submit" name="bp-data-export-nonce" value="<?php echo wp_create_nonce( 'bp-data-export' ); ?>"><?php esc_html_e( 'Request personal data export', 'buddypress' ); ?></button>
  67      </form>
  68  
  69  <?php endif; ?>
  70  
  71  <!--
  72  <h2 class="bp-screen-reader-text"><?php
  73      /* translators: accessibility text */
  74      _e( 'Data Erase', 'buddypress' );
  75  ?></h2>
  76  
  77  <p>You can make a request to erase the following type of data from the site:</p>
  78  
  79  <p>If you want to make a request, please click on the button below:</p>
  80  
  81      <form id="bp-data-erase" method="post">
  82          <button type="submit" name="bp-data-erase-nonce" value="<?php echo wp_create_nonce( 'bp-data-erase' ); ?>">Request data erasure</button>
  83      </form>
  84  -->
  85  
  86  <?php
  87  
  88  /** This action is documented in bp-templates/bp-legacy/buddypress/members/single/settings/profile.php */
  89  do_action( 'bp_after_member_settings_template' );


Generated: Tue Dec 3 01:00:55 2024 Cross-referenced by PHPXref 0.7.1