Make WordPress Core


Ignore:
Timestamp:
05/04/2024 10:10:44 PM (7 months ago)
Author:
johnbillion
Message:

Networks and Sites: Add a clearer warning message before deleting a site from a network.

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

Fixes #51358

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/network/sites.php

    r57854 r58098  
    119119                    <input type="hidden" name="_wp_http_referer" value="<?php echo esc_attr( wp_get_referer() ); ?>" />
    120120                    <?php wp_nonce_field( $site_action . '_' . $id, '_wpnonce', false ); ?>
    121                     <p><?php printf( $manage_actions[ $site_action ], $site_address ); ?></p>
    122                     <?php submit_button( __( 'Confirm' ), 'primary' ); ?>
     121                    <?php
     122                    if ( 'deleteblog' === $site_action ) {
     123                        $submit = __( 'Delete this site permanently' );
     124                        ?>
     125                        <div class="notice notice-warning inline">
     126                            <p><?php _e( 'Deleting a site is a permanent action that cannot be undone. This will delete the entire site and its uploads directory.' ); ?>
     127                        </div>
     128                        <?php
     129                    } else {
     130                        $submit = __( 'Confirm' );
     131                    }
     132                    ?>
     133                    <p><?php printf( $manage_actions[ $site_action ], "<strong>{$site_address}</strong>" ); ?></p>
     134                    <?php submit_button( $submit, 'primary' ); ?>
    123135                </form>
    124136            </div>
Note: See TracChangeset for help on using the changeset viewer.