Skip to content

Commit

Permalink
Networks and Sites: Add a clearer warning message before deleting a s…
Browse files Browse the repository at this point in the history
…ite from a network.

Props johnjamesjacoby, kebbet, cafenoirdesign, Mista-Flo, johnbillion

Fixes #51358


git-svn-id: https://develop.svn.wordpress.org/trunk@58098 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
johnbillion committed May 4, 2024
1 parent 7750458 commit 3f6ea2a
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/wp-admin/network/sites.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,20 @@
<input type="hidden" name="id" value="<?php echo esc_attr( $id ); ?>" />
<input type="hidden" name="_wp_http_referer" value="<?php echo esc_attr( wp_get_referer() ); ?>" />
<?php wp_nonce_field( $site_action . '_' . $id, '_wpnonce', false ); ?>
<p><?php printf( $manage_actions[ $site_action ], $site_address ); ?></p>
<?php submit_button( __( 'Confirm' ), 'primary' ); ?>
<?php
if ( 'deleteblog' === $site_action ) {
$submit = __( 'Delete this site permanently' );
?>
<div class="notice notice-warning inline">
<p><?php _e( 'Deleting a site is a permanent action that cannot be undone. This will delete the entire site and its uploads directory.' ); ?>
</div>
<?php
} else {
$submit = __( 'Confirm' );
}
?>
<p><?php printf( $manage_actions[ $site_action ], "<strong>{$site_address}</strong>" ); ?></p>
<?php submit_button( $submit, 'primary' ); ?>
</form>
</div>
<?php
Expand Down

0 comments on commit 3f6ea2a

Please sign in to comment.