Make WordPress Core

Changeset 60358


Ignore:
Timestamp:
06/27/2025 03:07:29 PM (15 months ago)
Author:
johnbillion
Message:

Networks and Sites: Correct and improve terminology relating to deactivated, deleted, and archived sites on a Multisite installation.

  • Deleting a site is permanent action, so the terminology around site deletion has been updated to reflect that.
  • Site deactivation has been renamed to "Flag for Deletion", and a site with this status is no longer incorrectly shown as "Deleted".
  • Extra helper text has been added to the screen shown when changing a site's status to make the effects clearer to Super Admins.

Props kawauso, ryan_b, wonderboymusic, nacin, DrewAPicture, martythornley, SergeyBiryukov, jeremyfelt, ideag, jorbin, sukhendu2002, johnbillion, realloc.

Fixes #15801

Location:
trunk/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-ms-sites-list-table.php

    r60069 r60358  
    3838                        'archived' => array( 'site-archived', __( 'Archived' ) ),
    3939                        'spam'     => array( 'site-spammed', _x( 'Spam', 'site' ) ),
    40                         'deleted'  => array( 'site-deleted', __( 'Deleted' ) ),
     40                        'deleted'  => array( 'site-deleted', __( 'Flagged for Deletion' ) ),
    4141                        'mature'   => array( 'site-mature', __( 'Mature' ) ),
    4242                );
     
    257257                        /* translators: %s: Number of sites. */
    258258                        'deleted'  => _n_noop(
    259                                 'Deleted <span class="count">(%s)</span>',
    260                                 'Deleted <span class="count">(%s)</span>'
     259                                'Flagged for Deletion <span class="count">(%s)</span>',
     260                                'Flagged for Deletion <span class="count">(%s)</span>'
    261261                        ),
    262262                );
     
    668668                 *
    669669                 * @param string[] $site_states An array of site states. Default 'Main',
    670                  *                              'Archived', 'Mature', 'Spam', 'Deleted'.
     670                 *                              'Archived', 'Mature', 'Spam', 'Flagged for Deletion'.
    671671                 * @param WP_Site  $site        The current site object.
    672672                 */
     
    759759                                                )
    760760                                        ),
    761                                         _x( 'Activate', 'site' )
     761                                        _x( 'Remove Deletion Flag', 'site' )
    762762                                );
    763763                        } else {
     
    770770                                                )
    771771                                        ),
    772                                         __( 'Deactivate' )
     772                                        __( 'Flag for Deletion' )
    773773                                );
    774774                        }
     
    831831                                                )
    832832                                        ),
    833                                         __( 'Delete' )
     833                                        __( 'Delete Permanently' )
    834834                                );
    835835                        }
     
    845845                 * Filters the action links displayed for each site in the Sites list table.
    846846                 *
    847                  * The 'Edit', 'Dashboard', 'Delete', and 'Visit' links are displayed by
     847                 * The 'Edit', 'Dashboard', 'Delete Permanently', and 'Visit' links are displayed by
    848848                 * default for each site. The site's status determines whether to show the
    849                  * 'Activate' or 'Deactivate' link, 'Unarchive' or 'Archive' links, and
     849                 * 'Remove Deletion Flag' or 'Flag for Deletion' link, 'Unarchive' or 'Archive' links, and
    850850                 * 'Not Spam' or 'Spam' link for each site.
    851851                 *
  • trunk/src/wp-admin/menu.php

    r59905 r60358  
    379379        $submenu['tools.php'][25] = array( __( 'Export Personal Data' ), 'export_others_personal_data', 'export-personal-data.php' );
    380380        $submenu['tools.php'][30] = array( __( 'Erase Personal Data' ), 'erase_others_personal_data', 'erase-personal-data.php' );
    381 if ( is_multisite() && ! is_main_site() ) {
     381if ( is_multisite() && ! is_main_site() && '1' !== get_site()->deleted ) {
    382382        $submenu['tools.php'][35] = array( __( 'Delete Site' ), 'delete_site', 'ms-delete-site.php' );
    383383}
  • trunk/src/wp-admin/network/site-info.php

    r58097 r60358  
    201201                        $attribute_fields['archived'] = __( 'Archived' );
    202202                        $attribute_fields['spam']     = _x( 'Spam', 'site' );
    203                         $attribute_fields['deleted']  = __( 'Deleted' );
     203                        $attribute_fields['deleted']  = __( 'Flagged for Deletion' );
    204204                }
    205205                $attribute_fields['mature'] = __( 'Mature' );
  • trunk/src/wp-admin/network/sites.php

    r59784 r60358  
    3434                        '<ul><li>' . __( 'An Edit link to a separate Edit Site screen.' ) . '</li>' .
    3535                        '<li>' . __( 'Dashboard leads to the Dashboard for that site.' ) . '</li>' .
    36                         '<li>' . __( 'Deactivate, Archive, and Spam which lead to confirmation screens. These actions can be reversed later.' ) . '</li>' .
    37                         '<li>' . __( 'Delete which is a permanent action after the confirmation screen.' ) . '</li>' .
     36                        '<li>' . __( 'Flag for Deletion, Archive, and Spam which lead to confirmation screens. These actions can be reversed later.' ) . '</li>' .
     37                        '<li>' . __( 'Delete Permanently which is a permanent action after the confirmation screen.' ) . '</li>' .
    3838                        '<li>' . __( 'Visit to go to the front-end of the live site.' ) . '</li></ul>',
    3939        )
     
    6262        $manage_actions = array(
    6363                /* translators: %s: Site URL. */
    64                 'activateblog'   => __( 'You are about to activate the site %s.' ),
    65                 /* translators: %s: Site URL. */
    66                 'deactivateblog' => __( 'You are about to deactivate the site %s.' ),
     64                'activateblog'   => __( 'You are about to remove the deletion flag from the site %s.' ),
     65                /* translators: %s: Site URL. */
     66                'deactivateblog' => __( 'You are about to flag the site %s for deletion.' ),
    6767                /* translators: %s: Site URL. */
    6868                'unarchiveblog'  => __( 'You are about to unarchive the site %s.' ),
     
    107107                $site_details = get_site( $id );
    108108                $site_address = untrailingslashit( $site_details->domain . $site_details->path );
     109                $submit       = __( 'Confirm' );
    109110
    110111                require_once ABSPATH . 'wp-admin/admin-header.php';
     
    125126                                                </div>
    126127                                                <?php
    127                                         } else {
    128                                                 $submit = __( 'Confirm' );
     128                                        } elseif ( 'archiveblog' === $site_action ) {
     129                                                ?>
     130                                                <div class="notice notice-warning inline">
     131                                                        <p><?php _e( 'Archiving a site makes the site unavailable to its users and visitors. This is a reversible action.' ); ?>
     132                                                </div>
     133                                                <?php
     134                                        } elseif ( 'deactivateblog' === $site_action ) {
     135                                                ?>
     136                                                <div class="notice notice-warning inline">
     137                                                        <p><?php _e( 'Flagging a site for deletion makes the site unavailable to its users and visitors. This is a reversible action. A super admin can permanently delete the site at a later date.' ); ?>
     138                                                </div>
     139                                                <?php
    129140                                        }
    130141                                        ?>
     
    206217                                                                                <input type="hidden" name="_wp_http_referer" value="<?php echo esc_attr( wp_get_referer() ); ?>" />
    207218                                                                                <?php wp_nonce_field( 'ms-delete-sites', '_wpnonce', false ); ?>
     219                                                                                <div class="notice notice-warning inline">
     220                                                                                        <p><?php _e( 'Deleting a site is a permanent action that cannot be undone. This will delete the entire site and its uploads directory.' ); ?>
     221                                                                                </div>
    208222                                                                                <p><?php _e( 'You are about to delete the following sites:' ); ?></p>
    209223                                                                                <ul class="ul-disc">
     
    221235                                                                                        <?php endforeach; ?>
    222236                                                                                </ul>
    223                                                                                 <?php submit_button( __( 'Confirm' ), 'primary' ); ?>
     237                                                                                <?php submit_button( __( 'Delete these sites permanently' ), 'primary' ); ?>
    224238                                                                        </form>
    225239                                                                </div>
     
    272286
    273287                        /**
    274                          * Fires after a network site is activated.
     288                         * Fires after a network site has its deletion flag removed.
    275289                         *
    276290                         * @since MU (3.0.0)
    277291                         *
    278                          * @param int $id The ID of the activated site.
     292                         * @param int $id The ID of the reactivated site.
    279293                         */
    280294                        do_action( 'activate_blog', $id );
     
    283297                case 'deactivateblog':
    284298                        /**
    285                          * Fires before a network site is deactivated.
     299                         * Fires before a network site is flagged for deletion.
    286300                         *
    287301                         * @since MU (3.0.0)
    288302                         *
    289                          * @param int $id The ID of the site being deactivated.
     303                         * @param int $id The ID of the site being flagged for deletion.
    290304                         */
    291305                        do_action( 'deactivate_blog', $id );
     
    327341                        break;
    328342                case 'all_delete':
    329                         $msg = __( 'Sites deleted.' );
     343                        $msg = __( 'Sites permanently deleted.' );
    330344                        break;
    331345                case 'delete':
    332                         $msg = __( 'Site deleted.' );
     346                        $msg = __( 'Site permanently deleted.' );
    333347                        break;
    334348                case 'not_deleted':
     
    342356                        break;
    343357                case 'activateblog':
    344                         $msg = __( 'Site activated.' );
     358                        $msg = __( 'Site deletion flag removed.' );
    345359                        break;
    346360                case 'deactivateblog':
    347                         $msg = __( 'Site deactivated.' );
     361                        $msg = __( 'Site flagged for deletion.' );
    348362                        break;
    349363                case 'unspamblog':
  • trunk/src/wp-includes/class-wp-site.php

    r54133 r60358  
    127127
    128128        /**
    129          * Whether the site should be treated as deleted.
     129         * Whether the site should be treated as flagged for deletion.
    130130         *
    131131         * A numeric string, for compatibility reasons.
  • trunk/src/wp-includes/ms-site.php

    r60264 r60358  
    12441244
    12451245                        /**
    1246                          * Fires when the 'deleted' status is added to a site.
     1246                         * Fires when the 'flagged for deletion' status is added to a site.
    12471247                         *
    12481248                         * @since 3.5.0
     
    12541254
    12551255                        /**
    1256                          * Fires when the 'deleted' status is removed from a site.
     1256                         * Fires when the 'flagged for deletion' status is removed from a site.
    12571257                         *
    12581258                         * @since 3.5.0
  • trunk/src/wp-includes/user.php

    r60310 r60358  
    11271127         * @param int      $user_id User ID.
    11281128         * @param bool     $all     Whether the returned sites array should contain all sites, including
    1129          *                          those marked 'deleted', 'archived', or 'spam'. Default false.
     1129         *                          those flagged for deletion, archived, or marked as spam.
    11301130         */
    11311131        return apply_filters( 'get_blogs_of_user', $sites, $user_id, $all );
Note: See TracChangeset for help on using the changeset viewer.