PHP 8.2.29
Preview: ms-delete-site.php Size: 4.50 KB
/home/medyaist/hurdamakara.com.tr/wp-admin/ms-delete-site.php
<?php
/**
 * Multisite delete site panel.
 *
 * @package WordPress
 * @subpackage Multisite
 * @since 3.0.0
 */

require_once __DIR__ . '/admin.php';

if ( ! is_multisite() ) {
	wp_die( __( 'Multisite support is not enabled.' ) );
}

if ( ! current_user_can( 'delete_site' ) ) {
	wp_die( __( 'Sorry, you are not allowed to delete this site.' ) );
}

if ( isset( $_GET['h'] ) && '' !== $_GET['h'] && false !== get_option( 'delete_blog_hash' ) ) {
	if ( hash_equals( get_option( 'delete_blog_hash' ), $_GET['h'] ) ) {
		wpmu_delete_blog( get_current_blog_id() );
		wp_die(
			sprintf(
				/* translators: %s: Network title. */
				__( 'Thank you for using %s, your site has been deleted. Happy trails to you until we meet again.' ),
				get_network()->site_name
			)
		);
	} else {
		wp_die( __( 'Sorry, the link you clicked is stale. Please select another option.' ) );
	}
}

$blog = get_site();
$user = wp_get_current_user();

// Used in the HTML title tag.
$title       = __( 'Delete Site' );
$parent_file = 'tools.php';

require_once ABSPATH . 'wp-admin/admin-header.php';

echo '<div class="wrap">';
echo '<h1>' . esc_html( $title ) . '</h1>';

if ( isset( $_POST['action'] ) && 'deleteblog' === $_POST['action'] && isset( $_POST['confirmdelete'] ) && '1' === $_POST['confirmdelete'] ) {
	check_admin_referer( 'delete-blog' );

	$hash = wp_generate_password( 20, false );
	update_option( 'delete_blog_hash', $hash, false );

	$url_delete = esc_url( admin_url( 'ms-delete-site.php?h=' . $hash ) );

	$switched_locale = switch_to_locale( get_locale() );

	/* translators: Do not translate USERNAME, URL_DELETE, SITENAME, SITEURL: those are placeholders. */
	$content = __(
		"Howdy ###USERNAME###,

You recently clicked the 'Delete Site' link on your site and filled in a
form on that page.

If you really want to delete your site, click the link below. You will not
be asked to confirm again so only click this link if you are absolutely certain:
###URL_DELETE###

If you delete your site, please consider opening a new site here some time in
the future! (But remember that your current site and username are gone forever.)

Thank you for using the site,
All at ###SITENAME###
###SITEURL###"
	);
	/**
	 * Filters the text for the email sent to the site admin when a request to delete a site in a Multisite network is submitted.
	 *
	 * The following strings have a special meaning and will get replaced dynamically:
	 *
	 *  - `###USERNAME###`   The current user's username.
	 *  - `###URL_DELETE###` The link to click on to confirm the site deletion.
	 *  - `###SITENAME###`   The name of the site.
	 *  - `###SITEURL###`    The URL to the site.
	 *
	 * @since 3.0.0
	 *
	 * @param string $content The email text.
	 */
	$content = apply_filters( 'delete_site_email_content', $content );

	$content = str_replace( '###USERNAME###', $user->user_login, $content );
	$content = str_replace( '###URL_DELETE###', $url_delete, $content );
	$content = str_replace( '###SITENAME###', get_network()->site_name, $content );
	$content = str_replace( '###SITEURL###', network_home_url(), $content );

	wp_mail(
		get_option( 'admin_email' ),
		sprintf(
			/* translators: %s: Site title. */
			__( '[%s] Delete My Site' ),
			wp_specialchars_decode( get_option( 'blogname' ) )
		),
		$content
	);

	if ( $switched_locale ) {
		restore_previous_locale();
	}
	?>

	<p><?php _e( 'Thank you. Please check your email for a link to confirm your action. Your site will not be deleted until this link is clicked.' ); ?></p>

	<?php
} else {
	?>
	<p>
	<?php
		printf(
			/* translators: %s: Network title. */
			__( 'If you do not want to use your %s site any more, you can delete it using the form below. When you click <strong>Delete My Site Permanently</strong> you will be sent an email with a link in it. Click on this link to delete your site.' ),
			get_network()->site_name
		);
	?>
	</p>
	<p><?php _e( 'Remember, once deleted your site cannot be restored.' ); ?></p>

	<form method="post" name="deletedirect">
		<?php wp_nonce_field( 'delete-blog' ); ?>
		<input type="hidden" name="action" value="deleteblog" />
		<p><input id="confirmdelete" type="checkbox" name="confirmdelete" value="1" /> <label for="confirmdelete"><strong>
		<?php
			printf(
				/* translators: %s: Site address. */
				__( "I'm sure I want to permanently delete my site, and I am aware I can never get it back or use %s again." ),
				$blog->domain . $blog->path
			);
		?>
		</strong></label></p>
		<?php submit_button( __( 'Delete My Site Permanently' ) ); ?>
	</form>
	<?php
}
echo '</div>';

