Changeset 13327
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-settings/classes/class-bp-settings-component.php
r13140 r13327 221 221 'screen_function' => 'bp_settings_screen_delete_account', 222 222 'position' => 90, 223 'user_has_access' => ! is_super_admin( bp_displayed_user_id() )223 'user_has_access' => ! user_can( bp_displayed_user_id(), 'delete_users' ), 224 224 ); 225 225 } -
trunk/src/bp-templates/bp-legacy/buddypress/members/single/settings/data.php
r12595 r13327 5 5 * @package BuddyPress 6 6 * @subpackage bp-legacy 7 * @version 4.0.07 * @version 11.0.0 8 8 */ 9 9 … … 11 11 do_action( 'bp_before_member_settings_template' ); ?> 12 12 13 <h2><?php _e( 'Data Export', 'buddypress' );?></h2>13 <h2><?php esc_html_e( 'Data Export', 'buddypress' );?></h2> 14 14 15 15 <?php $request = bp_settings_get_personal_data_request(); ?> … … 69 69 <?php endif; ?> 70 70 71 < !--72 <h2 class="bp-screen-reader-text"><?php 73 /* translators: accessibility text */74 _e( 'Data Erase', 'buddypress' );75 ?></h2> 71 <?php if ( ! user_can( bp_displayed_user_id(), 'delete_users' ) ) : ?> 72 <h2><?php esc_html_e( 'Data Erase', 'buddypress' ); ?></h2> 73 <p> 74 <?php 75 esc_html_e( 'To erase all data associated with your account, your user account must be completely deleted.', 'buddypress' ); 76 76 77 <p>You can make a request to erase the following type of data from the site:</p> 77 if ( bp_disable_account_deletion() ) { 78 esc_html_e( 'Please contact the site administrator to request account deletion.', 'buddypress' ); 79 } else { 80 echo ' '; 78 81 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 82 printf( 83 /* translators: %s the link to Delete Account Settings page */ 84 esc_html__( 'You may delete your account by visiting the %s page.', 'buddypress' ), 85 sprintf( 86 '<a href="%1$s">%2$s</a>', 87 esc_url( bp_displayed_user_domain() . bp_get_settings_slug() . '/delete-account/' ), 88 esc_html__( 'Delete Account', 'buddypress' ) 89 ) 90 ); 91 } 92 ?> 93 </p> 86 94 <?php 95 endif; 87 96 88 97 /** This action is documented in bp-templates/bp-legacy/buddypress/members/single/settings/profile.php */ -
trunk/src/bp-templates/bp-nouveau/buddypress/members/single/settings/data.php
r12908 r13327 4 4 * 5 5 * @since 3.1.0 6 * @version 8.0.06 * @version 11.0.0 7 7 */ 8 8 … … 59 59 <?php endif; ?> 60 60 61 <h2 class="screen-heading data-settings-screen"> 62 <?php esc_html_e( 'Data Erase', 'buddypress' ); ?> 63 </h2> 61 <?php if ( ! user_can( bp_displayed_user_id(), 'delete_users' ) ) : ?> 62 <h2 class="screen-heading data-settings-screen"> 63 <?php esc_html_e( 'Data Erase', 'buddypress' ); ?> 64 </h2> 64 65 65 <?php /* translators: Link to Delete Account Settings page */ ?> 66 <p><?php esc_html_e( 'To erase all data associated with your account, your user account must be completely deleted.', 'buddypress' ); ?> <?php if ( bp_disable_account_deletion() ) : ?><?php esc_html_e( 'Please contact the site administrator to request account deletion.', 'buddypress' ); ?><?php else : ?><?php printf( esc_html__( 'You may delete your account by visiting the %s page.', 'buddypress' ), sprintf( '<a href="%s">%s</a>', bp_displayed_user_domain() . bp_nouveau_get_component_slug( 'settings' ) . '/delete-account/', esc_html__( 'Delete Account', 'buddypress' ) ) ); ?><?php endif; ?></p> 66 <p> 67 <?php 68 esc_html_e( 'To erase all data associated with your account, your user account must be completely deleted.', 'buddypress' ); 67 69 70 if ( bp_disable_account_deletion() ) { 71 esc_html_e( 'Please contact the site administrator to request account deletion.', 'buddypress' ); 72 } else { 73 echo ' '; 74 75 printf( 76 /* translators: %s the link to Delete Account Settings page */ 77 esc_html__( 'You may delete your account by visiting the %s page.', 'buddypress' ), 78 sprintf( 79 '<a href="%1$s">%2$s</a>', 80 esc_url( bp_displayed_user_domain() . bp_nouveau_get_component_slug( 'settings' ) . '/delete-account/' ), 81 esc_html__( 'Delete Account', 'buddypress' ) 82 ) 83 ); 84 } 85 ?> 86 </p> 68 87 <?php 88 endif; 89 69 90 bp_nouveau_member_hook( 'after', 'settings_template' );
Note: See TracChangeset
for help on using the changeset viewer.