require_once ABSPATH . 'wp-admin/admin-footer.php';

Directory Contents

Dirs: 7 × Files: 36
Name Size Perms Modified Actions
css DIR
- drwxr-xr-x 2025-12-18 04:00:46
Edit Download
images DIR
- drwxr-xr-x 2026-01-12 14:34:52
Edit Download
includes DIR
- drwxr-xr-x 2026-01-30 00:47:10
Edit Download
js DIR
- drwxr-xr-x 2026-01-12 19:38:41
Edit Download
maint DIR
- drwxr-xr-x 2026-01-12 08:24:10
Edit Download
network DIR
- drwxr-xr-x 2026-01-14 01:03:29
Edit Download
user DIR
- drwxr-xr-x 2026-01-30 00:48:00
Edit Download
5.03 KB lrw-r--r-- 2024-07-04 08:22:14
Edit Download
2.77 KB lrw-r--r-- 2024-09-26 12:41:14
Edit Download
479 B lrw-r--r-- 2025-01-22 11:06:22
Edit Download
9.12 KB lrw-r--r-- 2025-01-24 07:58:24
Edit Download
1.97 KB lrw-r--r-- 2025-01-16 13:18:24
Edit Download
12.35 KB lrw-r--r-- 2025-10-11 20:41:32
Edit Download
4.38 KB lrw-r--r-- 2025-11-11 01:59:32
Edit Download
14.38 KB lrw-r--r-- 2025-05-14 08:59:34
Edit Download
14.60 KB lrw-r--r-- 2025-08-27 07:34:28
Edit Download
10.44 KB lrw-r--r-- 2024-12-06 14:07:22
Edit Download
22.00 KB lrw-r--r-- 2025-01-29 14:40:22
Edit Download
45.38 KB lrw-r--r-- 2026-02-27 22:27:17
Edit Download
4.80 KB lrw-r--r-- 2025-11-11 01:59:32
Edit Download
2.02 KB lrw-r--r-- 2024-08-25 20:48:14
Edit Download
2.92 KB lrw-r--r-- 2024-11-04 12:51:18
Edit Download
196 B lrw-r--r-- 2020-02-06 03:33:12
Edit Download
4.50 KB lrw-r--r-- 2025-04-21 08:49:32
Edit Download
229 B lrw-r--r-- 2024-06-22 08:47:16
Edit Download
215 B lrw-r--r-- 2020-02-06 03:33:12
Edit Download
217 B lrw-r--r-- 2020-02-06 03:33:12
Edit Download
215 B lrw-r--r-- 2020-02-06 03:33:12
Edit Download
4.74 KB lrw-r--r-- 2023-09-05 16:26:26
Edit Download
48.19 KB lrw-r--r-- 2025-08-27 10:42:30
Edit Download
13.60 KB lrw-r--r-- 2025-11-07 11:07:34
Edit Download
30.00 KB lrw-r--r-- 2025-10-13 20:12:28
Edit Download
2.34 KB lrw-r--r-- 2025-10-21 10:46:24
Edit Download
283 B lrw-r--r-- 2020-02-06 03:33:12
Edit Download
3.99 KB lrw-r--r-- 2025-02-22 09:12:20
Edit Download
47.92 KB lrw-r--r-- 2025-11-10 18:08:06
Edit Download
3.43 KB lrw-r--r-- 2023-02-23 07:38:22
Edit Download
45.45 KB lrw-r--r-- 2025-08-26 21:03:30
Edit Download
12.79 KB lrw-r--r-- 2024-01-30 11:23:12
Edit Download
341 B lrw-r--r-- 2020-02-06 03:33:12
Edit Download
23.29 KB lrw-r--r-- 2025-10-19 14:20:36
Edit Download
5.12 KB lrw-r--r-- 2025-08-27 07:34:28
Edit Download
1.09 KB lrw-r--r-- 2022-03-22 16:59:04
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).